Skip to content

feat: MCP server discovery UI - #21079

Merged
ishaan-jaff merged 12 commits into
mainfrom
litellm_mcp_discovery
Feb 13, 2026
Merged

feat: MCP server discovery UI#21079
ishaan-jaff merged 12 commits into
mainfrom
litellm_mcp_discovery

Conversation

@ishaan-jaff

Copy link
Copy Markdown
Contributor

Summary

  • Adds a curated MCP server registry (mcp_registry.json) with 31 well-known MCP servers (GitHub, Atlassian, Slack, Snowflake, PostgreSQL, etc.) including icons, categories, and transport configs
  • Adds GET /v1/mcp/discover admin endpoint to serve the registry with query/category filtering
  • Adds a discovery modal to the MCP management UI — clicking "+ Add New MCP Server" now shows a compact, searchable list of well-known servers grouped by category
  • Clicking a server pre-fills the create form with its config; "+ Custom Server" opens the blank form
  • "Browse MCP Registry" link in create form navigates back to discovery
  • HTTP URLs set for GitHub (mcp.github.com), Atlassian (mcp.atlassian.com), Sentry (mcp.sentry.dev), Snowflake (managed MCP), and Cloudflare (mcp.cloudflare.com)

Test plan

  • pytest tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_discovery.py -v — 15 tests passing
  • Manual: open MCP Servers → + Add New MCP Server → discovery modal appears
  • Manual: filter by category, search by name
  • Manual: click a server card → create form pre-filled
  • Manual: click + Custom Server → blank create form
  • Manual: click "Browse MCP Registry" in create form → back to discovery

Curated list of 31 well-known MCP servers with names, icons,
categories, transport config, and registry URLs. Includes HTTP
endpoints for GitHub, Atlassian, Sentry, Snowflake, and Cloudflare.
Admin-only endpoint that serves the curated MCP registry with
optional query and category filters. Used by the UI discovery modal.
Compact list-row layout with category filters, search, and
grouped server list. Follows dev-tool aesthetic.
Add MCP Server button now opens discovery modal. Card click
pre-fills the create form. Custom Server opens blank form.
Create form accepts prefillData from discovery selection and
shows a Browse MCP Registry link to return to discovery modal.
Tests for registry JSON structure validation and endpoint
query/category filtering logic. 15 tests total.
@vercel

vercel Bot commented Feb 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Feb 13, 2026 1:52am

Request Review

@greptile-apps

greptile-apps Bot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

Adds an MCP server discovery feature: a curated mcp_registry.json with 31 well-known MCP servers, a GET /v1/mcp/discover admin endpoint with query/category filtering, and a discovery modal UI that lets admins browse and select servers to pre-fill the creation form.

  • Registry file not included in pip package: mcp_registry.json is at the repo root but pyproject.toml only packages the litellm/ directory. Pip installations will silently get an empty discovery list. Move the file into litellm/ to fix.
  • Inline imports: import json and import os are inside the if MCP_AVAILABLE block instead of at the module top, violating the project style guide.
  • Deprecated Tremor usage: The new mcp_discovery.tsx component uses Tremor Text, which is deprecated per AGENTS.md.
  • Tests are well-structured with 15 unit tests covering registry schema validation and filtering logic, with no network calls.

Confidence Score: 3/5

  • Functional for Docker deployments but the registry file will be missing in pip-installed environments, causing the discovery feature to silently fail.
  • The core logic is sound and well-tested, but the registry file placement outside the Python package means pip installations won't include it. The endpoint gracefully degrades (returns empty list) so there's no crash risk, but the feature will be broken for non-Docker deployments. Style issues (inline imports, deprecated Tremor) are minor.
  • litellm/proxy/management_endpoints/mcp_management_endpoints.py — registry path resolution won't work in pip installs; mcp_registry.json — needs to be moved inside the litellm/ package directory.

Important Files Changed

Filename Overview
litellm/proxy/management_endpoints/mcp_management_endpoints.py Added /v1/mcp/discover endpoint with query/category filtering. Registry file path resolution relies on __file__ relative traversal which won't work in pip-installed environments. Inline imports violate CLAUDE.md style guide. Endpoint is gated behind if MCP_AVAILABLE unnecessarily.
mcp_registry.json New curated registry with 31 MCP servers. Well-structured with required fields. Located at project root, which is not included in pip package distribution.
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_discovery.py Good coverage: validates registry schema, uniqueness, transport constraints, and filtering logic. Tests are properly mocked/unit-level with no network calls.
ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx Added prefillData and onBackToDiscovery props. Prefill logic correctly sanitizes server names and sets transport-appropriate fields.
ui/litellm-dashboard/src/components/mcp_tools/mcp_discovery.tsx New discovery modal component with category filtering and search. Uses Tremor Text component which is deprecated per AGENTS.md. Refetches on every modal open.
ui/litellm-dashboard/src/components/mcp_tools/mcp_servers.tsx Wired discovery modal into server management page. State management for discovery/create flow is clean.
ui/litellm-dashboard/src/components/mcp_tools/types.tsx Added DiscoverableMCPServer and DiscoverMCPServersResponse interfaces. Clean type definitions.
ui/litellm-dashboard/src/components/networking.tsx Added fetchDiscoverableMCPServers function following existing patterns in the file.

Sequence Diagram

sequenceDiagram
    participant User as Admin User
    participant UI as MCP Servers Page
    participant Discovery as MCPDiscovery Modal
    participant CreateForm as CreateMCPServer Modal
    participant API as Discovery Endpoint
    participant Registry as mcp_registry.json

    User->>UI: Click Add New MCP Server
    UI->>Discovery: Open discovery modal
    Discovery->>API: GET /v1/mcp/discover
    API->>Registry: Load and cache JSON
    Registry-->>API: Server list
    API-->>Discovery: servers and categories
    Discovery->>Discovery: Filter by category or search
    alt Select a server
        User->>Discovery: Click server card
        Discovery->>CreateForm: Open with prefill data
        CreateForm->>CreateForm: Pre-fill form fields
    else Custom server
        User->>Discovery: Click Custom Server
        Discovery->>CreateForm: Open blank form
    end
    alt Back to discovery
        User->>CreateForm: Click Browse MCP Registry
        CreateForm->>Discovery: Re-open discovery modal
    end
Loading

Last reviewed commit: 78c08b1

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +1185 to +1188
_MCP_REGISTRY_PATH = os.path.join(
os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))),
"mcp_registry.json",
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mcp_registry.json is at the repo root, but pyproject.toml only packages { include = "litellm" }. When litellm is installed via pip, this file won't exist at the resolved path, and the endpoint will silently return an empty list. Consider moving the registry into the litellm/ package directory (e.g. litellm/proxy/mcp_registry.json) so it's included in pip distributions.

Comment thread litellm/proxy/management_endpoints/mcp_management_endpoints.py Outdated
Comment thread ui/litellm-dashboard/src/components/mcp_tools/mcp_discovery.tsx Outdated
- Updated transport types and URLs from registry.modelcontextprotocol.io API
- GitHub: streamable-http at api.githubcopilot.com/mcp/
- GitLab: streamable-http at gitlab.com/api/v4/mcp (remote only)
- Atlassian: SSE at mcp.atlassian.com/v1/sse (remote only)
- Linear: SSE at mcp.linear.app/sse (remote only)
- Notion: SSE at mcp.notion.com/sse (remote only)
- Stripe: streamable-http at mcp.stripe.com (remote only)
- Exa: streamable-http at mcp.exa.ai/mcp (remote only)
- Cloudflare: SSE at bindings.mcp.cloudflare.com/sse (remote only)
- Sentry: stdio via @sentry/mcp-server (npm, correct package)
- Snowflake: stdio via snowflake-labs-mcp (pypi/uvx, not npm)
- Brave Search: stdio via @brave/brave-search-mcp-server (correct package)
- Fixed stdio prefill to generate stdio_config JSON instead of separate fields
- Discovery modal matches create modal width and header style
- Back arrow positioned on left of create modal header
ishaan-jaff and others added 2 commits February 12, 2026 17:39
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@ishaan-jaff

Copy link
Copy Markdown
Contributor Author

@greptile review again

@greptile-apps

greptile-apps Bot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

Adds an MCP server discovery feature: a curated registry of 31 well-known MCP servers (mcp_registry.json), a GET /v1/mcp/discover backend endpoint with query/category filtering, and a discovery modal in the UI that lets admins browse, search, and pre-fill the create form from the registry.

  • Missing imports cause NameError: os and json are used in mcp_management_endpoints.py but never imported — the module will fail to load when MCP is available.
  • Undefined Text component: mcp_discovery.tsx uses <Text> without importing or destructuring it, causing a ReferenceError when the error or empty-state UI branches render.
  • mcp_registry.json is at the repo root and won't be included in pip distributions (already flagged in prior review thread).

Confidence Score: 2/5

  • This PR has two missing-import bugs that will cause runtime errors — it should not be merged as-is.
  • The backend endpoint will fail at module load time due to missing import os and import json. The discovery UI will crash on error/empty states due to undefined Text. Both are straightforward fixes but block functionality.
  • litellm/proxy/management_endpoints/mcp_management_endpoints.py (missing os/json imports) and ui/litellm-dashboard/src/components/mcp_tools/mcp_discovery.tsx (undefined Text component).

Important Files Changed

Filename Overview
litellm/proxy/management_endpoints/mcp_management_endpoints.py Adds /discover endpoint with query/category filtering. Missing import json and import os causes NameError at module load time.
mcp_registry.json New curated registry of 31 MCP servers with icons, categories, and transport configs. Data looks well-structured. File is at repo root and won't be included in pip distributions.
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_discovery.py 15 unit tests covering registry file validation and filtering logic. No real network calls — mock-only tests.
ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx Adds prefill from discovery selection and back-to-discovery navigation. Form pre-fill logic handles stdio and HTTP transports correctly.
ui/litellm-dashboard/src/components/mcp_tools/mcp_discovery.tsx New discovery modal with category/search filtering. Uses undefined Text component (never imported/destructured) which will cause ReferenceError at runtime.
ui/litellm-dashboard/src/components/mcp_tools/mcp_servers.tsx Wires discovery modal into the MCP servers page. Button now opens discovery first, then flows to create form. Clean state management.
ui/litellm-dashboard/src/components/mcp_tools/types.tsx Adds DiscoverableMCPServer and DiscoverMCPServersResponse TypeScript interfaces. Well-typed.
ui/litellm-dashboard/src/components/networking.tsx Adds fetchDiscoverableMCPServers network function following existing patterns in the file.

Sequence Diagram

sequenceDiagram
    participant User as Admin User
    participant UI as MCP Servers Page
    participant Discovery as Discovery Modal
    participant CreateForm as Create MCP Server Form
    participant API as GET /v1/mcp/discover
    participant Registry as mcp_registry.json

    User->>UI: Click "+ Add New MCP Server"
    UI->>Discovery: Open discovery modal
    Discovery->>API: fetchDiscoverableMCPServers(accessToken)
    API->>Registry: _load_mcp_registry() (cached)
    Registry-->>API: {servers, categories}
    API-->>Discovery: {servers, categories}
    Discovery-->>User: Show searchable server grid

    alt Select a known server
        User->>Discovery: Click server card
        Discovery->>CreateForm: Open with prefillData
        CreateForm-->>User: Pre-filled create form
    else Custom server
        User->>Discovery: Click "+ Custom Server"
        Discovery->>CreateForm: Open blank form
        CreateForm-->>User: Empty create form
    end

    opt Back to discovery
        User->>CreateForm: Click back arrow
        CreateForm->>Discovery: Re-open discovery modal
    end
Loading

Last reviewed commit: f32e900

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment thread litellm/proxy/management_endpoints/mcp_management_endpoints.py
Comment thread ui/litellm-dashboard/src/components/mcp_tools/mcp_discovery.tsx
- Move `import json` and `import os` to module top level
- Move mcp_registry.json into litellm/proxy/ for pip distribution
- Fix `Text` component: destructure from antd Typography instead of deprecated Tremor
- Update test fixture path to match new registry location
@ishaan-jaff

Copy link
Copy Markdown
Contributor Author

@greptile review again

@greptile-apps

greptile-apps Bot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

Adds an MCP server discovery feature: a curated JSON registry of 31 well-known MCP servers (GitHub, Slack, PostgreSQL, Snowflake, etc.) served via a new GET /v1/mcp/discover admin endpoint, with a searchable/filterable discovery modal in the UI that pre-fills the create form when a server is selected.

  • New mcp_registry.json with server metadata (name, transport, URL/command, env vars, categories, icons)
  • Backend discover_mcp_servers endpoint with query text and category filtering, admin-only access
  • Discovery modal (MCPDiscovery) with category pills, search bar, and grouped server list
  • CreateMCPServer form pre-fill logic from discovery selection (handles both HTTP and stdio transports)
  • 15 unit tests validating registry structure and filtering logic (no network calls)
  • The registry file is correctly placed inside the litellm/ package directory for pip distribution

Confidence Score: 4/5

  • This PR is safe to merge — it adds a read-only discovery feature with no database changes or critical path modifications.
  • The PR adds a self-contained feature (MCP discovery) that reads from a static JSON file and serves it through a new endpoint. No database queries, no changes to request critical path, no existing behavior modified. The registry is properly cached and the endpoint has admin-only access control. Previous review feedback (import placement, Text import, registry file location) has been addressed. Minor style note: the discovery modal uses Tremor's Button via the parent component, but this is pre-existing in the file.
  • No files require special attention. The registry JSON should be kept in sync if MCP server URLs change upstream.

Important Files Changed

Filename Overview
litellm/proxy/management_endpoints/mcp_management_endpoints.py Added GET /discover endpoint with query/category filtering, registry file loading with caching, and admin-only access control. Follows existing patterns in the file.
litellm/proxy/mcp_registry.json New curated registry of 31 well-known MCP servers with icons, categories, transport configs, and env vars. Properly placed inside the litellm/ package for pip distribution.
tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_discovery.py Unit tests for registry file validation and filtering logic. No network calls — all tests use local file reads or in-memory fixtures.
ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx Added prefillData and onBackToDiscovery props. New useEffect pre-fills form fields from discovery selection including stdio config serialization.
ui/litellm-dashboard/src/components/mcp_tools/mcp_discovery.tsx New discovery modal with category filter pills, search, and grouped server list. Uses Ant Design Typography.Text correctly. Fetches servers on open.
ui/litellm-dashboard/src/components/mcp_tools/mcp_servers.tsx Integrated discovery modal flow: "Add New MCP Server" now opens discovery first, with state management for prefill data and navigation between discovery and create modals.
ui/litellm-dashboard/src/components/mcp_tools/types.tsx Added DiscoverableMCPServer and DiscoverMCPServersResponse TypeScript interfaces for the discovery feature.
ui/litellm-dashboard/src/components/networking.tsx Added fetchDiscoverableMCPServers API function following the existing networking patterns in the file.

Sequence Diagram

sequenceDiagram
    participant User as Admin User
    participant UI as MCP Discovery Modal
    participant API as GET /v1/mcp/discover
    participant Registry as mcp_registry.json
    participant CreateForm as Create MCP Server Form

    User->>UI: Click "+ Add New MCP Server"
    UI->>API: fetchDiscoverableMCPServers(token)
    API->>Registry: _load_mcp_registry() (cached)
    Registry-->>API: {servers, categories}
    API-->>UI: {servers, categories}
    UI->>UI: Display grouped server list

    alt Select a server
        User->>UI: Click server card
        UI->>CreateForm: onSelectServer(prefillData)
        CreateForm->>CreateForm: Pre-fill form fields
    else Custom server
        User->>UI: Click "+ Custom Server"
        UI->>CreateForm: onCustomServer()
        CreateForm->>CreateForm: Open blank form
    end
Loading

Last reviewed commit: a7d092f

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@ishaan-jaff
ishaan-jaff merged commit 9202e67 into main Feb 13, 2026
35 of 69 checks passed
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
* feat: add curated MCP server registry for discovery UI

Curated list of 31 well-known MCP servers with names, icons,
categories, transport config, and registry URLs. Includes HTTP
endpoints for GitHub, Atlassian, Sentry, Snowflake, and Cloudflare.

* feat: add GET /v1/mcp/discover endpoint for MCP discovery

Admin-only endpoint that serves the curated MCP registry with
optional query and category filters. Used by the UI discovery modal.

* feat: add DiscoverableMCPServer types for MCP discovery

* feat: add fetchDiscoverableMCPServers network function

* feat: add MCP discovery modal component

Compact list-row layout with category filters, search, and
grouped server list. Follows dev-tool aesthetic.

* feat: wire MCP discovery modal into server management page

Add MCP Server button now opens discovery modal. Card click
pre-fills the create form. Custom Server opens blank form.

* feat: add prefill from discovery and back-to-registry link

Create form accepts prefillData from discovery selection and
shows a Browse MCP Registry link to return to discovery modal.

* test: add unit tests for MCP discovery endpoint and registry

Tests for registry JSON structure validation and endpoint
query/category filtering logic. 15 tests total.

* fix: sync registry with official MCP API and fix stdio prefill

- Updated transport types and URLs from registry.modelcontextprotocol.io API
- GitHub: streamable-http at api.githubcopilot.com/mcp/
- GitLab: streamable-http at gitlab.com/api/v4/mcp (remote only)
- Atlassian: SSE at mcp.atlassian.com/v1/sse (remote only)
- Linear: SSE at mcp.linear.app/sse (remote only)
- Notion: SSE at mcp.notion.com/sse (remote only)
- Stripe: streamable-http at mcp.stripe.com (remote only)
- Exa: streamable-http at mcp.exa.ai/mcp (remote only)
- Cloudflare: SSE at bindings.mcp.cloudflare.com/sse (remote only)
- Sentry: stdio via @sentry/mcp-server (npm, correct package)
- Snowflake: stdio via snowflake-labs-mcp (pypi/uvx, not npm)
- Brave Search: stdio via @brave/brave-search-mcp-server (correct package)
- Fixed stdio prefill to generate stdio_config JSON instead of separate fields
- Discovery modal matches create modal width and header style
- Back arrow positioned on left of create modal header

* Update ui/litellm-dashboard/src/components/mcp_tools/mcp_discovery.tsx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update litellm/proxy/management_endpoints/mcp_management_endpoints.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix: address Greptile review feedback

- Move `import json` and `import os` to module top level
- Move mcp_registry.json into litellm/proxy/ for pip distribution
- Fix `Text` component: destructure from antd Typography instead of deprecated Tremor
- Update test fixture path to match new registry location

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant