
Nacos MCP Server
概览
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 is for Nacos interaction and automation. This server provides tools to search and read namespace, service and configuration relative information in Nacos Cluster via Large Language Models. Please note that mcp-server-nacos is currently in early development. The functionality and available tools are subject to change and expansion as we continue to develop and improve the server. And also note that mcp-server-nacos only provide read, search and list operation, not support any write operation for current version. Write operation is planning supported in future versions. One more note that this mcp-server-nacos required version: 1. list_namespaces - Retrieves the list of namespaces in the current Nacos cluster.
README
以下为原文 README 节选,完整内容请查看原文。
mcp-server-nacos: A Nacos MCP server
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 is for Nacos interaction and automation. This server provides tools to search and read namespace, service and configuration relative information in Nacos Cluster via Large Language Models.
Please note that mcp-server-nacos is currently in early development. The functionality and available tools are subject to change and expansion as we continue to develop and improve the server. And also note that mcp-server-nacos only provide read, search and list operation, not support any write operation for current version. Write operation is planning supported in future versions.
One more note that this mcp-server-nacos required version:
1. Nacos version required upper `3.0.0`, because of depended on the [Nacos Admin API](https://nacos.io/en/swagger/admin/) in 3.x.
2. python version required 3.x, recommend upper `3.13`.
Tools
list_namespaces- Retrieves the list of namespaces in the current Nacos cluster.
- Input:
- None
- Returns: list of namespaces in the current Nacos cluster.
list_services- This tool retrieves the list of services under a specified namespace. The response format depends on the
withInstancesparameter:withInstances=true: Returns service details with instances (ServiceDetailInfoobjects).withInstances=false: Returns service metadata without instances (ServiceViewobjects). **NOTE: ** WhenwithInstances=true, The API may cost too much memory and networks, If Only want get instance list with little or one service, Suggest usewithInstances=falsewithList Service Instances. - Input:
pageNo(number): The current page number, default is 1.pageSize(number): The size of services in each page, default is 100.namespaceId(string, optional): The namespaceId of services, default ispublicif missing.groupNameParam(string, optional): The groupName pattern of services, default null means all group if missing.serviceNameParam(string, optional): The serviceName pattern of services, default null means all service if missing.ignoreEmptyService(bool, optional): Whether ignore the empty service in result, default is true.withInstances(bool, optional): Whether contain instances under each services in result, recommend and default is false.
- Returns: list of services under a specified namespace.
- This tool retrieves the list of services under a specified namespace. The response format depends on the
get_service- This tool retrieves detailed information of a specified service, including metadata and clusters, not including instance list.
- Input:
namespaceId(string, optional): The namespaceId of services, default ispublicif missing.
安装
uvx nacos-mcp-server --host your_nacos_host --port your_nacos_main_port such as 8848 --access_token your_nacos_access_token get from `login` api: /nacos/v3/auth/user/login with `username` and `password`配置
"mcpServers": {
"git": {
"command": "uvx",
"args": [
"nacos-mcp-server",
"--host",
"your_nacos_host",
"--port",
"your_nacos_main_port, such as 8848",
"--access_token",
"your_nacos_access_token, get from `login` api: /nacos/v3/auth/user/login with `username` and `password`"
],
}
}