nomad-mcp
Exposes a HashiCorp Nomad cluster as MCP tools for AI agents, enabling read-only inspection of jobs, allocations, nodes, and deployments, with optional write operations like stopping jobs, scaling task groups, restarting allocations, and registering jobs.
README
nomad-mcp
An MCP server that exposes a HashiCorp Nomad cluster as tools for MCP-compatible AI agents — Claude Code, Claude Desktop, OpenCode, Cursor, etc. It speaks standard MCP over stdio, so any client that supports stdio MCP servers works out of the box.
Tools
Read-only, always available:
list_jobs,get_job,get_job_allocations,get_job_deployments,get_job_evaluationsget_allocation,get_allocation_logslist_nodes,get_nodelist_deployments,get_deploymentlist_namespaces
Write tools, disabled by default (see Write access):
stop_job— stop a job, optionally purge itscale_task_group— set a task group's countreschedule_allocation— stop a single allocation so Nomad reschedules it as a new allocation (POST /v1/allocation/:id/stop)restart_allocation— restart task(s) in an allocation in place, same allocation ID (POST /v1/client/allocation/:id/restart)register_job— submit a job from HCL or JSON (create or update)
Setup
Requires Node.js 18+.
npm install
cp .env.example .env # then edit .env with your Nomad address/token
Or, if you use pixi and don't want a system Node install:
pixi run install
Configuration
Standard nomad CLI environment variables:
| Variable | Default | Description |
|---|---|---|
NOMAD_ADDR |
http://127.0.0.1:4646 |
Nomad HTTP API address |
NOMAD_TOKEN |
(none) | ACL token, sent as X-Nomad-Token |
NOMAD_NAMESPACE |
(none) | Default namespace applied when a tool call doesn't specify one |
NOMAD_SKIP_VERIFY |
false |
Skip TLS certificate verification |
NOMAD_CACERT |
(none) | Path to a CA bundle for a private/internal CA |
Write access
Write tools are off by default. An agent connected to this server can only read cluster state until you explicitly opt in:
NOMAD_MCP_WRITE_MODE=on
To allow only specific write tools instead of all four:
NOMAD_MCP_WRITE_MODE=on
NOMAD_MCP_WRITE_TOOLS=stop_job,scale_task_group
See AUTOMATION.md for recipes on using this to automate recurring Nomad tasks (health checks, auto-restart, scheduled scaling), including running an agent headlessly on a schedule instead of interactively.
Using it with an MCP client
The server is started as node /path/to/nomad-mcp/src/index.js, with config passed via environment variables. Point any MCP client's stdio server config at that command.
Claude Code:
claude mcp add nomad node /path/to/nomad-mcp/src/index.js \
--env NOMAD_ADDR=https://nomad.example.com \
--env NOMAD_TOKEN=your-token
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"nomad": {
"command": "node",
"args": ["/path/to/nomad-mcp/src/index.js"],
"env": {
"NOMAD_ADDR": "https://nomad.example.com",
"NOMAD_TOKEN": "your-token"
}
}
}
}
OpenCode (opencode.json / ~/.config/opencode/opencode.json):
{
"mcp": {
"nomad": {
"type": "local",
"command": ["node", "/path/to/nomad-mcp/src/index.js"],
"environment": {
"NOMAD_ADDR": "https://nomad.example.com",
"NOMAD_TOKEN": "your-token"
}
}
}
}
(Check OpenCode's current docs for the exact config key names if this has changed — the important part is that it runs the same stdio command with the same environment variables.)
Security notes
NOMAD_TOKENgrants whatever an ACL policy allows — scope it to a policy with only the access this server actually needs (read-only policy if you're not enabling write mode).- Write mode lets a connected agent stop jobs, scale them, restart allocations, and submit new job specs. Only enable it for a token/environment you're comfortable an LLM acting autonomously could affect.
register_jobsubmits directly to/v1/jobswith no dry-run step — review what an agent intends to submit before asking it to call this tool against a production namespace.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.