Nacos MCP Server
Officialmcp-server-nacos: Nacos MCP サーバー
概要
Nacosは、動的なサービスの検出と構成、そしてサービス管理のために設計された、使いやすいプラットフォームです。クラウドネイティブアプリケーションとマイクロサービスプラットフォームを容易に構築できます。
このMCP(モデルコンテキストプロトコル)サーバーは、Nacosのインタラクションと自動化を目的としています。このサーバーは、大規模言語モデルを介してNacosクラスター内のnamespace 、 service 、およびconfiguration関連情報を検索および読み取るためのツールを提供します。
mcp-server-nacos現在開発初期段階にあります。サーバーの開発と改良に伴い、機能と利用可能なツールは変更および拡張される可能性があります。また、 mcp-server-nacos現在のバージョンでは読み取り、検索、リスト操作のみをサポートしており、書き込み操作はサポートしていません。書き込み操作は将来のバージョンでサポートされる予定です。
このmcp-server-nacos必要なバージョンについてもう 1 つ注意すべき点があります。
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`.ツール
list_namespaces現在の Nacos クラスター内の名前空間のリストを取得します。
入力:
なし
返される値: 現在の Nacos クラスター内の名前空間のリスト。
list_servicesこのツールは、指定された名前空間の下にあるサービスのリストを取得します。レスポンスの形式は、
withInstancesパラメータによって異なります。withInstanceswithInstances=true:インスタンス(ServiceDetailInfoオブジェクト)を含むサービスの詳細を返します。withInstanceswithInstances=false:インスタンス(ServiceViewオブジェクト)を含まないサービスメタデータを返します。**注意:**withInstances=trueの場合、APIのメモリとネットワーク負荷が過度に高くなる可能性があります。少数のサービス、または1つのサービスのみを含むインスタンスリストを取得する場合は、List Service InstancesでwithInstances=false使用することをお勧めします。入力:
pageNo(数値): 現在のページ番号。デフォルトは 1 です。pageSize(数値): 各ページのサービスのサイズ。デフォルトは 100 です。namespaceId(文字列、オプション): サービスの namespaceId。指定されていない場合は、デフォルトはpublicです。groupNameParam(文字列、オプション): サービスの groupName パターン。デフォルトは null で、存在しない場合はすべてのグループを意味します。serviceNameParam(文字列、オプション): サービスの serviceName パターン。デフォルトは null で、存在しない場合はすべてのサービスを意味します。ignoreEmptyService(bool、オプション): 結果内の空のサービスを無視するかどうか。デフォルトは true。withInstances(bool、オプション): 結果の各サービスの下にインスタンスが含まれているかどうか。推奨。デフォルトは false。
返される値: 指定された名前空間の下にあるサービスのリスト。
get_serviceこのツールは、インスタンス リストを除くメタデータやクラスターなど、指定されたサービスの詳細情報を取得します。
入力:
namespaceId(文字列、オプション): サービスの namespaceId。指定されていない場合は、デフォルトはpublicです。groupName(文字列、オプション): サービスの groupName パターン。指定されていない場合は、デフォルトはDEFAULT_GROUPです。serviceName(文字列): サービスの serviceName パターン (必須)。
返される値: 指定されたサービスの詳細情報。
list_service_instancesこのツールは、指定されたサービスのインスタンスのリストを取得します。
入力:
namespaceId(文字列、オプション): サービスの namespaceId。指定されていない場合は、デフォルトはpublicです。groupName(文字列、オプション): サービスの groupName パターン。指定されていない場合は、デフォルトはDEFAULT_GROUPです。serviceName(文字列): サービスの serviceName パターン (必須)。clusterName(文字列、オプション): サービス内のインスタンスのクラスター名。オプションで、デフォルトは null で、すべてのクラスターに一致することを意味します。
戻り値: 指定されたサービスのインスタンスのリスト。
list_service_subscribersこのツールは、指定されたサービスの加入者のリストを取得します。
入力:
pageNo(数値): 現在のページ番号。デフォルトは 1 です。pageSize(数値): 各ページのサービス サブスクライバーのサイズ。デフォルトは 100 です。namespaceId(文字列、オプション): サービスの namespaceId。指定されていない場合は、デフォルトはpublicです。groupName(文字列、オプション): サービスの groupName パターン。指定されていない場合は、デフォルトはDEFAULT_GROUPです。serviceName(文字列): サービスの serviceName パターン (必須)。aggregation(bool、オプション): クラスター全体からの集約かどうか。
返される値: 指定されたサービスの加入者のリスト。
list_configsこのツールは、指定された名前空間の下にある構成のリストを取得します。
入力:
pageNo(数値): 現在のページ番号。デフォルトは 1 です。pageSize(数値): 各ページの構成のサイズ。デフォルトは 100 です。namespaceId(文字列、オプション): 構成の namespaceId。指定されていない場合はデフォルトはpublicです。groupName(文字列、オプション): 構成の groupName パターン。デフォルトの null はすべてのグループを意味します。dataId(文字列、オプション): 構成の dataId パターン。デフォルトの null はすべて dataId を意味します。type(文字列、オプション): 構成のタイプ。デフォルトの null はすべてのタイプを意味します。configTags(文字列、オプション): 構成のタグ。デフォルトの null はすべてのタグを意味します。appName(文字列、オプション): 構成の appName。デフォルトは null で、すべての appName を意味します。search(文字列、オプション): リスト設定の検索方法。デフォルトは、blur、オプションの値はaccurate。
戻り値: 指定された名前空間の下にある構成のリスト。
get_config指定された構成の詳細を取得します。
入力:
namespaceId(文字列、オプション): 構成の namespaceId。指定されていない場合はデフォルトはpublicです。groupName(文字列): 構成のグループ名。必須。dataId(文字列): 構成の dataId。必須。
返される値: 指定された構成の詳細。
list_config_historyこのツールは、構成の完全な公開履歴を取得します。
入力:
pageNo(数値): 現在のページ番号。デフォルトは 1 です。pageSize(数値): 各ページの構成履歴レコードのサイズ。デフォルトは 100 です。namespaceId(文字列、オプション): 構成の namespaceId。指定されていない場合はデフォルトはpublicです。groupName(文字列): 構成のグループ名。必須。dataId(文字列): 構成の dataId。必須。
戻り値: 指定された名前空間の下にある構成のリスト。
get_config_history構成の特定の履歴変更レコードを取得します。
入力:
namespaceId(文字列、オプション): 構成の namespaceId。指定されていない場合はデフォルトはpublicです。groupName(文字列): 構成のグループ名。必須。dataId(文字列): 構成の dataId。必須。nid(数値): 構成履歴レコードの実際の ID、リスト構成履歴ツールのidフィールドから取得します。
返される値: 構成の履歴変更レコード。
list_config_listeners
特定の構成にサブスクライブされているリスナーのリストを取得します。
入力:
namespaceId(文字列、オプション): 構成の namespaceId。指定されていない場合はデフォルトはpublicです。groupName(文字列): 構成のグループ名。必須。dataId(文字列): 構成の dataId。必須。aggregation(bool、オプション): クラスター全体からの集約かどうか。
返される値: 特定の構成にサブスクライブされているリスナーのリスト。
list_listened_configs
特定のクライアント IP アドレスによってサブスクライブされている構成のリストを取得します。
入力:
namespaceId(文字列、オプション): 構成の namespaceId。指定されていない場合はデフォルトはpublicです。ip(文字列): 構成リスナーのクライアント IP。必須。aggregation(bool、オプション): クラスター全体からの集約かどうか。
返される値: 特定のクライアント IP アドレスによってサブスクライブされている構成を一覧表示します。
Related MCP server: jewei-mcp-nacos
インストール
uvの使用(推奨)
uvを使用する場合、特別なインストールは必要ありません。uvx uvx使用してmcp-server-nacosを直接実行します。
PIPの使用
あるいは、pip 経由でmcp-server-nacosをインストールすることもできます。
pip install mcp-server-nacosインストール後、次のコマンドを使用してスクリプトとして実行できます。
python -m mcp_server_nacos構成
Claude Desktopでの使用
これをclaude_desktop_config.jsonに追加します:
"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`"
],
}
}
commandフィールドにuvx実行ファイルへのフルパスを入力する必要があるかもしれません。これは、MacOS/Linuxの場合はwhich uvx、Windowsの場合はwhere uvx実行することで取得できます。
"mcpServers": {
"git": {
"command": "python",
"args": [
"-m",
"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`"
],
}
}発達
ローカル開発を行う場合は、次の手順に従ってください。
このリポジトリをローカル環境にクローンします。
必要な機能を実装するには、
src/mcp_server_nacos内のコードを変更します。Claudeデスクトップアプリを使ってテストします。claude_desktop_config.jsonに以下のコードを追加してください。
{
"mcpServers": {
"mcp-server-nacos": {
"command": "uv",
"args": [
"--directory",
"/<path to mcp-server-nacos>/src/mcp_server_nacos",
"run",
"mcp-server-nacos"
]
}
}ライセンス
mcp-server-nacos は Apache 2.0 ライセンスに基づきます。つまり、Apache 2.0 ライセンスの条件に従い、ソフトウェアを自由に使用、改変、配布することができます。詳細については、プロジェクトリポジトリのLICENSEファイルをご覧ください。
Available Tools
11 toolsget_configC
This interface retrieves the details of the specified configuration.
Inputs: groupName (required), dataId (required), namespaceId.
get_config_historyB
This interface retrieves a specific historical change record of a configuration.
Inputs: groupName (required), dataId (required), namespaceId, nid.
get_serviceA
This interface retrieves detailed information of a specified service, including metadata and clusters, not including instance list.
Inputs: serviceName (required), namespaceId, groupName.
list_config_historyC
This interface retrieves the complete publish history of a configuration.
Inputs: pageNo (required), pageSize (required), groupName (required), dataId (required), +1 more.
list_config_listenersB
This interface retrieves the list of listeners subscribed to a specific configuration.
Inputs: groupName (required), dataId (required), namespaceId, aggregation.
list_configsC
This interface retrieves the list of configurations under a specified namespace.
Inputs: pageNo (required), pageSize (required), namespaceId, groupName, +5 more.
list_listened_configsC
This interface lists the configurations subscribed to by a specific client IP address.
Inputs: ip (required), namespaceId, aggregation.
list_namespacesB
Retrieves the list of namespaces in the current Nacos cluster.
Inputs: no named parameters.
list_service_instancesC
This interface retrieves the list of instances for a specified service.
Inputs: serviceName (required), namespaceId, groupName, clusterName.
list_servicesA
This interface retrieves the list of services under a specified namespace. The response format depends on the withInstances parameter:withInstances=true: Returns service details with instances (ServiceDetailInfo objects). withInstances=false: Returns service metadata without instances (ServiceView objects). **NOTE: ** When withInstances=true, The API may cost too much memory and networks, If Only want get instance list with little or one service, Suggest use withInstances=false with List Service Instances.
Inputs: pageNo (required), pageSize (required), namespaceId, groupNameParam, +3 more.
list_service_subscribersC
This interface retrieves the list of subscribers for a specified service.
Inputs: pageNo (required), pageSize (required), serviceName (required), namespaceId, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Every tool has a clearly distinct purpose targeting specific resources and actions in the Nacos domain (configurations, services, namespaces, listeners/subscribers). No tools appear to overlap or cause confusion, as each name precisely indicates its function, such as get_config vs. list_configs or get_service vs. list_services.
All tool names follow a consistent verb_noun pattern with snake_case throughout, using clear verbs like 'get', 'list', and specific nouns like 'config', 'service', 'namespace'. There are no deviations or mixed conventions, making the naming highly predictable and readable.
With 11 tools, this server is well-scoped for managing configurations and services in Nacos, covering key operations like retrieval, listing, and history tracking. Each tool earns its place without feeling excessive or insufficient for the domain's needs.
The tool set provides strong coverage for read operations on configurations, services, namespaces, and related metadata, but lacks explicit create, update, or delete tools for these resources. This minor gap means agents can query effectively but may need workarounds for full lifecycle management.
Maintenance
Related MCP Connectors
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
MCP server for AI dialogue using various LLM models via AceDataCloud
The Needle MCP server enables semantic search on documents stored in files like PDFs, DOCX, and XLSX by connecting AI applications to external data sources. It provides capabilities to create and manage document collections, perform natural language searches on stored content, and retrieve relevant information without requiring exact keyword matches.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA server that enables LLMs to interact with Lark/Feishu services, currently supporting employee information queries via Lark's Contact API.3-
- AlicenseBqualityDmaintenanceAn MCP server that enables AI assistants to query and manage Nacos configurations. It supports Nacos 3.x for retrieving or publishing configuration files and includes an optional read-only mode for secure environments.23MIT
- AlicenseAqualityDmaintenanceMCP server that exposes all AgileConfig RESTful APIs as tools, enabling AI assistants to manage configuration, applications, users, nodes, and more via natural language.368 npmMIT
- AlicenseAqualityCmaintenanceEnables AI assistants to query and manage Nacos configurations, supporting Nacos 1.x/2.x/3.x with multiple transport protocols.751 PyPI1MIT