Skip to main content

nacos-mcp-router: A MCP server that provides functionalities such as search, installation, proxy, and more.

切换到中文版

Overview

Nacos is an easy-to-use platform designed for dynamic service discovery and configuration and service management. It helps you to build cloud native applications and microservices platform easily.

This MCP(Model Context Protocol) Server provides tools to search, install, proxy other MCP servers.

Nacos-MCP-Router has two working modes:

Router mode: The default mode, which recommends, distributes, installs, and proxies the functions of other MCP Servers through the MCP Server, helping users more conveniently utilize MCP Server services.

Proxy mode: Specified by the environment variable MODE=proxy, it can convert SSE and stdio protocol MCP Servers into streamable HTTP protocol MCP Servers through simple configuration.

Quick Start

router mode

Tools

  1. search_mcp_server
    • Search MCP servers by task and keywords.
    • Input:
      • task_description(string): Task description
      • key_words(string): Keywords of task
    • Returns: list of MCP servers and instructions to complete the task.
  2. add_mcp_server
    • Add a MCP server. If the MCP server is a stdio server, this tool will install it and establish connection to it. If the MCP server is a sse server, this tool will establish connection to it
    • Input:
      • mcp_server_name(string): The name of MCP server.
    • Returns: tool list of the MCP server and how to use these tools.
  3. use_tool
    • This tool helps LLM to use the tool of some MCP server. It will proxy requests to the target MCP server.
    • Input:
      • mcp_server_name(string): The target MCP server name that LLM wants to call.
      • mcp_tool_name(string): The tool name of target MCP server that LLM wants to call.
      • params(map): The parameters of the MCP tool.
    • Returns: Result returned from the target MCP server.

Usage

When using uv no specific installation is needed. We will use uvx to directly run nacos-mcp-router.

export NACOS_ADDR=127.0.0.1:8848
export NACOS_USERNAME=nacos
export NACOS_PASSWORD=$PASSWORD
uvx nacos-mcp-router@latest
Using PIP

Alternatively you can install nacos-mcp-router via pip:

pip install nacos-mcp-router

After installation, you can run it as a script using(As an example,Nacos is deployed in standalone mode on the local machine):

export NACOS_ADDR=127.0.0.1:8848
export NACOS_USERNAME=nacos
export NACOS_PASSWORD=$PASSWORD
python -m nacos-mcp-router
Using Docker
docker run -i --rm --network host -e NACOS_ADDR=$NACOS_ADDR -e NACOS_USERNAME=$NACOS_USERNAME -e NACOS_PASSWORD=$NACOS_PASSWORD -e TRANSPORT_TYPE=$TRANSPORT_TYPE nacos-mcp-router:latest
Usage with Cline、Cursor、Claude and other applications

Add this to MCP settings of your application:

####### Using uvx

{
    "mcpServers":
    {
        "nacos-mcp-router":
        {
            "command": "uvx",
            "args":
            [
                "nacos-mcp-router@latest"
            ],
            "env":
            {
                "NACOS_ADDR": "<NACOS-ADDR>, optional, default is 127.0.0.1:8848",
                "NACOS_USERNAME": "<NACOS-USERNAME>, optional, default is nacos",
                "NACOS_PASSWORD": "<NACOS-PASSWORD>, required"
            }
        }
    }
}

You may need to put the full path to the uvx executable in the command field. You can get this by running which uvx on MacOS/Linux or where uvx on Windows.

Using docker
{
  "mcpServers": {
    "nacos-mcp-router": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm", "--network", "host",  "-e", "NACOS_ADDR=<NACOS-ADDR>", "-e",  "NACOS_USERNAME=<NACOS-USERNAME>", "-e", "NACOS_PASSWORD=<NACOS-PASSWORD>" ,"-e", "TRANSPORT_TYPE=stdio", "nacos-mcp-router:latest"
      ]
    }
  }
}

Proxy Mode

The proxy mode supports converting SSE and stdio protocol MCP Servers into streamable HTTP protocol MCP Servers.

Usage

The usage of proxy mode is similar to that of router mode, with slightly different parameters. Docker deployment is recommended.

docker run -i --rm --network host -e NACOS_ADDR=$NACOS_ADDR -e NACOS_USERNAME=$NACOS_USERNAME -e NACOS_PASSWORD=$NACOS_PASSWORD -e TRANSPORT_TYPE=streamable_http -e MODE=proxy -e PROXIED_MCP_NAME=$PROXIED_MCP_NAME  nacos-mcp-router:latest

Development

If you are doing local development, simply follow the steps:

  1. Clone this repo into your local environment.
  2. Modify codes in src/mcp_server_nacos to implement your wanted features.
  3. Test using the Claude desktop app. Add the following to your claude_desktop_config.json:
{
  "mcpServers": {
    "nacos-mcp-router": {
      "command": "uv",
      "args": [
        "--directory","PATH-TO-PROJECT","run","nacos-mcp-router"
      ],
      "env": {
        "NACOS_ADDR": "<NACOS-ADDR>, optional, default is 127.0.0.1:8848",
        "NACOS_USERNAME": "<NACOS-USERNAME>, optional, default is nacos",
        "NACOS_PASSWORD": "<NACOS-PASSWORD>, required"
      }
    }
  }
}

Environment Variable Settings

Parameter Description Default Value Required Remarks
NACOS_ADDR Nacos server address 127.0.0.1:8848 No the Nacos server address, e.g., 192.168.1.1:8848. Note: Include the port.
NACOS_USERNAME Nacos username nacos No the Nacos username, e.g., nacos.
NACOS_PASSWORD Nacos password - Yes the Nacos password, e.g., nacos.
NACOS_NAMESPACE Nacos Namespace public No Nacos namespace, e.g. public
TRANSPORT_TYPE Transport protocol type stdio No transport protocol type. Options: stdio, sse, streamable_http.
PROXIED_MCP_NAME Proxied MCP server name - No In proxy mode, specify the MCP server name to be converted. Must be registered in Nacos first.
MODE Working mode router No Available options: router, proxy.
ACCESS_KEY_ID Aliyun ram access key id - No
ACCESS_KEY_SECRET Aliyun ram access key secret - No

License

nacos-mcp-router is licensed under the Apache 2.0 License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the Apache 2.0 License. For more details, please see the LICENSE file in the project repository.

Metadata

Release files for nacos-mcp-router 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nacos-mcp-router 0.2.2
File Size Uploaded Provenance
nacos_mcp_router-0.2.2.tar.gz 759.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nacos-mcp-router 0.2.2
File Interpreter ABI Platform
nacos_mcp_router-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 785.5 kB

Release files / nacos_mcp_router-0.2.2.tar.gz

Download URL nacos_mcp_router-0.2.2.tar.gz
Size 759.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4f7aed0302d3255dd9259482bb81e3c8db3e918e3144218e1c4f4b138b74dbf0
BLAKE2b-256 checksum
How to use checksums
ef767c823780df5f5e79e0b7eb211ece8036ddb31cc3495a5b05bbad6ab1005b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / nacos_mcp_router-0.2.2-py3-none-any.whl

Download URL nacos_mcp_router-0.2.2-py3-none-any.whl
Size 26.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbc3bca7a6354fd797047fcb93e00f9e05f4e1af08f3bdeaa4bc2af876ed818f
BLAKE2b-256 checksum
How to use checksums
9f038d9134c2e76f0bf5aaf358bc3794f88e554c7a555f4960f5302caf8450c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for nacos-mcp-router 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page