Manage Consul Services via Standardized Interface
Standardized MCP interface to HashiCorp Consul: service registry, health checks, KV store, sessions, and prepared queries.
Maintainer of this project? Claim this page to edit the listing.
1.0.0Add to Favorites
Why it matters
Integrate with Consul to manage services, health checks, and key-value data through a standardized MCP interface. Automate DevOps tasks by programmatically interacting with your Consul infrastructure.
Outcomes
What it gets done
Register and deregister services
Monitor service health checks
Retrieve and manage Consul KV store data
View and query the service catalog
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-consul-mcp | bash Capabilities
Tools your agent gets
View all running services registered in Consul
Register a new service in Consul
Deregister a service from Consul
Retrieve detailed information about a specific service
View the complete service catalog in Consul
Get service information from the Consul catalog
Register a health check for a service in Consul
Deregister a health check from Consul
Overview
consul-mcp server
This MCP server gives an AI assistant standardized access to a running Consul deployment - service registry, health checks, KV store, sessions, events, and prepared queries. Use it when you need an assistant to inspect or operate an existing Consul cluster. It connects to a running Consul agent via CONSUL_HOST/PORT rather than provisioning Consul itself.
What it does
Consul MCP Server exposes HashiCorp Consul's functionality to AI assistants through a standardized Model Context Protocol interface, covering service management, health checks, the key-value store, sessions, events, prepared queries, cluster status, and agent information.
When to use - and when NOT to
Use this when an AI assistant needs to inspect or operate a Consul-backed service mesh or configuration store - checking which services are registered and healthy, reading or writing KV data, firing events, or running prepared queries - directly from a conversation instead of the Consul CLI or UI. It connects to an existing Consul agent via host/port configuration, so it requires a running Consul deployment to be useful; it does not stand up Consul itself.
Capabilities
- Service management: list running services, register/deregister services, get service info, list and query catalog services
- Health checks: register/deregister health checks, get health checks for services
- Key-value store: get values, list keys, put values, delete keys
- Sessions: list sessions, destroy sessions
- Events: fire events, list events
- Prepared queries: create and execute prepared queries
- Status: get current leader, get current peers
- Agent: get agent members, get agent self information
- System: get system health service information
How to install
Configure via environment variables:
CONSUL_HOST(defaultlocalhost)CONSUL_PORT(default8500)
Build and run:
npm install
npm run build
node build/index.js
Claude Desktop configuration:
{
"mcpServers": {
"consul-mcp": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/PARENT/FOLDER/consul-mcp-server/build/index.js"]
}
}
}
Or install via Smithery:
npx -y @smithery/cli install @kocierik/consul-mcp-server --client claude
For debugging, use the MCP Inspector: npm run build && npx @modelcontextprotocol/inspector node build/index.js.
Who it's for
Platform engineers and SREs running HashiCorp Consul for service discovery, health checking, or distributed KV configuration who want an AI assistant to query and operate that infrastructure directly. Licensed MIT.
Source README
Consul MCP Server ๐
A Model Context Protocol (MCP) server that provides access to Consul's functionality through a standardized interface.
Features
The server provides access to the following Consul functionality:
Service Management
- List running services
- Register and deregister services
- Get service information
- List catalog services
- Get catalog service information
Health Checks
- Register health checks
- Deregister health checks
- Get health checks for services
Key-Value Store
- Get values from KV store
- List keys in KV store
- Put values in KV store
- Delete keys from KV store
Sessions
- List sessions
- Destroy sessions
Events
- Fire events
- List events
Prepared Queries
- Create prepared queries
- Execute prepared queries
Status
- Get current leader
- Get current peers
Agent
- Get agent members
- Get agent self information
System
- Get system health service information
Configuration
The server can be configured using environment variables:
CONSUL_HOST: Consul server host (default: localhost)CONSUL_PORT: Consul server port (default: 8500)
Usage
- Start the server:
node build/index.js
- The server will connect to Consul and make all functionality available through the MCP interface.
Development
- Install dependencies:
npm install
- Build the project:
npm run build
- Run inspector:
npm run build && npx @modelcontextprotocol/inspector node build/index.js
Claude config
{
"mcpServers": {
"consul-mcp": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/consul-mcp-server/build/index.js"
]
}
}
}
Installing via Smithery
To install Consul Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @kocierik/consul-mcp-server --client claude
FAQ
Common questions
Discussion
Questions & comments ยท 0
Sign In Sign in to leave a comment.
