MCP Server for Nacos configuration management
Project description
jewei-mcp-nacos
Nacos MCP Server - 让 AI 助手能够查询和管理 Nacos 配置。
支持 Nacos 3.x 版本。
快速开始
Claude Code
在项目 .mcp.json 或全局 ~/.claude.json 中添加:
{
"mcpServers": {
"nacos": {
"type": "stdio",
"command": "uvx",
"args": ["jewei-mcp-nacos"],
"env": {
"NACOS_HOST": "localhost",
"NACOS_API_PORT": "8848",
"NACOS_CONSOLE_PORT": "8080",
"NACOS_USERNAME": "nacos",
"NACOS_PASSWORD": "your-password",
"NACOS_NAMESPACE": "dev"
}
}
}
}
Cursor
在 ~/.cursor/mcp.json 中添加:
{
"mcpServers": {
"nacos": {
"command": "uvx",
"args": ["jewei-mcp-nacos"],
"env": {
"NACOS_HOST": "localhost",
"NACOS_API_PORT": "8848",
"NACOS_CONSOLE_PORT": "8080",
"NACOS_USERNAME": "nacos",
"NACOS_PASSWORD": "your-password"
}
}
}
}
Windsurf
在 ~/.codeium/windsurf/mcp_config.json 中添加:
{
"mcpServers": {
"nacos": {
"command": "uvx",
"args": ["jewei-mcp-nacos"],
"env": {
"NACOS_HOST": "localhost",
"NACOS_API_PORT": "8848",
"NACOS_CONSOLE_PORT": "8080"
}
}
}
}
Claude Desktop
在 claude_desktop_config.json 中添加:
{
"mcpServers": {
"nacos": {
"command": "uvx",
"args": ["jewei-mcp-nacos"],
"env": {
"NACOS_HOST": "localhost",
"NACOS_API_PORT": "8848",
"NACOS_CONSOLE_PORT": "8080",
"NACOS_USERNAME": "nacos",
"NACOS_PASSWORD": "your-password"
}
}
}
}
环境变量
| 变量 | 说明 | 默认值 |
|---|---|---|
NACOS_HOST |
Nacos 服务地址 | localhost |
NACOS_API_PORT |
API 端口(用于登录) | 8848 |
NACOS_CONSOLE_PORT |
Console 端口(用于配置操作) | 8080 |
NACOS_USERNAME |
用户名(可选) | - |
NACOS_PASSWORD |
密码(可选) | - |
NACOS_NAMESPACE |
默认命名空间 ID | public |
NACOS_READ_ONLY |
只读模式,禁用发布功能 | false |
可用工具
| 工具 | 说明 |
|---|---|
nacos_get_config |
获取配置内容 |
nacos_publish_config |
发布/更新配置(只读模式下不可用) |
提示示例
配置好后,你可以这样和 AI 对话:
查询配置:
帮我获取 Nacos 中 dataId 为 "application.yaml" 的配置
查看 nacos 里 user-service.yml 的配置内容,namespace 是 dev
获取 gateway 的配置,分组是 PROD_GROUP
发布配置:
把下面这段配置发布到 Nacos,dataId 是 "redis.yaml":
server:
port: 6379
更新 user-service 的配置,把数据库端口改成 3307
只读模式
设置 NACOS_READ_ONLY=true 可以禁用发布功能,只允许查询配置。适合生产环境使用。
{
"env": {
"NACOS_READ_ONLY": "true"
}
}
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jewei_mcp_nacos-0.1.1.tar.gz.
File metadata
- Download URL: jewei_mcp_nacos-0.1.1.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95892c1957a7ba6683ab7592e303e154564ef1e8bc6f4c8571e5b64a7a387e0c
|
|
| MD5 |
b4da00a111a3fefb8a8b2b0590798d02
|
|
| BLAKE2b-256 |
dbc2c3e673bafc6eee6137178a5478926d215f16b3796427b833a7f8396339f5
|
Provenance
The following attestation bundles were made for jewei_mcp_nacos-0.1.1.tar.gz:
Publisher:
publish.yml on jeweis/jewei-mcp-nacos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jewei_mcp_nacos-0.1.1.tar.gz -
Subject digest:
95892c1957a7ba6683ab7592e303e154564ef1e8bc6f4c8571e5b64a7a387e0c - Sigstore transparency entry: 833712643
- Sigstore integration time:
-
Permalink:
jeweis/jewei-mcp-nacos@bfa30694713ea1f3fa1a49a9f43fc301c3bd7a9b -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/jeweis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bfa30694713ea1f3fa1a49a9f43fc301c3bd7a9b -
Trigger Event:
push
-
Statement type:
File details
Details for the file jewei_mcp_nacos-0.1.1-py3-none-any.whl.
File metadata
- Download URL: jewei_mcp_nacos-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac7244497145afab5d36f43bcd037b3a9ef8f4574732ff23c8d69f00b7276aba
|
|
| MD5 |
10b2fbdeaa44333202a345f8ed67d3cb
|
|
| BLAKE2b-256 |
7f0832920c9c08059662bfae71ca45ba7ff6567dd17592dbd0209c63abf9f1c0
|
Provenance
The following attestation bundles were made for jewei_mcp_nacos-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on jeweis/jewei-mcp-nacos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jewei_mcp_nacos-0.1.1-py3-none-any.whl -
Subject digest:
ac7244497145afab5d36f43bcd037b3a9ef8f4574732ff23c8d69f00b7276aba - Sigstore transparency entry: 833712644
- Sigstore integration time:
-
Permalink:
jeweis/jewei-mcp-nacos@bfa30694713ea1f3fa1a49a9f43fc301c3bd7a9b -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/jeweis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bfa30694713ea1f3fa1a49a9f43fc301c3bd7a9b -
Trigger Event:
push
-
Statement type: