consul
A consul MCP Server (modelcontextprotocol)
claude mcp add --transport stdio kocierik-consul-mcp-server node /ABSOLUTE/PATH/TO/PARENT/FOLDER/consul-mcp-server/build/index.js \ --env CONSUL_HOST="Consul host (default: localhost)" \ --env CONSUL_PORT="Consul port (default: 8500)"
How to use
This MCP server exposes Consul functionality through the MCP interface, allowing you to manage services, health checks, KV store operations, sessions, events, prepared queries, and more against a connected Consul cluster. After starting the server, you can issue MCP requests to list and register services, query catalog information, manage health checks, perform KV read/write/delete operations, and interact with Consul’s sessions, events, and system data. The server connects to a Consul endpoint defined by CONSUL_HOST and CONSUL_PORT, and translates MCP operations into corresponding Consul API calls.
To use it, ensure your MCP client points to the server and that CONSUL_HOST/CONSUL_PORT are set so the server can reach Consul. Typical workflows include listing services, registering a temporary service, pushing KV values, creating prepared queries, and inspecting agent information. The included Claude integration demonstrates how to embed this MCP server in Claude via the mcpServers configuration, enabling Claude to route MCP requests to Consul through this server.
How to install
Prerequisites:
- Node.js (LTS) and npm installed
- Access to a running Consul cluster (or a reachable Consul agent)
Installation steps:
-
Clone the repository or download the package containing the Consul MCP server.
-
Install dependencies:
npm install
- Build the project (if required by the project structure):
npm run build
- Run the server locally (example, adjust paths as needed):
node build/index.js
- Verify the server is running and reachable by your MCP client. If you are using Claude, you can reference the Claude config example to embed the server.
Optional: Run with inspector for debugging:
npm run build && npx @modelcontextprotocol/inspector node build/index.js
Environment variables can be provided to point to your Consul instance:
- CONSUL_HOST: your Consul host (default: localhost)
- CONSUL_PORT: your Consul port (default: 8500)
If you change Consul connection details, restart the MCP server for the changes to take effect.
Additional notes
Notes and tips:
- The server relies on a running Consul instance; ensure network access between the MCP server and Consul.
- If you encounter connection issues, verify CONSUL_HOST and CONSUL_PORT, and confirm that Consul is listening on the expected interface.
- For Claude integration, use the provided Claude config example to map the MCP server into Claude’s environment.
- When deploying, consider setting up proper authentication/ACLs in Consul and securing MCP endpoints if exposed publicly.
- The environment variables are documented in the README; placeholders in the mcpConfig should be replaced with actual host/port values in production.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud