Skip to content

Add MCP server sharing via shareable links#2269

Draft
gary149 wants to merge 2 commits into
mainfrom
claude/add-mcp-share-route-XLB4j
Draft

Add MCP server sharing via shareable links#2269
gary149 wants to merge 2 commits into
mainfrom
claude/add-mcp-share-route-XLB4j

Conversation

@gary149

@gary149 gary149 commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the ability to share custom MCP servers with others via shareable links. Users can now generate a link for any custom MCP server that can be shared with others, who can then review and add the server to their instance.

Key Changes

  • New share page (src/routes/mcp/share/+page.svelte): Modal-based page that handles incoming MCP server share links with validation and a pre-filled form for adding the server
  • Share link generation (src/lib/components/mcp/ServerCard.svelte): Added "Share" button to custom server cards that copies a shareable link to clipboard with visual feedback
  • Server validation (src/routes/mcp/share/+page.ts): Page load handler that validates the shared server URL and name parameters, with proper error handling for invalid links
  • Layout exclusion: Updated global layout to exclude the share page from default meta tags, allowing custom OG tags for better social sharing

Implementation Details

  • Share links are generated as query parameters (name and url) on the /mcp/share route
  • The share page validates the URL using existing validateMcpServerUrl utility
  • Copy-to-clipboard feedback shows "Copied!" for 2 seconds before reverting
  • Invalid or missing share links display an error message with a back button
  • Valid shares pre-populate the AddServerForm with server details for user review before adding
  • Proper OG meta tags are set for social sharing (title, description, image)

https://claude.ai/code/session_01FYB4gqX5zm1vZHsejthcG6

claude added 2 commits May 13, 2026 10:50
Lets users share a custom MCP server with anyone via a URL-encoded link
(/mcp/share?name=...&url=...). Recipient lands on a confirmation page
with the server name, URL, a caution about trust, and Add/Cancel
buttons. Custom server cards now have a Share button that copies the
link to clipboard.

Stores nothing server-side: the share URL carries name + URL only,
auth headers are never included so secrets don't leak. Page sets its
own OG/Twitter meta tags for link previews; layout default meta tags
are skipped on this path.
Render the existing MCP server Modal with a pre-filled AddServerForm
instead of a bespoke card, so the recipient sees the exact same UI
(fields, headers details, warning, buttons) as the in-app Add Server
modal. The recipient can still add headers before confirming.
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.

2 participants