Skip to content

🎃 Add "Open in MCP Inspector" to the MCP server page #1002

Closed

Description

@helpcodeai

Part of the October Challenge #997.

Why

The MCP Inspector (npx @modelcontextprotocol/inspector) is the standard tool for looking at an MCP server from the outside: tools/list, the input schemas, a test call and the raw JSON-RPC messages. When a client shows no tools or a call fails, it tells you quickly whether the problem is the server or the client. The MCP server page lists ten clients under Quick Connect (mcp-server/[id]/page.tsx:347-358) but not the Inspector, and nothing in the repository mentions it, so users have to work out the transport and the URL themselves.

Self-hosted vs Cloud

  • Self-hosted: enabled in Community and Business. Frontend only: no new endpoint, no ee/ code. The Inspector runs on the user's machine and connects through its own local proxy, so an instance on a LAN address or plain HTTP works as long as that machine can reach it.
  • Cloud (DEPLOYMENT_MODE=cloud): enabled. The URL is https://cloud.anythingmcp.com/mcp/<serverId>. The Inspector's OAuth flow registers a http://localhost:… redirect URI, which Dynamic Client Registration accepts for loopback hosts (redirect-uri.util.ts:61-69); the user then sees the normal consent screen, and server membership is still enforced (mcp-endpoint.controller.ts:924-970).
  • Who can use it: any role that can open the MCP server page. The link contains only the server URL, which the page already displays.

What to build

  1. Add { id: 'inspector', name: 'MCP Inspector', ... } to aiClients (:347-358) and a case 'inspector' in renderModalContent (:438), following the Gemini case (:593-610), which already shows a copyable command.
  2. The modal shows three steps:
    • Run it: the command npx @modelcontextprotocol/inspector with a Copy button (handleCopy, which uses copyText from lib/clipboard.ts).
    • Open it: an "Open in MCP Inspector" link (new tab) to http://localhost:6274/?transport=streamable-http&serverUrl=<encodeURIComponent(endpointUrl)>. Before you finalize it, check the current Inspector README for the query parameters it accepts and for its proxy session token (the Inspector prints a URL containing MCP_PROXY_AUTH_TOKEN on start and asks for the token when opened without it). Explain that in one sentence in the modal, and name the Inspector version you tested in the PR.
    • Sign in: OAuth (connect, sign in, approve) or an API key (add an X-API-Key header in the Inspector's authentication settings, using a key from the API keys card on this page). Never put a key or token into the link: it would end up in browser history.
    • Below the steps, the endpoint row (endpointRow, :394-408) so the URL can be pasted by hand.
  3. Build the link in a small pure helper in packages/frontend/src/lib/ (for example inspectorUrl(endpointUrl)), so the test can check the encoding.

Where to look

  • packages/frontend/src/app/mcp-server/[id]/page.tsx:101-105 (apiUrl), :251 (endpointUrl), :347-358 (aiClients), :394-408 (endpointRow), :438 (renderModalContent), :593-610 (Gemini modal with a command), :689-712 (Quick Connect grid).
  • packages/frontend/src/lib/clipboard.ts: copy with a fallback for plain-HTTP installs.
  • packages/backend/src/auth/redirect-uri.util.ts:61-69: loopback redirect URIs.
  • packages/frontend/tests/e2e/mcp-server-connect-clients.spec.ts: Quick Connect modal tests to extend.
  • docs/integrations/claude.md:112: "Any MCP Client" section.

Acceptance criteria

  • "MCP Inspector" appears under Quick Connect on self-hosted and Cloud, and its modal shows the command, the link and the sign-in steps.
  • The link's serverUrl decodes to exactly the page's endpoint URL, and no X-API-Key, token or cookie value appears in it.
  • Manually verified against a local instance: tools/list works in the Inspector with an API key, and with OAuth if your instance runs MCP_AUTH_MODE=oauth2 or both (describe the steps in the PR).
  • Playwright test for the new modal in mcp-server-connect-clients.spec.ts (cd packages/frontend && npm run test:e2e).
  • A short "Test with the MCP Inspector" paragraph in docs/integrations/claude.md under "Any MCP Client".

Out of scope

  • Embedding or hosting the Inspector inside AnythingMCP.
  • A hosted Inspector for Cloud users.
  • Changes to the OAuth or DCR rules.

Size

S (a few hours)

How to claim

Comment "I'd like to work on this" and we'll assign you. Rules in #997.

Activity

  1. GallaGit commented on Oct 10, 2026

    @GallaGit
    Contributor

    Hi! I'd like to take this one.

  2. helpcodeai commented on Oct 11, 2026

    @helpcodeai
    ContributorAuthor

    @GallaGit it's yours, go ahead. Before you build the whole thing, check the Inspector's current query parameters and how its proxy session token works (the issue lists them as things to verify), since that decides what the link can pre-fill. GitHub won't let me set you as assignee right now, so treat this comment as the assignment.

  3. GallaGit commented on Oct 11, 2026

    @GallaGit
    Contributor

    Thanks! I checked the current Inspector (v2.10.1, npm latest). Findings:

    • The web UI only honours ?serverUrl=&transport= when autoConnect= is also present (clients/web/src/utils/deepLink.ts); otherwise the link is ignored. The token is random per launch and secret, so a link from AnythingMCP can't pre-fill or connect.
    • transport values are now http | sse (not streamable-http); the token is MCP_INSPECTOR_API_TOKEN (MCP_PROXY_AUTH_TOKEN is legacy); port is still 6274.
      Proposal: the modal shows a copyable npx @modelcontextprotocol/inspector --server-url <endpoint> --transport http (plus an optional --header "X-API-Key: ..." note), and the "Open" link just points to http://localhost:6274/. No secrets in any link. Does that work for you?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions