Skip to content

Phase 0 docs 1/3: MCP proxy wiring and contextual agent config - #308

Open
kylegani wants to merge 1 commit into
masterfrom
kyle/phase0-docs-fixes
Open

Phase 0 docs 1/3: MCP proxy wiring and contextual agent config#308
kylegani wants to merge 1 commit into
masterfrom
kyle/phase0-docs-fixes

Conversation

@kylegani

@kylegani kylegani commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Context

Part of Phase 0 of the Agentic Cerebrium initiative: making Cerebrium fully usable by coding agents (Claude Code, Cursor, Codex, Copilot). Agents consume these docs through the Mintlify MCP server, llms.txt, and .md exports, and today the entry points are broken: the MCP handshake 406s at cerebrium.ai/docs/mcp, several proxy rewrites silently 404, and key config defaults documented here contradict the backend, which steers agent-authored cerebrium.toml files wrong. Every content claim in this stack was verified against dashboard-backend source (file:line refs below) on 2026-08-04.

This PR is layer 1 of a 3-PR stack (one reviewable unit per layer, merge bottom-up; merging a lower layer auto-retargets the ones above):

  1. Phase 0 docs 1/3: MCP proxy wiring and contextual agent config #308 MCP proxy wiring + contextual agent config
  2. Phase 0 docs 2/3: content accuracy fixes (defaults, GPU tables, curl snippets, regions) #309 content accuracy fixes (defaults, GPU tables, curl snippets, regions)
  3. Phase 0 docs 3/3: delete intentionally orphaned pages #310 delete intentionally orphaned pages (+ redirects)

Related: the CloudFront half of the MCP fix (cerebrium.ai apex routing) is CerebriumAI/eks#431; this repo's vercel.json covers the docs Vercel project.

Bottom layer of the Phase 0 docs stack: agent-discovery proxy wiring plus contextual config only. Content-accuracy fixes and orphan-page cleanup moved to the layers above (#309, #310). Every proxy target was curl-probed 200 before writing.

Changes

vercel.json (proxy wiring)

  • Migrated all rewrites from legacy cerebrium.mintlify.dev to cerebrium.mintlify.site (current Mintlify guidance).
  • Fixed the broken /docs/mcp rewrite: old target .dev/mcp 404s (missing /docs base path); new target .site/docs/mcp returns 200 to a POST MCP initialize handshake.
  • Fixed four silently broken rewrites (llms.txt, llms-full.txt, sitemap.xml, robots.txt) that pointed at the .site host root where they 404; the .site host keeps the /docs base path.
  • Added agent-discovery rewrites: /.well-known/mcp.json, /.well-known/skills/*, /.well-known/agent-skills/*, /.well-known/agent-card.json. Reserved paths (acme-challenge, vercel) untouched. /docs/skill.md is covered by the /docs/:path* catch-all (probed 200).

docs.json

  • Extended the existing contextual menu (4 options) to 10: copy, view, assistant, mcp, add-mcp, cursor, vscode, chatgpt, claude, perplexity.
  • Added markdown.instructions (feeds llms.txt and .md exports): MCP endpoint, npx skills add, .md suffix, dashboard auth pointer.

How to test this layer

  1. JSON validity: python3 -m json.tool docs.json > /dev/null && python3 -m json.tool vercel.json > /dev/null.
  2. MCP rewrite (against the preview or prod Vercel domain after merge): curl -s -X POST https://<domain>/docs/mcp -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"0"}}}' expects HTTP 200 (note: via cerebrium.ai this still 406s until the CloudFront PR in eks is applied; test against the Vercel domain directly).
  3. Discovery files: curl -s https://<domain>/.well-known/mcp.json and /.well-known/agent-card.json expect 200; /docs/llms.txt, /docs/sitemap.xml, /docs/robots.txt expect 200 (these were broken before).
  4. On the Vercel preview deployment: the contextual menu on any docs page shows the 10 options.

Notes

  • The proxied /.well-known/mcp.json body still advertises an internal mintlify.me URL; rewrites cannot fix response bodies. Raise with Mintlify (tracked in plan.md).
  • Root-level /.well-known/* rewrites only serve traffic that reaches this Vercel project; apex cerebrium.ai routing is the CloudFront change in the eks repo (separate PR).

Stack position: 1 of 3 (proxy wiring + contextual config -> content accuracy -> orphan cleanup)

🤖 Generated with Claude Code

@mintlify

mintlify Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
cerebrium 🟢 Ready View Preview Aug 4, 2026, 9:40 AM

Migrate vercel.json rewrites from cerebrium.mintlify.dev to
cerebrium.mintlify.site, repair the broken /docs/mcp and
llms/sitemap/robots rewrites, and add agent-discovery rewrites for
/.well-known/mcp.json, skills, agent-skills and agent-card.json.
Extend the docs.json contextual menu from 4 to 10 options and add
markdown.instructions for llms.txt and .md exports.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kylegani
kylegani force-pushed the kyle/phase0-docs-fixes branch from ec7972f to 522b795 Compare August 4, 2026 09:54
@kylegani kylegani changed the title Fix agent-facing docs: MCP proxy targets, contextual menu, GPU tables, curl snippets Phase 0 docs 1/3: MCP proxy wiring and contextual agent config Aug 4, 2026
@kylegani
kylegani marked this pull request as ready for review August 4, 2026 11:58
@kylegani
kylegani requested a review from milo157 as a code owner August 4, 2026 11:58
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