Skip to content

docs(mcp): document the stdio transport + MCP as an authz execution surface#3287

Merged
os-zhuang merged 1 commit into
mainfrom
claude/mcp-server-default-wiring-ydcj2n
Jul 19, 2026
Merged

docs(mcp): document the stdio transport + MCP as an authz execution surface#3287
os-zhuang merged 1 commit into
mainfrom
claude/mcp-server-default-wiring-ydcj2n

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What & why

The serve-side MCP work (#3167) landed a second transport (long-lived stdio, ADR-0101) and a second identity-admission path, but two hand-written docs still described only the HTTP surface. This closes those two gaps.

content/docs/ai/connect-mcp.mdx — add a stdio section

The page covered only OAuth/API-key over HTTP. Added a "Local stdio transport (opt-in)" section:

  • The OS_MCP_STDIO_ENABLED / OS_MCP_STDIO_API_KEY boot switches (off by default, stricter than HTTP).
  • The identity model: no per-request identity — the transport runs as a single principal pinned via OS_MCP_STDIO_API_KEY, resolved through the same verify + authz chain as HTTP/REST and re-checked on every call (revocation takes effect live), so RBAC/RLS/FLS/tenant apply exactly as they would to that identity.
  • Fail-closed posture: a missing/unknown/revoked/expired/owner-less key refuses to start the transport — no unscoped or system bypass (ADR-0101).
  • A troubleshooting row for the fail-closed boot.

content/docs/permissions/authorization.mdx — enumerate MCP as an execution surface

The enforcement-chain narrative never listed MCP among the surfaces that reach object data. Added a "The MCP execution surface (ADR-0096 / ADR-0101)" subsection:

  • MCP reaches object data only through the same gates 3–6 as REST via a per-request, principal-bound bridge (callData with the caller's ExecutionContext).
  • HTTP (/api/v1/mcp, ADR-0096): dispatcher resolves the same EC; no userId and not isSystem ⇒ 401 (RFC 9728 WWW-Authenticate when the OAuth track is live); OAuth token narrows tool families to granted scopes (403 on none). Enforcement: http-dispatcher.ts handleMcp + buildMcpBridge(context).
  • stdio (ADR-0101): env-key principal, fail-closed, no system bypass. Enforcement: mcp/plugin.ts start().
  • Both transports cited by their enforced conformance-matrix rows (mcp-http-identity, mcp-stdio-authority); added ADR-0096/0101 to the ADR index.

Accuracy basis

Every claim traced to code: packages/runtime/src/http-dispatcher.ts (handleMcp, 401/403 admission, buildMcpBridge), packages/mcp/src/plugin.ts (resolveStdioExecutionContextresolveAuthzContext, fail-closed start()), and the mcp-http-identity / mcp-stdio-authority rows in packages/qa/dogfood/test/authz-conformance.matrix.ts. Env-var names match content/docs/deployment/environment-variables.mdx.

Testing

  • node scripts/check-doc-authoring.mjs → clean (200 files).
  • ADR links (/adr/0096-…, /adr/0101-…) follow the 10 existing /adr/00xx-… precedents in the same file; both target files exist.

Notes

  • Docs-only. @objectstack/docs is private → no changeset.

🤖 Generated with Claude Code

https://claude.ai/code/session_0115eg8dAaCfWaDYYAm3ma36


Generated by Claude Code

…urface

The serve-side MCP work (#3167) landed a second transport and a second
identity-admission path, but two hand-written docs still described only the
HTTP surface:

- content/docs/ai/connect-mcp.mdx had no stdio section. Add one covering the
  opt-in OS_MCP_STDIO_ENABLED / OS_MCP_STDIO_API_KEY switches, the pinned
  single-principal identity model (resolved through the same verify chain,
  re-checked per call), and the fail-closed / no-`system`-bypass posture
  (ADR-0101), plus a troubleshooting row for the fail-closed boot.

- content/docs/permissions/authorization.mdx did not enumerate MCP among the
  execution surfaces. Add a subsection describing both transports' fail-closed
  identity admission and the shared principal-bound path through gates 3-6
  (ADR-0096 HTTP handleMcp/buildMcpBridge; ADR-0101 stdio plugin start), and
  list ADR-0096/0101 in the ADR index.

Docs-only; @objectstack/docs is private (no changeset). doc-authoring guard clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0115eg8dAaCfWaDYYAm3ma36
@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jul 19, 2026 2:08pm

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation size/s and removed documentation Improvements or additions to documentation labels Jul 19, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review July 19, 2026 14:14
@os-zhuang
os-zhuang merged commit 606a4c4 into main Jul 19, 2026
14 of 15 checks passed
@os-zhuang
os-zhuang deleted the claude/mcp-server-default-wiring-ydcj2n branch July 19, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants