{"record":{"id":"33161701603e5bd7","repo":"BerriAI/litellm","slug":"mcp-registry-is-not-enabled","errorCode":null,"errorMessage":"MCP registry is not enabled","messagePattern":"MCP registry is not enabled","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"litellm/proxy/management_endpoints/mcp_management_endpoints.py","lineNumber":941,"sourceCode":"        \"/network/client-ip\",\n        tags=[\"mcp\"],\n        dependencies=[Depends(user_api_key_auth)],\n        description=\"Returns the caller's IP address as seen by the proxy.\",\n    )\n    async def get_client_ip(request: Request):\n        from litellm.proxy.auth.ip_address_utils import IPAddressUtils\n\n        client_ip: Final = IPAddressUtils.get_mcp_client_ip(request)\n        return {\"ip\": client_ip}\n\n    @router.get(\n        \"/registry.json\",\n        tags=[\"mcp\"],\n        description=\"MCP registry endpoint. Spec: https://github.com/modelcontextprotocol/registry\",\n    )\n    async def get_mcp_registry(request: Request):\n        if not _is_public_registry_enabled():\n            raise HTTPException(\n                status_code=status.HTTP_404_NOT_FOUND,\n                detail=\"MCP registry is not enabled\",\n            )\n\n        from litellm.proxy.auth.ip_address_utils import IPAddressUtils\n\n        client_ip: Final = IPAddressUtils.get_mcp_client_ip(request)\n\n        verbose_proxy_logger.debug(\"MCP registry request from IP=%s\", client_ip)\n\n        base_url: Final = get_request_base_url(request)\n        registry_servers: Final[list[dict[str, _McpRegistryEntry]]] = []\n        registry_servers.append({\"server\": _build_builtin_registry_entry(base_url)})\n\n        # Centralized IP-based filtering: external callers only see public servers\n        registered_servers: Final = list(global_mcp_server_manager.get_filtered_registry(client_ip).values())\n\n        registered_servers.sort(key=_build_mcp_registry_server_name)","sourceCodeStart":923,"sourceCodeEnd":959,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/mcp_management_endpoints.py#L923-L959","documentation":"Feature-flag guard on GET /v1/mcp/registry.json: the MCP registry endpoint was requested but the registry feature is not enabled in the proxy config, so there is no registry document to serve. Fires regardless of caller permissions.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/mcp_management_endpoints.py:941 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable the MCP registry in the proxy configuration.","Use config.yaml-declared MCP servers if the registry is intentionally disabled."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}