Skip to main content
Glama
nacos-group

Nacos MCP Server

Official
by nacos-group

list_listened_configs

Retrieve configurations subscribed to by a specific client IP address to monitor active listeners and their namespace settings.

Instructions

This interface lists the configurations subscribed to by a specific client IP address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceIdNoThe namespaceId of configs, default is `public` if missing
ipYesThe client ip of config listeners, Required.
aggregationNoWhether aggregation from whole cluster, if `false`, only get listeners from requested node, default `true` if missing

Implementation Reference

  • Executes the list_listened_configs tool by instantiating the tool class to get the Nacos API URL, then calling nacos.get() to perform the HTTP GET request with arguments and return the result as text content.
    case nacos_tools.NacosToolNames.LIST_LISTENED_CONFIGS: url = nacos_tools.NacosListListenedConfigs().url result = nacos.get(name, url, arguments) return [types.TextContent(type="text", text=result)]
  • Defines the MCP Tool object for 'list_listened_configs' including name, description, input schema (namespaceId optional, ip required, aggregation optional), and the target Nacos API endpoint.
    class NacosListListenedConfigs(NacosTool): def __init__(self): super().__init__( name=NacosToolNames.LIST_LISTENED_CONFIGS, description="This interface lists the configurations subscribed to by a specific client IP address.", inputSchema={ "type": "object", "properties": { "namespaceId": {"type": "string", "description": "The namespaceId of configs, default is `public` if missing"}, "ip": {"type": "string", "description": "The client ip of config listeners, Required."}, "aggregation": {"type": "bool", "description": "Whether aggregation from whole cluster, if `false`, only get listeners from requested node, default `true` if missing"} }, "required": ["ip"], }, url="/nacos/v3/admin/cs/listener" )
  • Registers the list_listened_configs tool (via NacosListListenedConfigs instance) in the MCP server's list_tools handler, making it available to clients.
    @server.list_tools() async def handle_list_tools() -> list[types.Tool]: """List available tools""" 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(), ]
  • Defines the tool name constant in NacosToolNames enum, used for matching in handler and registration.
    LIST_LISTENED_CONFIGS = "list_listened_configs",

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