Connect Nomad to MCP
A Golang-based MCP server that bridges Claude and other MCP clients to a HashiCorp Nomad cluster's REST API for jobs and allocations.
0.3.0Add to Favorites
Why it matters
Integrate your Nomad cluster with the Model Context Protocol (MCP) ecosystem, enabling advanced automation and interaction capabilities for your infrastructure.
Outcomes
What it gets done
Establish a connection between Nomad and MCP servers.
Configure transport protocols (stdio, SSE, streamable-http) for communication.
Manage Nomad resources and configurations via MCP.
Utilize the connector with tools like Claude and Inspector.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-nomad-mcp | bash Reviews
What people say after installing
Overview
nomad-mcp server
A Golang MCP server that wraps HashiCorp Nomad's official REST API, letting Claude Desktop or other MCP clients interact with Nomad jobs and allocations through typed helper calls. Supports stdio, sse, and streamable-http transports and multi-region, multi-namespace Nomad clusters. Use when a team already operates a HashiCorp Nomad cluster and wants Claude to query or act on it directly; not applicable to other orchestrators since it targets Nomad's own API specifically.
What it does
nomad-mcp is a Golang-based MCP server that connects an MCP client such as Claude Desktop to a HashiCorp Nomad cluster. Its HTTP client follows the official Nomad /v1/ REST API and is split across dedicated client files, with MCP tools built on narrow interfaces defined in the project's tool-interfaces layer. Rather than calling the generic request path directly, the tools rely on typed helpers - the source calls out StopAllocation as an example - since the generic NomadClient.MakeRequest helper is restricted to a few cluster/legacy call sites and rejects paths outside an internal allow-list. The server supports three transports: stdio (the default), sse, and streamable-http, configurable via a -transport flag alongside -nomad-addr and -port flags.
When to use - and when NOT to
Use this when a team already runs HashiCorp Nomad and wants an MCP bridge so Claude or another MCP client can interact with that Nomad cluster's jobs and allocations directly, without leaving the chat interface to run Nomad CLI commands. It is not a general-purpose orchestration tool for other schedulers - it speaks specifically to Nomad's own REST API. The MCP Inspector workflow described in the source is explicitly for local testing and debugging, not something needed for day-to-day Claude Desktop use.
Inputs and outputs
Configuration is environment-variable driven: NOMAD_ADDR sets the Nomad HTTP API address (defaulting to http://localhost:4646), NOMAD_TOKEN supplies an optional Nomad ACL token, NOMAD_REGION is forwarded as the REST region query parameter when a caller doesn't override it (useful for multi-region clusters), and NOMAD_NAMESPACE sets a default namespace for tools that accept an optional namespace argument. TLS behavior is controlled via NOMAD_CACERT, NOMAD_SKIP_VERIFY, and NOMAD_TLS_SERVER_NAME. Server options can also be set via command-line flags (-nomad-addr, -port, -transport) when running the binary manually, which is relevant when pairing it with the MCP Inspector.
How to install
Three installation paths are documented. The simplest is the prebuilt npm package, which needs Node.js and requires no manual build:
npx -y @kocierik/mcp-nomad
It can also be installed globally with npm install -g @kocierik/mcp-nomad so the mcp-nomad binary lands on PATH. Alternatively, a prebuilt binary can be downloaded from GitHub Releases (no prerequisite beyond the binary itself), or the server can be built from source with Go installed via go get and go install. In every case, Claude Desktop is configured manually through claude_desktop_config.json, registering the server under mcpServers with NOMAD_TOKEN and NOMAD_ADDR passed through the env block - the exact command/args pair differs depending on whether npx, a global npm install, or a downloaded binary is used.
Who it's for
Platform and DevOps engineers who operate HashiCorp Nomad clusters and want to query or act on Nomad allocations and jobs from within Claude Desktop or another MCP client, instead of switching to the Nomad CLI or web UI.
Source README
Golang-based MCP server connecting to Nomad
MCP Nomad Go
Use with Claude ⚙ Server options ⚙ MCP Inspector (testing) ⚙ Contributing ↗ ⚙ About MCP ↗
Use With Claude
https://github.com/user-attachments/assets/731621d7-0acf-4045-bacc-7b34a7d83648
Installation Options
| Pre-built NPM | Pre-built in Github | From sources | |
|---|---|---|---|
| Claude Setup | Manual | Manual | Manual |
| Prerequisite | Node.js | None | Golang |
Prebuilt from npm
The package publishes a mcp-nomad CLI. Easiest zero-install option (downloads to npm’s cache; needs Node/npm):
npx -y @kocierik/mcp-nomad
Or install globally so mcp-nomad is on your PATH:
npm install -g @kocierik/mcp-nomad
claude_desktop_config.json with npx (recommended):
{
"mcpServers": {
"mcp_nomad": {
"command": "npx",
"args": ["-y", "@kocierik/mcp-nomad"],
"env": {
"NOMAD_TOKEN": "${NOMAD_TOKEN}",
"NOMAD_ADDR": "${NOMAD_ADDR}"
}
}
}
}
If you used npm install -g, keep command / args as the binary directly:
{
"mcpServers": {
"mcp_nomad": {
"command": "mcp-nomad",
"args": [],
"env": {
"NOMAD_TOKEN": "${NOMAD_TOKEN}",
"NOMAD_ADDR": "${NOMAD_ADDR}"
}
}
}
}
From GitHub Releases
Download the binary and configure Claude Desktop like so:
{
"mcpServers": {
"mcp_nomad": {
"command": "mcp-nomad",
"args": [],
"env": {
"NOMAD_TOKEN": "${NOMAD_TOKEN}",
"NOMAD_ADDR": "${NOMAD_ADDR}"
}
}
}
}
Building from Source
go get github.com/kocierik/mcp-nomad
go install github.com/kocierik/mcp-nomad
Server options
Command-line flags (also relevant when pairing with MCP Inspector against a manually started binary):
-nomad-addr string
Nomad server address (default "http://localhost:4646")
-port string
Port for HTTP server (default "8080")
-transport string
Transport type (stdio, sse, or streamable-http) (default "stdio")
Environment variables
NOMAD_ADDR: Nomad HTTP API address (default: http://localhost:4646)NOMAD_TOKEN: Nomad ACL token (optional)NOMAD_REGION: forwarded as the RESTregionquery parameter when callers do not override it (multi-region clusters)NOMAD_NAMESPACE: default namespace for tools that accept an optional namespace when the tool omits it- TLS:
NOMAD_CACERT,NOMAD_SKIP_VERIFY,NOMAD_TLS_SERVER_NAME(seeutils/client.go/buildTLSConfig)
The HTTP client follows the official /v1/ API and is split across utils/client_*.go; MCP tools depend on narrow interfaces in utils/nomad_tool_interfaces.go.
NomadClient.MakeRequest (used only for a few cluster/legacy call sites) rejects paths outside an internal allow-list - prefer typed helpers such as StopAllocation.
Browse with MCP Inspector
Use this for local testing and debugging - not required for Claude Desktop daily use.
To run the latest published npm build under the MCP Inspector:
npx @modelcontextprotocol/inspector npx @kocierik/mcp-nomad
Inspector with a local HTTP server (optional)
Default transport is stdio. To attach the Inspector as Streamable HTTP, start the binary in another terminal first:
go run . -transport=streamable-http -port=8080
Then open http://localhost:8080/mcp in the Inspector. For -transport=sse, use http://localhost:8080/sse.
FAQ
Common questions
Trust
How it checks out
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.