A Model Context Protocol (MCP) server for interacting with HashiCorp Consul. This server provides read-only access to Consul's key-value store, service catalog, health checks, and cluster status.
Use the CONSUL_HOST environment variable to specify the Consul server URL.
The MCP server will use this URL to interact with the Conusl API.
You can start up the stio MCP server using npx -y -p @wkronmiller/consul-mcp-server consul-mcp-server command.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"consul": {
"type": "local",
"command": ["npx", "-y", "-p", "@wkronmiller/consul-mcp-server", "consul-mcp-server"],
"environment": {
"CONSUL_HOST": "192.168.6.2"
}
}
}
}consul_kv_get- Get a key-value pair from Consul KV storeconsul_kv_keys- List keys in Consul KV store with given prefix
consul_status_leader- Get the current Raft leaderconsul_status_peers- Get the current Raft peer set
consul_agent_members- Get cluster members as seen by the agentconsul_agent_self- Get agent configuration and member information
consul_catalog_datacenters- List known datacentersconsul_catalog_nodes- List nodes in datacenterconsul_catalog_node_services- List services provided by a nodeconsul_catalog_services- List services in datacenterconsul_catalog_service_nodes- List nodes providing a service
consul_health_node- Get health information for a nodeconsul_health_checks- Get health checks for a serviceconsul_health_service- Get nodes and health info for a serviceconsul_health_state- Get checks in a given state
MIT