🎃 Add a "Share / README badge" section with Add-to-Cursor and Add-to-VS-Code badges
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 58/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
- documentation, frontend
Hướng nghiên cứu
Start with packages/frontend/src/app/mcp-server/[id]/page.tsx and packages/frontend/src/lib/api.ts to trace the existing install links, server info, and client card; then read the frontend Playwright e2e example named in the issue. Build the helper and share card, covering the auth modes and localhost note, and update the two integration docs. Done means the e2e assertions, lint, and TypeScript check pass, with generated snippets containing no secrets.
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
Teams that build an MCP server in AnythingMCP want to hand it to colleagues the way public MCP servers do: a badge in an internal README or wiki page that installs the server in one click. The MCP server page already builds Cursor and VS Code deeplinks, but only as buttons inside a modal, and with cursor:// and vscode: URLs. GitHub, GitLab and most wikis strip those schemes from Markdown links, so the button cannot be copied into a README. Smithery, Glama and the official GitHub MCP server README all ship copyable badges for this.
Self-hosted vs Cloud
- Self-hosted: enabled in Community and Business. The endpoint is
${origin}/mcp/<serverId>. If the page runs onlocalhost(seeapiUrl,page.tsx:98), show a note that the badge only works on this machine and setSERVER_URL/a public hostname first. - Cloud (
DEPLOYMENT_MODE=cloud): enabled. Cloud runs withMCP_AUTH_MODE=oauth2(docker-compose.cloud.yml:111), so whoever clicks the badge still has to sign in with an account in that organization. The badge reveals the server URL (and id), never data or credentials. - Who can use it: any member who can open the server page, VIEWER included. It is read-only and generated in the browser; no new endpoint. Nothing leaves the caller's organization because the snippet only contains this server's URL and slug.
What to build
- Move link building into a pure helper
packages/frontend/src/lib/mcp-install-links.ts:cursorInstallUrl({ name, url })→https://cursor.com/en/install-mcp?name=<enc name>&config=<base64 of {"url": url}>. This https redirector opens the samecursor://anysphere.cursor-deeplink/mcp/install…deeplink and survives Markdown sanitizers.vscodeInstallUrl({ name, url })→https://vscode.dev/redirect/mcp/install?name=<enc>&config=<enc JSON {"type":"http","url":url}>. Add aninsidersvariant withhttps://insiders.vscode.dev/redirect/mcp/install….badgeSnippets(...)→{ markdown, html }for each client. Images: Cursor's officialhttps://cursor.com/deeplink/mcp-install-dark.svg/-light.svg; VS Code via shields.io, e.g.https://img.shields.io/badge/VS_Code-Install_Server-0098FF?logo=visualstudiocode&logoColor=white.- Replace the inline
cursorDeepLink/vscodeDeepLink(page.tsx:356-364) with the helper. The modal buttons may keep the native scheme.
- A new card "Share / README badge" on
packages/frontend/src/app/mcp-server/[id]/page.tsx, below "Connect your MCP client" (:645): a badge preview, a Dark/Light toggle for the Cursor image, tabs Markdown | HTML, and a Copy button (reusehandleCopyand thecodeBlockhelper at:378). ShowexposesLine()(:398) so people can see which connectors the badge hands out. - Auth notes. Read
mcpAuthModefrom the publicserver.info()(src/lib/api.ts:964, served byhealth.controller.ts:30):oauth2/both: the URL alone is enough; say "people who click will sign in".legacy(the default for self-hosted,docker-compose.yml:67): the badge installs the URL only; say each user must add their ownX-API-Keyheader, and link to the API key card.none: show a warning that anyone who can reach the URL can call these tools, and do not show the snippet until the user ticks "I understand".
- Never put a secret in a link or badge: no API key, no
X-API-Keyheader, no token of any kind. The helper only takesnameandurl. A unit-level assertion and an e2e assertion both check this. - Docs: a "Share with a badge" subsection under
## Cursorindocs/integrations/claude.md:119and under## VS Code Setupindocs/integrations/copilot.md:15.
Where to look
packages/frontend/src/app/mcp-server/[id]/page.tsx:270-272—endpointUrlandslug;:356-364— the current deeplinks;:440-456— the Cursor/VS Code modal buttons;:645— the client card.packages/frontend/src/lib/api.ts:964-976—server.info()withmcpAuthMode.packages/backend/src/health/health.controller.ts:30-57— wheremcpAuthModecomes from.packages/backend/src/mcp-servers/mcp-servers.controller.ts:107-115— write permissions (VIEWER can't modify, which this feature doesn't need).packages/frontend/tests/e2e/mcp-server-assignments.spec.ts— Playwright pattern with mocked/api/routes and a server page.- Cursor docs: https://cursor.com/docs/mcp/install-links
Acceptance criteria
- The card renders Markdown and HTML for Cursor and VS Code; clicking a rendered badge on GitHub opens the client's install prompt (screenshot or GIF in the PR).
- Generated links use https, are correctly encoded (slugs with spaces/umlauts), and contain only
name,typeandurl. - A Playwright test under
packages/frontend/tests/e2e/(npm run test:e2einpackages/frontend) mocksserver.info()foroauth2,legacyandnone, checks the matching note or warning, and asserts the copied snippet contains noX-API-Keyheader and no key or token. - The localhost note appears when the origin is
localhost. -
npm run lintandnpx tsc --noEmit -p tsconfig.jsonpass inpackages/frontend. - Docs updated (
docs/integrations/claude.mdCursor section,docs/integrations/copilot.mdVS Code section).
Out of scope
- Public pages or a server directory listing; no backend changes.
- Badges for other clients (Claude, ChatGPT, Windsurf). Add them later if they gain an install URL.
- Anything under
ee/.
Size
M (1–2 days)
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 7 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ự
-
Edit: Tele Posadas HDĐang mởcheck:passed streams:edit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:mcp bug has repro platform:vscode regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anthropics/claude-code#103970 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
skillopt: success-reflect prompt omits the edit schema, so every success-only edit is droppedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Workspace secrets/constants containing "$" are corrupted when resolved in data source optionsĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sdk-typescript: unquoted COPY globs in shell form are silently dropped from the image build contextĐang mởbug javascript
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày