Skip to main content
Glama
jeweis

jewei-mcp-nacos

by jeweis

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"
      }
    }
  }
}

Related MCP server: Metabase MCP Plus

环境变量

变量

说明

默认值

NACOS_HOST

Nacos 服务地址

localhost

NACOS_PORT

API 端口(仅 v1/v2 使用,v1/v2 必填)

8848

NACOS_API_PORT

API 端口(用于登录,仅 v3 使用,v3 必填)

8848

NACOS_CONSOLE_PORT

Console 端口(用于配置操作,仅 v3 使用,v3 必填)

8080

NACOS_USERNAME

用户名(可选)

-

NACOS_PASSWORD

密码(可选)

-

NACOS_NAMESPACE

默认命名空间 ID(当 NACOS_VERSION=1 时表示 Nacos 的命名空间 ID 字段)

public

NACOS_VERSION

Nacos 版本(1/2/3),默认 3

3

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

Available Tools

2 tools
nacos_get_configB
Read-onlyIdempotent

获取 Nacos 配置内容。

从 Nacos 配置中心获取指定的配置内容。

参数:
    params: 包含以下内容的验证输入参数:
        - data_id: 配置 ID
        - group_name: 配置分组,默认 DEFAULT_GROUP
        - namespace_id: 命名空间 ID,可选
        - response_format: 输出格式,markdown 或 json

返回:
    配置内容(Markdown 或 JSON 格式)
ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds minimal behavioral context beyond what annotations provide. Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=true, so the agent knows this is a safe, idempotent read operation. The description mentions the return format options (Markdown or JSON), which adds some value, but doesn't describe error conditions, rate limits, authentication needs, or what happens when configurations don't exist. No contradiction with annotations exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is reasonably concise but has structural issues. The first two sentences are somewhat redundant. The parameter and return sections are clearly labeled but could be more efficiently integrated. While not verbose, it could be more front-loaded with critical information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (retrieving configurations with multiple parameters), rich annotations, and the presence of an output schema, the description is minimally adequate. It covers the basic purpose and parameters but lacks usage context, error handling information, and behavioral details that would help an agent use it effectively in various scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description carries the full burden of parameter documentation. It lists all 4 parameters (data_id, group_name, namespace_id, response_format) with brief explanations and defaults, which compensates well for the schema's lack of descriptions. However, it doesn't provide examples or detailed constraints beyond what's obvious from parameter names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '获取 Nacos 配置内容' (Get Nacos configuration content) and '从 Nacos 配置中心获取指定的配置内容' (Get specified configuration content from Nacos configuration center). It uses specific verbs ('获取' - get/retrieve) and identifies the resource (Nacos configuration). However, it doesn't explicitly differentiate from its sibling 'nacos_publish_config' beyond the obvious get vs. publish distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention the sibling tool 'nacos_publish_config' or any other alternatives. There's no information about prerequisites, when this tool is appropriate versus other configuration retrieval methods, or any usage constraints beyond what's implied by the parameters.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

nacos_publish_configA
Idempotent

发布 Nacos 配置。

    创建新配置或更新已有配置。

    参数:
        params: 包含以下内容的验证输入参数:
            - data_id: 配置 ID
            - group_name: 配置分组,默认 DEFAULT_GROUP
            - namespace_id: 命名空间 ID,可选
            - content: 配置内容
            - config_type: 配置类型,默认 yaml
            - desc: 配置描述,可选

    返回:
        发布结果
    
ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations provide readOnlyHint=false, openWorldHint=true, idempotentHint=true, and destructiveHint=false. The description adds value by clarifying the dual behavior ('创建新配置或更新已有配置' - creates new or updates existing), which isn't captured in annotations. It doesn't mention authentication needs, rate limits, or side effects beyond the core operation, but with annotations covering safety and idempotency, this is sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections for purpose, parameters, and return. It's front-loaded with the core purpose. Some redundancy exists (e.g., repeating parameter names in description vs. schema), but overall it's efficient and readable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (mutation operation with multiple parameters), annotations cover safety and idempotency, and an output schema exists (so return values are documented elsewhere). The description provides adequate context on purpose and parameters. It could improve by mentioning the sibling tool for better guidance, but it's largely complete for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description compensates by listing all parameters with brief explanations and defaults. However, it doesn't add significant meaning beyond what's implied by parameter names (e.g., 'data_id' as configuration ID). The schema itself has detailed property descriptions, so the description provides basic orientation but minimal extra semantic value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('发布' - publish) and resource ('Nacos 配置' - Nacos configuration), specifying it creates new configurations or updates existing ones. This distinguishes it from the sibling tool 'nacos_get_config' which presumably only retrieves configurations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through '创建新配置或更新已有配置' (creates new configurations or updates existing ones), suggesting this is for configuration management. However, it doesn't explicitly state when to use this versus alternatives or any prerequisites. The presence of a sibling tool 'nacos_get_config' isn't leveraged for comparative guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.4/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: one retrieves configuration content from Nacos, while the other publishes/updates configuration. There is no overlap in functionality, and the descriptions clearly differentiate between read and write operations.

Naming Consistency5/5

Both tools follow a consistent naming pattern: 'nacos_' prefix followed by verb_noun (get_config, publish_config). This pattern is uniform across all tools, making them easily identifiable and predictable.

Tool Count2/5

With only two tools, this server feels severely under-scoped for managing a configuration system like Nacos. Essential operations like listing configurations, deleting configurations, or monitoring changes are missing, making the toolset incomplete for typical configuration management workflows.

Completeness2/5

The toolset covers basic get and publish operations but lacks critical CRUD/lifecycle coverage for a configuration management system. There are no tools for listing available configurations, deleting configurations, or handling configuration versioning, which are standard needs in this domain.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    A server that enables interaction with Nacos service discovery and configuration management through Large Language Models, providing read-only access to namespaces, services, and configurations.
    11
    11
    Apache 2.0
  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that enables AI assistants to query databases, execute SQL, and manage Metabase resources like dashboards, cards, and collections through natural language.
    22
    MIT
  • A
    license
    A
    quality
    C
    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
    16
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    An MCP server that enables AI assistants to search, read, and manage files across multiple cloud drives (Baidu, Aliyun, 115, OneDrive, Quark) through a unified interface.
    19
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jeweis/jewei-mcp-nacos'

If you have feedback or need assistance with the MCP directory API, please join our Discord server