Skip to main content

nacos-mcp-py

基于 nacos-sdk-python 的 Nacos MCP Server,支持多环境配置读取与 Spring Cloud 项目配置发现。

功能

  • nacos_get_config — 按 dataId + group 读取配置内容
  • nacos_list_configs — 按 group 列出配置列表
  • nacos_discover_configs — 扫描 Spring Cloud 项目配置文件,自动发现并读取 Nacos 配置
  • nacos_list_environments — 查看已配置的环境列表

安装

pip install nacos-mcp-py
# 或
uv tool install nacos-mcp-py

配置

通过环境变量 NACOS_SERVERS 配置多环境 Nacos 连接:

export NACOS_SERVERS='{
  "test": {
    "host": "mse-xxx.mse.aliyuncs.com",
    "port": 8848,
    "namespace": "ns-id",
    "accessKey": "your-ak",
    "secretKey": "your-sk"
  }
}'

使用

作为 MCP Server 运行:

nacos-mcp-py

在 Claude Code 的 ~/.claude.json 中配置:

{
  "mcpServers": {
    "nacos-mcp-py": {
      "command": "nacos-mcp-py",
      "env": {
        "NACOS_SERVERS": "{\"test\": {\"host\": \"...\", \"port\": 8848, \"namespace\": \"...\", \"accessKey\": \"...\", \"secretKey\": \"...\"}}"
      }
    }
  }
}

然后在对话中:

  • "读取 Nacos 配置 dataId=system.properties group=financeServer"
  • "列出 financeServer 分组的所有配置"
  • "扫描这个项目目录 /path/to/project 自动发现 Nacos 配置"

Release files for nacos-mcp-py 0.2.0

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-py 0.2.0
File Size Uploaded
nacos_mcp_py-0.2.0.tar.gz 153.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nacos-mcp-py 0.2.0
File Interpreter ABI Platform
nacos_mcp_py-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 159.8 kB

Release files / nacos_mcp_py-0.2.0.tar.gz

Download URL nacos_mcp_py-0.2.0.tar.gz
Size 153.1 kB
Tags Source
SHA-256 checksum
How to use checksums
18cecfe2d028372d3336f28a76b5076a2d5807d32ed642b814c7164e1c0159f4
BLAKE2b-256 checksum
How to use checksums
42e7223d6edac5af306984670ed20169a5eca06d51ad7322b7213f6806d85b02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.13

Release files / nacos_mcp_py-0.2.0-py3-none-any.whl

Download URL nacos_mcp_py-0.2.0-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e793b7b74b213eb1edb22574d28f0fcd10585f967187e06d205a8299686fdbf
BLAKE2b-256 checksum
How to use checksums
04407880fb7ed76a90de2598c7f6ebd3b4ddea7d83177933b50ac49ef767a410
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.13

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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