🎃 Add "Open in MCP Inspector" to the MCP server page
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- playwright, typescript
- Lĩnh vực
- api, documentation, frontend, testing
Hướng nghiên cứu
Start in packages/frontend/src/app/mcp-server/[id]/page.tsx, reading the aiClients, renderModalContent, endpointUrl, and handleCopy references in the issue; check the Inspector README and v1-to-v2 migration guide for the flags. Add the auth-mode-specific command and link, then test both modes with the specified Playwright e2e spec and npm run test:e2e. Done includes the integration doc linked from the README and recording the tested Inspector version in the PR.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Part of the October Challenge #846.
Why
MCP Inspector is the standard tool for checking an MCP server by hand: list its tools, call one, look at the raw JSON. Users who want to know whether a problem is AnythingMCP or their AI client currently have to work out the Inspector flags themselves, and one detail trips them up. Inspector v2 only infers the transport from URLs that end in /mcp or /sse. Our per-server URL /mcp/<serverId> matches neither, so npx @modelcontextprotocol/inspector --server-url … stops with "Transport type not specified". A ready-made command on the server page removes that.
Self-hosted vs Cloud
- Self-hosted: enabled in Community and Business. On LAN installs over plain HTTP the command still works; the Inspector runs on the user's machine.
- Cloud (
DEPLOYMENT_MODE=cloud): enabled. The Inspector runs locally and callshttps://cloud.anythingmcp.com/mcp/<id>. The server makes no outbound request, so there is no SSRF risk and nothing cross-tenant. Cloud runsMCP_AUTH_MODE=oauth2(docker-compose.cloud.yml:111), so OAuth is the default there. - Who can use it: anyone who can open the MCP server page (the server must belong to the caller's org;
mcp-servers.controller.ts:100-104). The button builds client-side text and needs no new endpoint.
What to build
- Add an "MCP Inspector" tile to
aiClients(mcp-server/[id]/page.tsx:366-376) with a matchingcase 'inspector'inrenderModalContent(:438). Group it visually as a debugging tool, separate from the AI clients. - The modal shows a copyable command (primary) using the existing
handleCopy(:210, which recordsclient_config_copiedwithclient: 'inspector'):- OAuth (
oauth2/both):npx -y @modelcontextprotocol/inspector@2 --transport http --server-url <endpointUrl>. The Inspector does discovery + dynamic client registration in the browser. Its loopback redirect (http://127.0.0.1:…/oauth/callback) is allowed byredirect-uri.util.ts(http to loopback is accepted). - API key (
legacy/both): the same command plus--header "X-API-Key: $AMCP_MCP_API_KEY". Use a placeholder env var, never a real key, and keep it out of shell history. Link to the API Keys section on the same page. Explain that per-usermcp_…keys work on/mcp/<id>in every auth mode (mcp-combined-auth.guard.ts:64). - Read the mode with
server.info()(lib/api.ts:964), assettings/page.tsx:47-49does. If it isboth, show both variants.
- OAuth (
- Secondary: "Already running the Inspector? Open it with this server". This is a link to
http://localhost:6274/?serverUrl=<encodeURIComponent(endpointUrl)>&transport=http. Inspector v2 accepts these params but only auto-connects with its per-launch token, so the link prefills and does not connect. Say that in the UI. Do not try to passautoConnect. - Pin the major version (
@2): v1 used different deep-link params (transport=streamable-http). Add a one-line warning that the Inspector stores OAuth tokens in the OS keychain or~/.mcp-inspector/secrets.json. - Check every flag against the Inspector README and
docs/v1-to-v2-migration.mdat the version you test, and record that version in the PR.
Where to look
packages/frontend/src/app/mcp-server/[id]/page.tsx:98-102(apiUrl),:270(endpointUrl),:366-376(aiClients),:438-590(renderModalContent, includingclaude-codeat:532as the copy-command pattern andlinkActionat:428).packages/backend/src/auth/redirect-uri.util.ts:23-60: loopback redirect rules.packages/backend/src/auth/mcp-combined-auth.guard.ts:57-100: which headers/mcp/<id>accepts.packages/backend/src/health/health.controller.ts:57-70:mcpAuthMode,oauthEndpoints.
Acceptance criteria
- The command connects and lists tools against a local instance in both
MCP_AUTH_MODE=legacy(with a real key exported) andoauth2(describe the manual steps in the PR). - The command always includes
--transport http, and the URL is the per-server endpoint. - No API key, session token or JWT is ever written into the command or the link.
- Playwright spec under
packages/frontend/tests/e2e/(stub/api/mcp-servers/<id>and/health/server-infolikemcp-server-assignments.spec.ts) opens the tile and checks the command text for each auth mode. Run withcd packages/frontend && npm run test:e2e. - New
docs/integrations/mcp-inspector.md(short: command, OAuth vs key, the transport gotcha), linked from the README "Use it from Claude, ChatGPT…" section.
Out of scope
- Embedding or hosting the Inspector inside AnythingMCP.
- Inspector support for the shared
/mcpendpoint (it exposes only theanythingmcp_*meta-tools on Cloud). - Generating API keys from the modal.
Size
S (a few hours)
How to claim
Comment "I'd like to work on this" and we'll assign you. Rules in #846.
- Ngôn ngữ chính
- TypeScript
- Star
- 856
- Fork
- 82
- Merge trung bình
- 6 giờ 30 phút
- Pull request đã merge (30 ngày)
- 205
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của HelpCode-ai/anythingmcp
-
Docs: document all SMTP_* and other undocumented env vars for self-hostingCó thể đã có người làm @notlakshitha đã nhận 6 ngày trước. Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
HelpCode-ai/anythingmcp#1049 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue hacktoberfest
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 70/100
HelpCode-ai/anythingmcp#996 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue hacktoberfest
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
HelpCode-ai/anythingmcp#995 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue hacktoberfest help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
HelpCode-ai/anythingmcp#982 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
HelpCode-ai/anythingmcp#1174 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của HelpCode-ai/anythingmcp
Issue tương tự
-
area: repo priority: P2 type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
appandflow/stim#4107 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 60/100
lingdojo/kana-dojo#32859 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
code-quality refactoring
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
github/gh-aw-firewall#10364 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Merge the duplicate kaffir_corn record into sorghumCó thể đã có người làm @Crypto-Shroom đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Crypto-Shroom/Bird-Feed-Calculator#322 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
drizzle-team/drizzle-orm#6552 ·
Maintainer thường phản hồi trong vòng 2 ngày