- Add Server-Sent Events (SSE) endpoint for Claude Code MCP integration - Create MCP configuration for Claude Code CLI - Update tool configuration to support modern OpenAPI format - Add documentation for Claude Code integration options - Create CLAUDE.md guide for AI coding agents 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
249 lines
7.0 KiB
JSON
249 lines
7.0 KiB
JSON
{
|
|
"name": "nomad_mcp_sse",
|
|
"version": "1.0.0",
|
|
"description": "Nomad MCP service for Claude Code using SSE",
|
|
"transport": {
|
|
"type": "sse",
|
|
"url": "http://localhost:8000/api/claude/mcp/stream"
|
|
},
|
|
"authentication": {
|
|
"type": "none"
|
|
},
|
|
"capabilities": [
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "list_nomad_jobs",
|
|
"description": "List all Nomad jobs in a namespace",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"namespace": {
|
|
"type": "string",
|
|
"description": "Nomad namespace",
|
|
"default": "development"
|
|
}
|
|
}
|
|
},
|
|
"required": []
|
|
},
|
|
"implementation": {
|
|
"type": "nomad_list_jobs",
|
|
"content": {
|
|
"namespace": "${parameters.namespace}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "get_job_status",
|
|
"description": "Get the status of a specific Nomad job",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"job_id": {
|
|
"type": "string",
|
|
"description": "ID of the job to check"
|
|
},
|
|
"namespace": {
|
|
"type": "string",
|
|
"description": "Nomad namespace",
|
|
"default": "development"
|
|
}
|
|
}
|
|
},
|
|
"required": ["job_id"]
|
|
},
|
|
"implementation": {
|
|
"type": "nomad_job_status",
|
|
"content": {
|
|
"job_id": "${parameters.job_id}",
|
|
"namespace": "${parameters.namespace}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "stop_job",
|
|
"description": "Stop a running Nomad job",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"job_id": {
|
|
"type": "string",
|
|
"description": "ID of the job to stop"
|
|
},
|
|
"namespace": {
|
|
"type": "string",
|
|
"description": "Nomad namespace",
|
|
"default": "development"
|
|
},
|
|
"purge": {
|
|
"type": "boolean",
|
|
"description": "Whether to purge the job",
|
|
"default": false
|
|
}
|
|
}
|
|
},
|
|
"required": ["job_id"]
|
|
},
|
|
"implementation": {
|
|
"type": "nomad_job_action",
|
|
"content": {
|
|
"job_id": "${parameters.job_id}",
|
|
"action": "stop",
|
|
"namespace": "${parameters.namespace}",
|
|
"purge": "${parameters.purge}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "restart_job",
|
|
"description": "Restart a Nomad job",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"job_id": {
|
|
"type": "string",
|
|
"description": "ID of the job to restart"
|
|
},
|
|
"namespace": {
|
|
"type": "string",
|
|
"description": "Nomad namespace",
|
|
"default": "development"
|
|
}
|
|
}
|
|
},
|
|
"required": ["job_id"]
|
|
},
|
|
"implementation": {
|
|
"type": "nomad_job_action",
|
|
"content": {
|
|
"job_id": "${parameters.job_id}",
|
|
"action": "restart",
|
|
"namespace": "${parameters.namespace}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "create_job",
|
|
"description": "Create a new Nomad job",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"job_id": {
|
|
"type": "string",
|
|
"description": "Unique ID for the job"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Display name for the job"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Job type (service, batch, etc.)",
|
|
"default": "service"
|
|
},
|
|
"datacenters": {
|
|
"type": "array",
|
|
"description": "List of datacenters to run the job in",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"default": ["jm"]
|
|
},
|
|
"namespace": {
|
|
"type": "string",
|
|
"description": "Nomad namespace",
|
|
"default": "development"
|
|
},
|
|
"docker_image": {
|
|
"type": "string",
|
|
"description": "Docker image to run"
|
|
},
|
|
"count": {
|
|
"type": "integer",
|
|
"description": "Number of instances to run",
|
|
"default": 1
|
|
},
|
|
"cpu": {
|
|
"type": "integer",
|
|
"description": "CPU allocation in MHz",
|
|
"default": 100
|
|
},
|
|
"memory": {
|
|
"type": "integer",
|
|
"description": "Memory allocation in MB",
|
|
"default": 128
|
|
},
|
|
"ports": {
|
|
"type": "array",
|
|
"description": "Port mappings",
|
|
"items": {
|
|
"type": "object"
|
|
},
|
|
"default": []
|
|
},
|
|
"env_vars": {
|
|
"type": "object",
|
|
"description": "Environment variables for the container",
|
|
"default": {}
|
|
}
|
|
}
|
|
},
|
|
"required": ["job_id", "name", "docker_image"]
|
|
},
|
|
"implementation": {
|
|
"type": "nomad_create_job",
|
|
"content": {
|
|
"job_id": "${parameters.job_id}",
|
|
"name": "${parameters.name}",
|
|
"type": "${parameters.type}",
|
|
"datacenters": "${parameters.datacenters}",
|
|
"namespace": "${parameters.namespace}",
|
|
"docker_image": "${parameters.docker_image}",
|
|
"count": "${parameters.count}",
|
|
"cpu": "${parameters.cpu}",
|
|
"memory": "${parameters.memory}",
|
|
"ports": "${parameters.ports}",
|
|
"env_vars": "${parameters.env_vars}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "get_job_logs",
|
|
"description": "Get logs for a Nomad job",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"job_id": {
|
|
"type": "string",
|
|
"description": "ID of the job to get logs for"
|
|
},
|
|
"namespace": {
|
|
"type": "string",
|
|
"description": "Nomad namespace",
|
|
"default": "development"
|
|
}
|
|
}
|
|
},
|
|
"required": ["job_id"]
|
|
},
|
|
"implementation": {
|
|
"type": "nomad_job_logs",
|
|
"content": {
|
|
"job_id": "${parameters.job_id}",
|
|
"namespace": "${parameters.namespace}"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
} |