- 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>
159 lines
4.8 KiB
JSON
159 lines
4.8 KiB
JSON
{
|
|
"schema_version": "v1",
|
|
"name": "nomad_mcp",
|
|
"description": "Manage Nomad jobs through the MCP service",
|
|
"authentication": {
|
|
"type": "none"
|
|
},
|
|
"api": {
|
|
"type": "openapi",
|
|
"url": "",
|
|
"endpoints": [
|
|
{
|
|
"path": "/api/claude/list-jobs",
|
|
"method": "GET",
|
|
"description": "List all jobs in a namespace",
|
|
"parameters": [
|
|
{
|
|
"name": "namespace",
|
|
"in": "query",
|
|
"description": "Nomad namespace",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "development"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"path": "/api/claude/jobs",
|
|
"method": "POST",
|
|
"description": "Manage a job (status, stop, restart)",
|
|
"request_body": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["job_id", "action"],
|
|
"properties": {
|
|
"job_id": {
|
|
"type": "string",
|
|
"description": "ID of the job to manage"
|
|
},
|
|
"action": {
|
|
"type": "string",
|
|
"description": "Action to perform: status, stop, or restart"
|
|
},
|
|
"namespace": {
|
|
"type": "string",
|
|
"description": "Nomad namespace"
|
|
},
|
|
"purge": {
|
|
"type": "boolean",
|
|
"description": "Whether to purge the job when stopping"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"path": "/api/claude/create-job",
|
|
"method": "POST",
|
|
"description": "Create a new job",
|
|
"request_body": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["job_id", "name", "type", "docker_image"],
|
|
"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.)"
|
|
},
|
|
"datacenters": {
|
|
"type": "array",
|
|
"description": "List of datacenters to run the job in",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"namespace": {
|
|
"type": "string",
|
|
"description": "Nomad namespace"
|
|
},
|
|
"docker_image": {
|
|
"type": "string",
|
|
"description": "Docker image to run"
|
|
},
|
|
"count": {
|
|
"type": "integer",
|
|
"description": "Number of instances to run"
|
|
},
|
|
"cpu": {
|
|
"type": "integer",
|
|
"description": "CPU allocation in MHz"
|
|
},
|
|
"memory": {
|
|
"type": "integer",
|
|
"description": "Memory allocation in MB"
|
|
},
|
|
"ports": {
|
|
"type": "array",
|
|
"description": "Port mappings",
|
|
"items": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"env_vars": {
|
|
"type": "object",
|
|
"description": "Environment variables for the container"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"path": "/api/claude/job-logs/{job_id}",
|
|
"method": "GET",
|
|
"description": "Get logs for a job",
|
|
"parameters": [
|
|
{
|
|
"name": "job_id",
|
|
"in": "path",
|
|
"description": "ID of the job to get logs for",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "namespace",
|
|
"in": "query",
|
|
"description": "Nomad namespace",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "development"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
} |