Skip to main content
Glama
nacos-group

Nacos MCP Server

Official
by nacos-group

get_config

Retrieve configuration details from Nacos by specifying group name and data ID to access application settings and parameters.

Instructions

This interface retrieves the details of the specified configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceIdNoThe namespaceId of configs, default is `public` if missing
groupNameYesThe groupName of config, Required.
dataIdYesThe dataId of config, Required.

Implementation Reference

  • Handler case in call_tool function that executes the get_config tool by fetching the API URL and making an HTTP GET request to Nacos with the input arguments.
    case nacos_tools.NacosToolNames.GET_CONFIG: url = nacos_tools.NacosGetConfig().url result = nacos.get(name, url, arguments) return [types.TextContent(type="text", text=result)]
  • NacosGetConfig class defining the tool schema, input parameters (namespaceId, groupName, dataId), description, and the Nacos API endpoint URL.
    class NacosGetConfig(NacosTool): def __init__(self): super().__init__( name=NacosToolNames.GET_CONFIG, description="This interface retrieves the details of the specified configuration.", inputSchema={ "type": "object", "properties": { "namespaceId": {"type": "string", "description": "The namespaceId of configs, default is `public` if missing"}, "groupName": {"type": "string", "description": "The groupName of config, Required."}, "dataId": {"type": "string", "description": "The dataId of config, Required."} }, "required": ["groupName", "dataId"], }, url="/nacos/v3/admin/cs/config" )
  • Registration of the get_config tool (NacosGetConfig) in the list_tools handler, returned as part of the available tools list.
    return [ nacos_tools.NacosListNamespacesTool(), nacos_tools.NacosListServices(), nacos_tools.NacosGetService(), nacos_tools.NacosListInstances(), nacos_tools.NacosListServiceSubscribers(), nacos_tools.NacosListConfigs(), nacos_tools.NacosGetConfig(), nacos_tools.NacosListConfigHistory(), nacos_tools.NacosGetConfigHistory(), nacos_tools.NacosListConfigListeners(), nacos_tools.NacosListListenedConfigs(), ]
  • Enum definition mapping NacosToolNames.GET_CONFIG to the string 'get_config' used for tool identification.
    GET_CONFIG = "get_config",

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/nacos-group/nacos-mcp-server'

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