MCP server for HashiCorp Consul service discovery and service mesh

MCP server for HashiCorp Consul service discovery and service mesh

consul-mcp-server-3loka•by3loka

An MCP server that connects AI agents like Claude to Consul infrastructure so they can list services, diagnose health checks, and analyze service mesh connections through natural language.

License: MIT•Runtime: Awaiting documentation review•Category: cloud devops

WHAT IT DOES

  • •Lists and analyzes services registered in Consul and identifies failing health checks.
  • •Generates service mesh architecture diagrams and detects connection issues with recommendations.
  • •Exposes MCP actions for services, health checks, connections, diagrams, service analysis, and metrics.

BEST FOR

  • •Diagnosing which microservices have failing health checks through natural language queries.
  • •Visualizing service mesh connections as diagrams.
  • •Assessing overall health of a microservices architecture in Consul.

ABOUT CONSUL-MCP-SERVER-3LOKA

MCP server for HashiCorp Consul service discovery and service mesh is cataloged as an MCP server attributed to 3loka. An MCP server that connects AI agents like Claude to Consul infrastructure so they can list services, diagnose health checks, and analyze service mesh connections through natural language. It is categorized under cloud devops. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server for HashiCorp Consul service discovery and service mesh are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does the server connect to Consul?

It uses configuration variables including CONSUL_HTTP_ADDR for the Consul server address and CONSUL_HTTP_TOKEN for the ACL token, and can run in HTTP or stdio mode.

What kind of insights can it provide about service load balancing?

It offers AI insights on service load balancing and resource utilization.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 3ea0f320c6b7 · 采集于 2026-11-13 10:53:34 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Consul MCP Server

A Model Control Protocol (MCP) server for interacting with HashiCorp Consul service discovery and service mesh. This implementation follows Anthropic's MCP specification and allows Claude to analyze your microservices architecture, create diagrams, identify issues, and provide recommendations through natural language interaction.

What is Model Control Protocol?

Model Control Protocol (MCP) is a specification developed by Anthropic that enables AI models like Claude to interact with external tools and APIs. This implementation connects AI Agents to your Consul infrastructure, allowing you to manage and analyze your services using natural language.

Features

  • List and analyze services registered in Consul
  • Identify and diagnose failing health checks
  • Generate service mesh architecture diagrams
  • Detect service connection issues and provide recommendations
  • Get AI insights on service load balancing and resource utilization

Requirements

  • Node.js 18+
  • npm or yarn
  • A running Consul instance (local or remote)
  • Claude Desktop or Cursor IDE with Claude integration

Installation

# Clone the repository
git clone https://github.com/3loka/consul-mcp-server.git
cd consul-mcp-server

# Install dependencies
npm install

# Build the project
npm run build

Configuration

Create a .env file in the root directory with the following variables:

CONSUL_HTTP_ADDR=http://localhost:8500
CONSUL_HTTP_TOKEN=your-consul-token
PORT=3000
USE_HTTP=true
  • CONSUL_HTTP_ADDR: Address of your Consul server
  • CONSUL_HTTP_TOKEN: ACL token of your Consul server
  • PORT: Port for the HTTP server
  • USE_HTTP: Set to "true" for HTTP mode, omit for stdio mode

Installation

Installing in Cursor

To install and use this MCP server in Cursor:

  1. In Cursor, open Settings (⌘+,) and navigate to the "MCP" tab.

  2. Click "+ Add new MCP server."

  3. Enter the following:

    • Name: consul-assistant
    • Type: command
    • Command: npx -y consul-mcp-server
  4. Click "Add" then scroll to the server and click "Disabled" to enable the server.

  5. Restart Cursor, if needed, to ensure the MCP server is properly loaded.

Installing in Claude Desktop

To install and use this MCP server in Claude Desktop:

  1. In Claude Desktop, open Settings (⌘+,) and navigate to the "Developer" tab.

  2. Click "Edit Config" at the bottom of the window.

  3. Edit the file (~/Library/Application Support/Claude/claude_desktop_config.json) to add the following code, then Save the file.

{
  "mcpServers": {
    "consul-assistant": {
      "command": "npx",
      "args": ["-y", "consul-mcp-server"]
    }
  }
}

if the server is not local host or ACL is enabled, use below configuration instead

{
    "mcpServers": {
      "consul-assistant": {
        "command": "npx",
        "args": ["-y", "consul-mcp-server"],
        "env": {
          "CONSUL_HTTP_ADDR": "http://<host/ip>:8500",
          "CONSUL_HTTP_TOKEN": "<ACL Token>"
        }
      }
    }
  }
  1. Restart Claude Desktop to ensure the MCP server is properly loaded.

Example Prompts

Once connected, try these prompts with Claude:

  • "Show me all services registered in Consul"
  • "Which services have failing health checks?"
  • "Create a diagram of my service mesh connections"
  • "Analyze which services are having connectivity issues"
  • "What's the overall health of my microservices architecture?"
  • "Show me services with high error rates in their connections"

Available MCP Actions

This server implements the following MCP actions:

ActionDescription
consul/get_servicesGet a list of all services in Consul
consul/get_health_checksGet health checks, optionally filtering for failing checks
consul/get_service_connectionsGet service connections and their status
consul/create_service_diagramCreate a Mermaid diagram of service relationships
consul/analyze_serviceAnalyze a specific service to identify issues
consul/get_service_metricsGet detailed metrics for a specific service

Running a Demo Environment

For testing purposes, you can set up a local demo environment with multiple microservices registered in Consul:

# Run the setup script (requires Docker and Docker Compose)
chmod +x ./demo/setup-demo.sh
./demo/setup-demo.sh

This will start:

  • A Consul server
  • Several demo microservices
  • Register the services in Consul
  • Set up some service mesh connections and health checks

Demo Walkthrough

  1. Start the demo environment:

    ./scripts/setup-demo.sh
    
  2. Start the MCP server:

    npm start
    
  3. Connect Claude Desktop or Cursor to your MCP server

  4. Try these demo scenarios:

    a. Get a service overview:

    Show me all the services registered in my Consul instance.
    

    b. Check for failing health checks:

    Are any services experiencing health issues? What might be causing them?
    

    c. Create a service mesh diagram:

    Create a diagram showing the connections between my services.
    

    d. Analyze connection issues:

    Which services are having trouble connecting to each other?
    

    e. Get recommendations:

    Based on my service mesh setup, what improvements would you recommend?
    

Development

Project Structure

  • src/index.ts: Main entry point
  • src/resources/: Consul API interaction code
  • src/tools/: Helper functionality like diagram generation
  • src/server/: MCP server components
  • src/mcp/: MCP action definitions and handlers
  • src/prompts/: Template management for AI interactions
  • src/tests/: Test suites

Running Tests

npm test

Building

npm run build

Contributing

Contributions are welcome! Please feel free to submit a pull request.

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server for HashiCorp Consul service discovery and service mesh from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/consul-mcp-server-3loka)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related cloud devops MCP Servers

Alternative and complementary servers in the same category

View all in cloud devops →
Huawei MCP Server
mcp-server-huaweiclouddeveloper•huaweiclouddeveloper

A Model Context Protocol server built on Huawei Cloud services that enables AI assistants to operate Huawei Cloud resources within conversational workflows, supporting ECS, OBS, GaussDB, and other cloud products.

Repository stats unavailable
Cloud & DevOps
Coolify MCP Server
coolify-mcp-server•wrediam

An MCP server that exposes the Coolify v4.3.1 REST API so AI clients can manage applications, databases, services, servers, deployments, and more.

Repository stats unavailable
Cloud & DevOps

A deprecated Model Context Protocol server for interacting with Kong Konnect APIs, enabling AI assistants to query and analyze Kong Gateway configurations, traffic, and analytics.

Repository stats unavailable
Cloud & DevOps