Skip to content

docs(mcp): restructure MCP docs and add OAuth 2.1 authorization (ENG-9125)#2690

Merged
asoorm merged 10 commits intomainfrom
ahmet/eng-9125-mcp-docs-restructure-oauth
Apr 20, 2026
Merged

docs(mcp): restructure MCP docs and add OAuth 2.1 authorization (ENG-9125)#2690
asoorm merged 10 commits intomainfrom
ahmet/eng-9125-mcp-docs-restructure-oauth

Conversation

@asoorm
Copy link
Copy Markdown
Contributor

@asoorm asoorm commented Mar 25, 2026

Summary

  • Restructure MCP docs from single 800-line page into multi-page architecture (overview, quickstart, operations, configuration, oauth, ide-setup)
  • Add OAuth 2.1 authorization docs: 5-level scope enforcement, step-up authorization with WWW-Authenticate challenges, OR-of-AND scope semantics, RFC 9728 discovery
  • Validate docs against router/pkg/mcpserver/ implementation and fix inaccuracies

Ported from wundergraph/cosmo-docs#260.

Test plan

  • Preview deployment renders correctly
  • Navigation group and internal links work
  • OAuth section accurately reflects scope enforcement behavior

Summary by CodeRabbit

  • Documentation
    • Rebranded and refreshed MCP Gateway docs; added Quickstart, Configuration, IDE & AI tool setup, Operations, and OAuth security pages; streamlined main page into a "Get Started" flow.
  • Navigation
    • Introduced an “MCP Gateway” group containing MCP docs and restored “Custom Modules” as its own group.
  • Chores
    • Normalized navigation JSON formatting and compacted pages arrays for consistency.

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented Mar 25, 2026

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

Project Status Preview Updated (UTC)
wundergraphinc 🟢 Ready View Preview Mar 25, 2026, 10:25 AM

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 25, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Reorganizes docs navigation to add a grouped "MCP Gateway" section, converts the MCP landing page into a concise overview, and adds five new MCP reference pages (quickstart, operations, configuration, IDE setup, OAuth). Also normalizes JSON formatting in docs-website/docs.json.

Changes

Cohort / File(s) Summary
Docs navigation
docs-website/docs.json
Normalized whitespace/indentation and compacted array literals; removed top-level router/mcp entry and added a grouped MCP Gateway (icon robot) plus a separate Custom Modules group.
MCP landing
docs-website/router/mcp.mdx
Rebranded page to “MCP Gateway”, updated frontmatter and intro, condensed capabilities and rationale, added “Get Started” navigation cards, and removed large configuration/install sections.
New MCP references
docs-website/router/mcp/quickstart.mdx, docs-website/router/mcp/operations.mdx, docs-website/router/mcp/configuration.mdx, docs-website/router/mcp/ide-setup.mdx, docs-website/router/mcp/oauth.mdx
Added five new docs covering Quickstart, Operations (tool loading/naming/validation), Configuration (options, env vars, storage, sessions, CORS), IDE & AI Tool Setup (client configs and header forwarding), and OAuth 2.1/JWKS (token validation, scopes, errors, metadata).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main changes: restructuring MCP documentation and adding OAuth 2.1 authorization, matching the file changes and objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs-website/router/mcp/configuration.mdx`:
- Around line 104-107: The Info box incorrectly states that session.stateless is
reserved and that the server always runs stateful; update or remove that Info
block so it accurately reflects the real behavior: session.stateless is an
active setting (default true) which causes the MCP server to operate in
stateless mode when true; locate the Info element in configuration.mdx and
either replace its text to state that session.stateless defaults to true and
enables stateless mode, or remove the Info box entirely if no extra note is
needed, ensuring mention of the configuration key session.stateless and its
default behavior is consistent with the rest of the doc.

In `@docs-website/router/mcp/ide-setup.mdx`:
- Around line 13-17: Update the docs to stop saying the MCP server "forwards all
headers" and instead state that it forwards most client headers but excludes a
set of filtered headers defined in headers.SkippedHeaders (see the connectrpc
handler implementation that filters headers in the handler code path),
mentioning that hop-by-hop/custom excluded headers are skipped; reference
headers.SkippedHeaders and the connectrpc handler function when editing the text
so readers know where the filtering occurs.

In `@docs-website/router/mcp/operations.mdx`:
- Around line 125-129: The docs paragraph is wrong: the implementation (check of
operationToolName against registeredTools and reservedToolNames in server.go
which logs via s.logger.Error with op.Name and operationToolName and then
continue) skips colliding operations rather than prefixing them; update the
documentation text to state that colliding operations are skipped and an error
is logged (referencing the behavior tied to operationToolName,
registeredTools/reservedToolNames, s.logger.Error and the continue path) so docs
match the actual server behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1cdaf0a0-f87d-41d6-a321-7c642670c50d

📥 Commits

Reviewing files that changed from the base of the PR and between dcd4e0a and 7ea8d9c.

📒 Files selected for processing (7)
  • docs-website/docs.json
  • docs-website/router/mcp.mdx
  • docs-website/router/mcp/configuration.mdx
  • docs-website/router/mcp/ide-setup.mdx
  • docs-website/router/mcp/oauth.mdx
  • docs-website/router/mcp/operations.mdx
  • docs-website/router/mcp/quickstart.mdx

Comment thread docs-website/router/mcp/configuration.mdx Outdated
Comment thread docs-website/router/mcp/ide-setup.mdx Outdated
Comment thread docs-website/router/mcp/operations.mdx
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs-website/router/mcp.mdx (1)

9-9: Tighten wording for clarity in the intro sentence.

The phrase “operations, or capabilities as MCP tools” reads ambiguously. Consider simplifying to make the two exposure modes explicit.

✏️ Suggested wording
-WunderGraph's MCP Gateway is a feature of the Cosmo Router that enables AI models to interact with your GraphQL APIs using a structured protocol. We can expose a predefined set of safelisted operations, or capabilities as MCP tools, or allow agents to execute GraphQL directly.
+WunderGraph's MCP Gateway is a feature of the Cosmo Router that enables AI models to interact with your GraphQL APIs using a structured protocol. It can either expose a predefined set of safelisted operations as MCP tools or allow agents to execute GraphQL directly.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs-website/router/mcp.mdx` at line 9, Rewrite the ambiguous intro sentence
to clearly state the two exposure modes: expose a predefined set of safelisted
operations as MCP tools, or allow agents to execute GraphQL directly; replace
the current phrase “operations, or capabilities as MCP tools” with a concise
construction such as “expose a predefined set of safelisted operations as MCP
tools, or allow agents to execute GraphQL directly” so the difference between
the two modes is explicit.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs-website/router/mcp.mdx`:
- Line 9: Rewrite the ambiguous intro sentence to clearly state the two exposure
modes: expose a predefined set of safelisted operations as MCP tools, or allow
agents to execute GraphQL directly; replace the current phrase “operations, or
capabilities as MCP tools” with a concise construction such as “expose a
predefined set of safelisted operations as MCP tools, or allow agents to execute
GraphQL directly” so the difference between the two modes is explicit.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ad9a1d14-c2f8-4264-8975-d91e523875e2

📥 Commits

Reviewing files that changed from the base of the PR and between af21d71 and 370d332.

📒 Files selected for processing (7)
  • docs-website/docs.json
  • docs-website/router/mcp.mdx
  • docs-website/router/mcp/configuration.mdx
  • docs-website/router/mcp/ide-setup.mdx
  • docs-website/router/mcp/oauth.mdx
  • docs-website/router/mcp/operations.mdx
  • docs-website/router/mcp/quickstart.mdx
✅ Files skipped from review due to trivial changes (6)
  • docs-website/router/mcp/ide-setup.mdx
  • docs-website/router/mcp/quickstart.mdx
  • docs-website/docs.json
  • docs-website/router/mcp/operations.mdx
  • docs-website/router/mcp/configuration.mdx
  • docs-website/router/mcp/oauth.mdx

@asoorm asoorm force-pushed the ahmet/eng-9125-mcp-docs-restructure-oauth branch from 370d332 to 915a4d4 Compare March 25, 2026 13:18
@asoorm asoorm force-pushed the ahmet/eng-9125-mcp-docs-restructure-oauth branch from 915a4d4 to 9bab331 Compare March 25, 2026 13:20
@asoorm asoorm marked this pull request as ready for review March 25, 2026 13:20
@asoorm asoorm requested review from a team as code owners March 25, 2026 13:20
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs-website/router/mcp.mdx (1)

7-18: ⚠️ Potential issue | 🟠 Major

Update the MCP specification version to the latest available.

The specification version 2025-06-18 is real but not the latest. Version 2025-11-25 is the current latest version of the MCP specification. Update line 18 to reference 2025-11-25 instead, and remove or correct the claim that it is the "latest" supported version if the older version is still actively supported.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs-website/router/mcp.mdx` around lines 7 - 18, Update the MCP
specification version referenced in the Note from `2025-06-18` to `2025-11-25`
and adjust the wording in the Note element (the string "We support only the
latest MCP specification `2025-06-18` with Streamable HTTP support.") so it no
longer incorrectly claims `2025-06-18` is the latest; either state that the docs
support `2025-11-25` or list both versions if older versions remain supported,
making the Note text reflect the correct supported spec(s).
🧹 Nitpick comments (1)
docs-website/router/mcp.mdx (1)

79-81: Clarify the GraphQL spec version reference for block string descriptions.

Block string descriptions (triple-quoted strings) were introduced in the June 2018 GraphQL specification, not September 2025. The phrase "Using the September 2025 GraphQL spec" on line 81 is misleading. Either reference the June 2018 spec where the feature originated, or use "GraphQL spec" without a date to avoid implying this is a recently added feature.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs-website/router/mcp.mdx` around lines 79 - 81, The documentation
incorrectly attributes block string descriptions to the "September 2025 GraphQL
spec"; update the "Self-documenting operations" line containing the phrase
"Using the September 2025 GraphQL spec" to either reference the correct origin
"June 2018 GraphQL spec" or remove the date and use "the GraphQL spec" to avoid
implying it's a recent addition—edit the text under the "Self-documenting
operations" bullet accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@docs-website/router/mcp.mdx`:
- Around line 7-18: Update the MCP specification version referenced in the Note
from `2025-06-18` to `2025-11-25` and adjust the wording in the Note element
(the string "We support only the latest MCP specification `2025-06-18` with
Streamable HTTP support.") so it no longer incorrectly claims `2025-06-18` is
the latest; either state that the docs support `2025-11-25` or list both
versions if older versions remain supported, making the Note text reflect the
correct supported spec(s).

---

Nitpick comments:
In `@docs-website/router/mcp.mdx`:
- Around line 79-81: The documentation incorrectly attributes block string
descriptions to the "September 2025 GraphQL spec"; update the "Self-documenting
operations" line containing the phrase "Using the September 2025 GraphQL spec"
to either reference the correct origin "June 2018 GraphQL spec" or remove the
date and use "the GraphQL spec" to avoid implying it's a recent addition—edit
the text under the "Self-documenting operations" bullet accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: aed11b06-d125-4c1c-812a-ffe5b1149033

📥 Commits

Reviewing files that changed from the base of the PR and between 915a4d4 and 9bab331.

📒 Files selected for processing (7)
  • docs-website/docs.json
  • docs-website/router/mcp.mdx
  • docs-website/router/mcp/configuration.mdx
  • docs-website/router/mcp/ide-setup.mdx
  • docs-website/router/mcp/oauth.mdx
  • docs-website/router/mcp/operations.mdx
  • docs-website/router/mcp/quickstart.mdx
✅ Files skipped from review due to trivial changes (5)
  • docs-website/router/mcp/quickstart.mdx
  • docs-website/router/mcp/ide-setup.mdx
  • docs-website/router/mcp/configuration.mdx
  • docs-website/router/mcp/oauth.mdx
  • docs-website/router/mcp/operations.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs-website/docs.json

Copy link
Copy Markdown
Contributor

@shamashel shamashel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loving this in general. Getting subpages really makes it feel like MCP has first-class support.

Left a couple comments, but this is really good!

Comment thread docs-website/router/mcp/configuration.mdx Outdated
Comment thread docs-website/router/mcp/configuration.mdx Outdated
Comment thread docs-website/router/mcp/oauth.mdx Outdated
asoorm added 4 commits March 31, 2026 12:22
…9125)

Restructure MCP docs from single page into multi-page architecture
(overview, quickstart, operations, configuration, oauth, ide-setup).
Add OAuth 2.1 scope enforcement docs with JWKS config, multi-level
scope gates, step-up authorization, and RFC 9728 metadata discovery.

Ported from wundergraph/cosmo-docs#260.
Split the single OAuth page into four pages by documentation type:
- Overview (explanation): how OAuth works in MCP context
- Quickstart (tutorial): step-by-step setup with verification
- Scope Enforcement (explanation): multi-level additive model
- Configuration Reference (reference): config tables, env vars, error formats

This addresses customer feedback that the OAuth docs were detailed
but complex, mixing reference, explanation, and how-to content
on a single page.
Most MCP clients (including Claude Code) do not yet support 403
insufficient_scope step-up re-authorization. Document the limitation
with workarounds and link to anthropics/claude-code#44652.
Comment thread docs-website/router/mcp/oauth/configuration.mdx Outdated
Comment thread docs-website/router/mcp/oauth/configuration.mdx Outdated
Comment thread docs-website/router/mcp/oauth/configuration.mdx
Comment thread docs-website/router/mcp/oauth/configuration.mdx Outdated
Comment thread docs-website/router/mcp/oauth/configuration.mdx Outdated
Comment thread docs-website/router/mcp/oauth/configuration.mdx Outdated
Comment thread docs-website/router/mcp/oauth/scopes.mdx
Comment thread docs-website/router/mcp/oauth/scopes.mdx Outdated
Comment thread docs-website/router/mcp/oauth/scopes.mdx Outdated
Comment thread docs-website/router/mcp.mdx Outdated
…ure-oauth' into ahmet/eng-9125-mcp-docs-restructure-oauth
@asoorm asoorm enabled auto-merge (squash) April 20, 2026 15:43
@asoorm asoorm merged commit 1b0adc9 into main Apr 20, 2026
7 of 10 checks passed
@asoorm asoorm deleted the ahmet/eng-9125-mcp-docs-restructure-oauth branch April 20, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants