mcpField
J
Jewei Mcp Nacos

Jewei Mcp Nacos

Local
github.com/jeweisCloud & Infra3Updated 41w ago

About Jewei Mcp Nacos

Jewei Mcp Nacos is an MCP server for AI assistants to query and manage Nacos configuration across Nacos 1.x, 2.x, and 3.x. It supports configuration lookup and, unless read-only mode is enabled, publishing or updating configurations.

Key features

  1. 01Query Nacos configurations
  2. 02Publish or update configurations
  3. 03Support Nacos 1.x, 2.x, and 3.x
  4. 04Enable read-only mode

Use cases

  1. 01Inspect a configuration by dataId
  2. 02Query configurations by namespace or group
  3. 03Update a service configuration
  4. 04Restrict access to reads in production

MCP support

The MCP server exposes configuration retrieval and publishing tools to MCP clients. Publishing is disabled in read-only mode.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"jewei-mcp-nacos": {
"command": "uvx",
"args": [
"jewei-mcp-nacos"
],
"env": {
"NACOS_HOST": "<NACOS_HOST>",
"NACOS_API_PORT": "<NACOS_API_PORT>",
"NACOS_CONSOLE_PORT": "<NACOS_CONSOLE_PORT>",
"NACOS_USERNAME": "<NACOS_USERNAME>",
"NACOS_PASSWORD": "<NACOS_PASSWORD>",
"NACOS_NAMESPACE": "<NACOS_NAMESPACE>",
"NACOS_VERSION": "<NACOS_VERSION>",
"NACOS_READ_ONLY": "<NACOS_READ_ONLY>"
}
}
}
}
Run commanduvx jewei-mcp-nacos
Environment variables to set
NACOS_HOST
NACOS_API_PORT
NACOS_CONSOLE_PORT
NACOS_USERNAME
NACOS_PASSWORDSecret
NACOS_NAMESPACE
NACOS_VERSION
NACOS_READ_ONLY

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypijewei-mcp-nacos

Tools

2

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
paramsanyYes

Details

From the project README

jewei-mcp-nacos

Nacos MCP Server - 让 AI 助手能够查询和管理 Nacos 配置。

支持 Nacos 1.x/2.x/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",
        "NACOS_VERSION": "3",
        "NACOS_READ_ONLY": "false"
      }
    }
  }
}
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_NAMESPACE": "dev",
        "NACOS_VERSION": "3",
        "NACOS_READ_ONLY": "false"
      }
    }
  }
}
OpenCode

在 ~/.opencode/opencode.json 中添加:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "nacos": {
      "type": "local",
      "command": ["uvx", "jewei-mcp-nacos"],
      "enabled": true,
      "environment": {
        "NACOS_HOST": "localhost",
        "NACOS_API_PORT": "8848",
        "NACOS_CONSOLE_PORT": "8080",
        "NACOS_NAMESPACE": "dev",
        "NACOS_VERSION": "3",
        "NACOS_READ_ONLY": "false"
      }
    }
  }
}
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_NAMESPACE": "dev",
        "NACOS_VERSION": "3",
        "NACOS_READ_ONLY": "false"
      }
    }
  }
}

环境变量

变量说明默认值
NACOS_HOSTNacos 服务地址localhost
NACOS_PORTAPI 端口(仅 v1/v2 使用,v1/v2 必填)8848
NACOS_API_PORTAPI 端口(用于登录,仅 v3 使用,v3 必填)8848
NACOS_CONSOLE_PORTConsole 端口(用于配置操作,仅 v3 使用,v3 必填)8080
NACOS_USERNAME用户名(可选)-
NACOS_PASSWORD密码(可选)-
NACOS_NAMESPACE默认命名空间 ID(当 NACOS_VERSION=1 时表示 Nacos 的命名空间 ID 字段)public
NACOS_VERSIONNacos 版本(1/2/3),默认 33
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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.