Get the FREE Ultimate OpenClaw Setup Guide →

nacos

一款与 Nacos交互和自动化而设计的 MCP Server。它允许用户使用大模型搜索和读取 Nacos 集群中与命名空间、服务、配置和节点相关的信息。

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio bubua12-nacos-mcp-server docker run -i bubua12/nacos-mcp-server:v2.4.3 \
  --env JAVA_OPTS="-Xms512m -Xmx1024m" \
  --env NACOS_SERVER="http://your-nacos-server:8848" \
  --env APP_LOG_LEVEL="INFO" \
  --env HTTP_LOG_LEVEL="INFO" \
  --env NACOS_PASSWORD="your-nacos-password" \
  --env NACOS_USERNAME="your-nacos-username"

How to use

This MCP server provides AI-assisted access to manage and interact with a Nacos cluster. It exposes tools to explore namespaces, configurations, services, and cluster nodes, enabling search, retrieval, and state changes through the MCP interface. The server uses a Spring AI MCP implementation and ships with built-in tools for common Nacos operations, including listing namespaces, viewing namespace details, listing and inspecting configurations, discovering online services and their instances, and checking cluster health and state. To begin, deploy the Docker image, configure the Nacos connection via environment variables, and connect your MCP client to the server's SSE endpoint to receive tool outputs and feedback. You can leverage the integrated AI tools to compose queries, fetch metadata, and perform actions like bringing services online or offline by invoking the corresponding MCP tools.

Once running, your MCP client should connect to the SSE endpoint at the configured URL (e.g., http://<host>:8080/sse). The client can then call specific MCP tools, such as getting a list of namespaces, fetching details for a namespace, or listing and inspecting configurations for a namespace. Use the built-in navigation and prompts to filter results, drill down into detailed records, and perform actions in a controlled manner through the MCP interface.

How to install

Prerequisites:

  • Docker installed on your machine (for the docker-based deployment).
  • Optional: Docker Compose if you prefer composing services.
  • Access to a Nacos server (recommended 2.4.3+).

Install steps:

  1. Pull and run the MCP server Docker image: docker run -i bubua12/nacos-mcp-server:v2.4.3

  2. Configure environment variables for Nacos connection (example attenuation):

    • NACOS_SERVER=http://your-nacos-server:8848
    • NACOS_USERNAME=your-nacos-username
    • NACOS_PASSWORD=your-nacos-password
    • APP_LOG_LEVEL=INFO
    • HTTP_LOG_LEVEL=INFO
    • JAVA_OPTS=-Xms512m -Xmx1024m
  3. If you prefer building locally (non-Docker):

    • Ensure Java 21+ is installed
    • Clone the repository
    • Build with Maven: mvn clean install
    • Run with Java (adjust jar path if needed): java -jar target/nacos-mcp-server-*.jar
  4. Connect MCP client:

    • Use the SSE endpoint exposed by the server (default /sse) and configure the MCP client connection URL accordingly, e.g., http://<host>:8080/sse

Additional notes

Tips and common considerations:

  • The Nacos MCP Server relies on a running Nacos cluster. Ensure NACOS_SERVER is reachable from the MCP server container or host.
  • Adjust APP_LOG_LEVEL and HTTP_LOG_LEVEL to control verbosity during development and debugging.
  • If you update Nacos credentials or endpoints, restart the MCP server so environment variables propagate.
  • For Docker deployments, exposing port 8080 (or your chosen port) is necessary for the MCP client to connect via SSE at /sse.
  • The MCP client configuration example shows how to register the MCP server; ensure the URL matches your actual deployment and that the service is reachable from client networks.
  • If you encounter issues with tool discovery or permissions, check Spring Boot logs and verify that environment variables for Nacos authentication are correct.

Related MCP Servers

Sponsor this space

Reach thousands of developers