feat: dedicated MCP page (content negotiation at /mcp) - #324
Merged
Conversation
Add an MCP link to the header nav and footer, an anchor on the API page's MCP section, and a hero mention + CTA on the homepage.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Give the MCP server its own page. The endpoint stays at /mcp; a browser GET now gets the docs page (clients still get the protocol), so one URL serves both. The page shows per-client install commands behind a picker, and each tool's input schema and example output. Served self-contained so the Vercel function needs no filesystem access.
Rebuild the MCP page to reuse the site's compiled stylesheet, fonts, header, footer, and dark-mode toggle instead of bespoke inline CSS, so it looks like every other page. Scans src/build for tailwind classes.
Embed the Claude Code, Codex, OpenCode, Cursor, and Windsurf marks (from the lobe-icons dependency already in the repo) and split the client picker so each shows its logo. Claude Desktop/Zed fall under a generic 'other' entry.
Add a minimal JSON highlighter (keys sky, strings emerald, numbers violet, booleans amber, null rose) and apply it to the MCP tool input schemas and example outputs, and to the API page's validate response. Code blocks are now consistently dark for readable colour contrast.
Replace raw <pre> blocks with a reusable jsonBlock component: header bar with a label and Copy button, syntax-highlighted body, and line wrapping so long strings wrap instead of overflowing. Applied to MCP tool schemas and the API validate response; input schema descriptions shortened.
Keep the MCP protocol endpoint at /mcp (GET returns the JSON usage object, like other hosted MCP servers). Move the docs to /mcp-server as a normal static page with the full site chrome — header with provider menu, footer, breadcrumbs — instead of a self-contained function-served page. Relabel the catch-all client as 'Other'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
/mcp, served via content negotiation: MCP clients get the protocol, browsers get the docs page. One canonical URL./mcp./mcp./mcp(reverted the earlier move to/api/mcp).Why
The MCP server was buried in the API page. This gives it its own page, matching how hosted MCP servers advertise, while keeping the conventional
/mcpendpoint URL.Implementation note
The page is self-contained (inline CSS/JS, no ejs/fs) so the Vercel function that serves
/mcpcan return it for browser GETs without touching the static build's filesystem.