Skip to content

Move the MCP guide to /mcp-server and redirect page visits from /mcp - #19

Merged
sidneyswift merged 3 commits into
mainfrom
codex/mcp-guide-slug
Nov 6, 2026
Merged

sidneyswift merged 3 commits into
mainfrom
codex/mcp-guide-slug

Conversation

@sidneyswift

Copy link
Copy Markdown
Contributor

Problem

/mcp is the docs MCP endpoint (search_docs, read_page), so the human MCP guide at that path never rendered. Browsers got 405 with a JSON-RPC error body. That affected:

  • the "MCP" entry in the Getting started navigation
  • the "MCP Server" card on the home page
  • the "API-key authentication" link in the MCP OAuth guide
  • the "MCP connection guidance" link in the Validate registration page
  • recoupable.dev/docs/mcp, which Marketing's /docs/:path* redirect forwards here

Change

  • Renamed mcp.mdx to mcp-server.mdx (title "MCP server") and pointed the navigation and all four links at /mcp-server. Regenerated manifest.json, navigation.json and llms-full.txt with pnpm docs:build.
  • /mcp now answers any GET/HEAD that does not accept text/event-stream with a 308 to /mcp-server (new lib/mcp/isBrowserPageRequest.ts). Streamable HTTP clients always POST, or GET with Accept: text/event-stream, so MCP traffic is unchanged. Crawlers, curl and markdown readers reach the guide; /mcp-server still negotiates markdown itself.
  • The redirect runs after the existing trusted-host check, so untrusted hosts still get 403. The response carries the existing CORS and Cache-Control: no-store headers plus Vary: Accept.

Marketing needs no change: recoupable.dev/docs/mcp → docs.recoupable.dev/mcp → /mcp-server.

Verification

  • pnpm test (150 passed, including new isBrowserPageRequest cases and a handler test), pnpm type-check, pnpm lint, pnpm build, pnpm docs:check
  • Local dev server:
    • browser visit to /mcp lands on /mcp-server and the guide renders
    • home card, navigation and the MCP OAuth link point to /mcp-server; no console errors
    • MCP initialize POST to /mcp returns 200 from recoup-docs
    • GET with Accept: text/event-stream is not redirected (unchanged 405)
    • curl /mcp returns 308 to /mcp-server; Accept: text/markdown follows through to the guide's markdown
    • sitemap lists /mcp-server, not /mcp
  • Not yet checked on the Vercel preview or production.

🤖 Generated with Claude Code

sidneyswift and others added 2 commits October 26, 2026 01:07
/mcp is the docs MCP endpoint, so the human guide at that path never
rendered: browsers got a 405 JSON-RPC error. The guide now lives at
/mcp-server, and every navigation entry and link points there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Old links, search results and recoupable.dev/docs/mcp still reach /mcp,
which answered people with a 405 JSON-RPC error. Any GET or HEAD that
does not accept text/event-stream now gets a 308 to /mcp-server. MCP
clients always POST or GET with text/event-stream, so they are unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 6, 2026 5:19am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 99f77b6f-4d49-4e60-94c0-ee3145ddf5fe
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Keep main's new navigation groups with mcp-server in place of mcp, point
the home page's new Connect an AI assistant row at /mcp-server, and
regenerate manifest, navigation and llms-full.txt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant