MCP Connector

Manage Consul Services via Standardized Interface

Standardized MCP interface to HashiCorp Consul: service registry, health checks, KV store, sessions, and prepared queries.

Works with consul

Maintainer of this project? Claim this page to edit the listing.


86
Spark score
out of 100
Updated Jun 2025
Version 1.0.0
Models
universal

Add 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

01

Register and deregister services

02

Monitor service health checks

03

Retrieve and manage Consul KV store data

04

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

list_services

View all running services registered in Consul

register_service

Register a new service in Consul

deregister_service

Deregister a service from Consul

get_service_info

Retrieve detailed information about a specific service

view_service_catalog

View the complete service catalog in Consul

get_catalog_service

Get service information from the Consul catalog

register_health_check

Register a health check for a service in Consul

deregister_health_check

Deregister a health check from Consul

+3 tools

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 (default localhost)
  • CONSUL_PORT (default 8500)

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

MseeP.ai Security Assessment Badge

Consul MCP Server ๐Ÿš€

smithery badge

A Model Context Protocol (MCP) server that provides access to Consul's functionality through a standardized interface.

Consul Server MCP server

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

  1. Start the server:
node build/index.js
  1. The server will connect to Consul and make all functionality available through the MCP interface.

Development

  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. 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.