×
Community Blog Nacos open source MCP Router, accelerating MCP private deployment

Nacos open source MCP Router, accelerating MCP private deployment

we are pleased to announce the launch of a new version of Nacos MCP Router, bringing multiple important updates, including comprehensive support for SSE and StreamableHTTP protocols.

Author: Zheng Ji

Nacos MCP Router Introduction


Nacos MCP Router is a standard MCP Server developed based on the MCP official SDK, providing intelligent search, installation, proxy, and other functions for MCP Clients, greatly simplifying the use process of MCP services. At the same time, Nacos MCP Router integrates with Nacos MCP Registry to implement governance for MCP Server, such as visibility of MCP Servers and tools, version management, etc.

Today, we are pleased to announce the launch of a new version of Nacos MCP Router, bringing multiple important updates, including comprehensive support for SSE and StreamableHTTP protocols, Docker containerization deployment solutions, and a revolutionary one-click conversion feature for MCP Server protocols. These new features will provide developers with a more flexible and efficient experience in using MCP services, promoting the prosperous development of the MCP ecosystem.

Application Scenarios


The feature set of the new version of Nacos MCP Router provides strong support for various application scenarios:
  1. Heterogeneous System Integration: Through the protocol conversion feature, interoperability between different protocol MCP services can be easily achieved, breaking down technical barriers and facilitating system integration.
  2. Microservices Architecture: As a supplement to service discovery and configuration centers, Nacos MCP Router can help various services in a microservices architecture to efficiently discover and use MCP services.
  3. AI Assistant Capability Expansion: By integrating with AI assistants such as Cline and Cursor, it can provide MCP search, installation, proxy tools, and services for these platforms, expanding their capability boundaries.
  4. Cloud-Native Applications: Docker deployment support makes Nacos MCP Router a truly cloud-native application, easily deployable on container orchestration platforms like Kubernetes.

Multi-Protocol Support: Supports stdio, SSE, and StreamableHTTP Protocols


In modern distributed systems, different communication protocols are suitable for different application scenarios. The new version of Nacos MCP Router deeply understands this, and thus has fully expanded the range of supported protocols; in addition to the traditional stdio protocol, it now also supports SSE (Server-Sent Events) and StreamableHTTP protocols.

Support for SSE Protocol


The SSE protocol is the first remote MCP server communication protocol provided by the MCP official. The SSE protocol supports event push, enhancing real-time performance and interaction experience. Nacos MCP Router currently supports exposing the SSE protocol; for example, in a Docker deployment:
docker run -i --rm --network host -e NACOS_ADDR=$NACOS_ADDR -e NACOS_USERNAME=$NACOS_USERNAME -e NACOS_PASSWORD=$NACOS_PASSWORD -e TRANSPORT_TYPE=sse nacos-mcp-router:latest

Note: Set the environment variable TRANSPORT_TYPE=sse

After the Nacos MCP Router is started, it can be used after completing MCP settings like Cline, Cursor, Claude, etc. Here is an example:

{
  "mcpServers": {
    "nacos-mcp-router": {
      "url":"http://$nacos_mcp_router_addr/sse"
    }
  }
}

Support for StreamableHTTP Protocol


Since the SSE protocol requires maintaining a connection state, there are some drawbacks:
  1. The connection is non-recoverable (must reconnect if disconnected). Once the SSE connection is interrupted (e.g., due to network fluctuations), the client cannot recover the previous session state and must re-establish the connection and initialize the context, causing long tasks (e.g., file processing, multi-turn dialogues) to be forcibly restarted.
  2. The server must maintain a high-availability long connection, and each client requires an independent SSE long connection. In high-concurrency scenarios, server resource consumption (such as TCP connection count, memory) increases dramatically, and horizontal expansion becomes difficult.
  3. Only supports server→client unidirectional push, and client messages still need to be sent via independent HTTP requests. This fragmented design increases implementation complexity and does not support bidirectional on-demand communication.
  4. Poor infrastructure compatibility; long connections may be forcibly interrupted by enterprise firewalls, CDNs, or load balancers, and they are difficult to deploy on Serverless architectures or other cloud platforms that do not support long connections.

To address these issues, the MCP official has introduced the StreamableHTTP protocol, which retains the streaming capabilities of SSE while also possessing flexibility, lightness, and compatibility.

Set the environment variable TRANSPORT_TYPE=streamable_http, and the Nacos MCP Server will enable the StreamableHTTP protocol. For example, in a Docker deployment, the command is as follows:

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 nacos-mcp-router:latest

Here are examples of MCP settings for Cline, Cursor, Claude, etc.:

{
  "mcpServers": {
    "nacos-mcp-router": {
      "url":"http://$nacos_mcp_router_addr/mcp"
    }
  }
}

The working principle of Nacos MCP Router under SSE and StreamableHTTP protocols is shown in the figure below:

Figure 1: Nacos MCP Router StreamableHTTP and SSE Protocol Architecture

One-Click Conversion from stdio and SSE to StreamableHTTP Protocol


Currently, there are many MCP Servers in the AI ecosystem, most of which expose stdio or SSE protocols. Local deployment of MCP Servers consumes local resources, so there is a demand for remote deployment of MCP Servers. The new version of Nacos MCP Router introduces the protocol conversion feature, supporting one-click conversion of SSE and stdio protocol MCP Servers to StreamableHTTP protocol, as illustrated in the following workflow:

Figure 2: Nacos MCP Router Protocol Conversion Architecture

Convert stdio to StreamableHTTP Protocol


As mentioned earlier, local deployment of MCP Servers occupies local computing resources, especially when deploying multiple MCP Servers, resource usage significantly increases. To solve this issue, Nacos MCP Router provides a proxy mode. In proxy mode, users only need to configure a few environment variables, without modifying a single line of code, to convert a stdio protocol MCP Server to a StreamableHTTP protocol MCP Server with one click.

This section provides a simple demonstration of the process of converting stdio protocol to StreamableHTTP, with SSE conversion being similar. Enabling proxy mode requires setting the MODE=proxy environment variable. After specifying PROXIED_MCP_NAME, Nacos MCP Router will automatically retrieve the configuration of the target MCP server from Nacos and establish a proxy connection, seamlessly converting requests of different protocols. The entire process is completely transparent to the original MCP server, with no code modifications required.

An example of starting is as follows:

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

Below is an example using Gaode Map to demonstrate how to convert a stdio protocol MCP Server to a StreamableHTTP protocol MCP Server.
1.Start the latest version of Nacos Server; for simplicity, start it in standalone mode.

git clone 
sh $NACOS_DIR/bin/startup.sh -m standalone

2.Register Gaode MCP in Nacos.

3.Start Nacos MCP Router in proxy mode.

docker run -i --rm --network host -e NACOS_ADDR=127.0.0.1:8848 -e NACOS_USERNAME=nacos -e NACOS_PASSWORD=nacos -e TRANSPORT_TYPE=streamable_http -e MODE=proxy -e PROXIED_MCP_NAME=amap-mcp-server  nacos/nacos-mcp-router:latest

4.CherryStudio uses StreamableHTTP.

a.Set MCP to specify StreamableHTTP; after saving, the tool list will be visible.

b.Using MCP.

Support for Docker Deployment: More Secure, No Need to Worry About Dependencies


Containerized deployment has become the standard approach for modern application delivery. The new version of Nacos MCP Router supports deployment with Docker images, which can be combined with K8s and other deployment platforms to further simplify operational complexity. The Docker image includes common dependencies for MCP, such as Python and Node, so users do not need to be concerned about dependency issues. At the same time, running MCP Servers in containers enhances system security. With the official Docker image, developers can start MCP services with just one command:
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

For scenarios requiring protocol conversion, this can also be easily achieved via 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=streamable_http -e MODE=proxy -e PROXIED_MCP_NAME=$PROXIED_MCP_NAME nacos-mcp-router:latest

Conclusion: Embrace Change and Co-Build the Ecosystem


The release of the new version of Nacos MCP Router marks a significant step forward in making the MCP service ecosystem more open, flexible, and efficient. Features such as multi-protocol support, protocol conversion, and Docker deployment not only enhance the developer experience but also lay the foundation for the wide application and prosperous ecosystem of MCP services.

We believe that with the application of these new features, more innovative MCP services will emerge, bringing more possibilities for cloud-native application development. We also look forward to feedback and contributions from the community to jointly promote the development of Nacos MCP Router and the entire MCP ecosystem. In the future, we hope that Nacos MCP Router can become a distribution and scheduling platform for MCP Servers, providing powerful intelligent MCP scheduling capabilities for AI agents.

0 1 0
Share on

You may also like

Comments