Skip to main content
Glama
Nacos MCP Server

Nacos MCP Server

Official
by nacos-group

mcp-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`.

ツール

  1. list_namespaces

    • 現在の Nacos クラスター内の名前空間のリストを取得します。

    • 入力:

      • なし

    • 返される値: 現在の Nacos クラスター内の名前空間のリスト。

  2. list_services

    • このツールは、指定された名前空間の下にあるサービスのリストを取得します。レスポンスの形式は、 withInstancesパラメータによって異なります。withInstances withInstances=true :インスタンス( ServiceDetailInfoオブジェクト)を含むサービスの詳細を返します。withInstances withInstances=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。

    • 返される値: 指定された名前空間の下にあるサービスのリスト。

  3. get_service

    • このツールは、インスタンス リストを除くメタデータやクラスターなど、指定されたサービスの詳細情報を取得します。

    • 入力:

      • namespaceId (文字列、オプション): サービスの namespaceId。指定されていない場合は、デフォルトはpublicです。

      • groupName (文字列、オプション): サービスの groupName パターン。指定されていない場合は、デフォルトはDEFAULT_GROUPです。

      • serviceName (文字列): サービスの serviceName パターン (必須)。

    • 返される値: 指定されたサービスの詳細情報。

  4. list_service_instances

    • このツールは、指定されたサービスのインスタンスのリストを取得します。

    • 入力:

      • namespaceId (文字列、オプション): サービスの namespaceId。指定されていない場合は、デフォルトはpublicです。

      • groupName (文字列、オプション): サービスの groupName パターン。指定されていない場合は、デフォルトはDEFAULT_GROUPです。

      • serviceName (文字列): サービスの serviceName パターン (必須)。

      • clusterName (文字列、オプション): サービス内のインスタンスのクラスター名。オプションで、デフォルトは null で、すべてのクラスターに一致することを意味します。

    • 戻り値: 指定されたサービスのインスタンスのリスト。

  5. list_service_subscribers

    • このツールは、指定されたサービスの加入者のリストを取得します。

    • 入力:

      • pageNo (数値): 現在のページ番号。デフォルトは 1 です。

      • pageSize (数値): 各ページのサービス サブスクライバーのサイズ。デフォルトは 100 です。

      • namespaceId (文字列、オプション): サービスの namespaceId。指定されていない場合は、デフォルトはpublicです。

      • groupName (文字列、オプション): サービスの groupName パターン。指定されていない場合は、デフォルトはDEFAULT_GROUPです。

      • serviceName (文字列): サービスの serviceName パターン (必須)。

      • aggregation (bool、オプション): クラスター全体からの集約かどうか。

    • 返される値: 指定されたサービスの加入者のリスト。

  6. 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 。

    • 戻り値: 指定された名前空間の下にある構成のリスト。

  7. get_config

    • 指定された構成の詳細を取得します。

    • 入力:

      • namespaceId (文字列、オプション): 構成の namespaceId。指定されていない場合はデフォルトはpublicです。

      • groupName (文字列): 構成のグループ名。必須。

      • dataId (文字列): 構成の dataId。必須。

    • 返される値: 指定された構成の詳細。

  8. list_config_history

    • このツールは、構成の完全な公開履歴を取得します。

    • 入力:

      • pageNo (数値): 現在のページ番号。デフォルトは 1 です。

      • pageSize (数値): 各ページの構成履歴レコードのサイズ。デフォルトは 100 です。

      • namespaceId (文字列、オプション): 構成の namespaceId。指定されていない場合はデフォルトはpublicです。

      • groupName (文字列): 構成のグループ名。必須。

      • dataId (文字列): 構成の dataId。必須。

    • 戻り値: 指定された名前空間の下にある構成のリスト。

  9. get_config_history

    • 構成の特定の履歴変更レコードを取得します。

    • 入力:

      • namespaceId (文字列、オプション): 構成の namespaceId。指定されていない場合はデフォルトはpublicです。

      • groupName (文字列): 構成のグループ名。必須。

      • dataId (文字列): 構成の dataId。必須。

      • nid (数値): 構成履歴レコードの実際の ID、リスト構成履歴ツールのidフィールドから取得します。

    • 返される値: 構成の履歴変更レコード。

  10. list_config_listeners

  • 特定の構成にサブスクライブされているリスナーのリストを取得します。

  • 入力:

    • namespaceId (文字列、オプション): 構成の namespaceId。指定されていない場合はデフォルトはpublicです。

    • groupName (文字列): 構成のグループ名。必須。

    • dataId (文字列): 構成の dataId。必須。

    • aggregation (bool、オプション): クラスター全体からの集約かどうか。

  • 返される値: 特定の構成にサブスクライブされているリスナーのリスト。

  1. 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`"
      ],
  }
}

発達

ローカル開発を行う場合は、次の手順に従ってください。

  1. このリポジトリをローカル環境にクローンします。

  2. 必要な機能を実装するには、 src/mcp_server_nacos内のコードを変更します。

  3. 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 tools
get_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

    A3.6/5.0

    Scored across 11 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A server that enables LLMs to interact with Lark/Feishu services, currently supporting employee information queries via Lark's Contact API.
      3
      -
    • A
      license
      B
      quality
      D
      maintenance
      An 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.
      2
      3
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server that exposes all AgileConfig RESTful APIs as tools, enabling AI assistants to manage configuration, applications, users, nodes, and more via natural language.
      36
      8 npm
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to query and manage Nacos configurations, supporting Nacos 1.x/2.x/3.x with multiple transport protocols.
      7
      51 PyPI
      1
      MIT