Skip to content

docs(adr): ADR-0101 — MCP stdio principal admission (env API-key identity, fail-closed, no system bypass)#3250

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

docs(adr): ADR-0101 — MCP stdio principal admission (env API-key identity, fail-closed, no system bypass)#3250
os-zhuang merged 1 commit into
mainfrom
claude/mcp-server-default-wiring-ydcj2n

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What & why

记录关闭平台最后一个无身份执行面的决策:长驻 MCP stdio 传输——它把裸 metadata 服务 + data engine 桥到长驻 server(record_by_id resource 直接 dataEngine.findOne(...),无 ExecutionContext → 绕过 RLS/FLS/租户)。这正是 mcp-stdio-authority 矩阵行 note 里写明的 ADMISSION REQUIREMENT。

纯文档(ADR),Status: Proposed——先把决策摆上桌评审;实现(v1)单独走,tracked in #3246

三个决策

  • D1:stdio 的身份 = env 供给的 API key(OS_MCP_STDIO_API_KEY),经 @objectstack/core 与 HTTP/REST 同一条 verify 链解析成 EC,线进每次 stdio 数据读(逐调用重解析,吊销即时生效)。
  • D2:fail-closed——开了 stdio auto-start 但无有效 key → 拒绝启动 stdio;HTTP 面不受影响。
  • D3:不提供 system 旁路。要满权就给平台管理员/专用 service 身份 mint 一个 key(可审计、可吊销、可轮换、按 posture scope),而不是一个跳过身份的开关。ADR 里用一张对比表 + "naming a fall-open doesn't make it not a fall-open" 记录了否决理由,避免半年后有人重新发明 OS_MCP_STDIO_IDENTITY=system

三方证据(ADR 内引用)

MCP 规范(stdio 不做传输认证、后端凭据从 env 供给)· Postgres/GitHub MCP server(按供给凭据 scope,superuser 也得显式供给)· Anthropic agent-identity 模型(admin 预置的 scoped、可吊销 service 身份)。ObjectStack 当前 stdio 比这三者都松(无凭据即满权)——本决策把它拉齐。

关系

验收

ADR 合入 = 决策 Accepted;随后 #3246 落地 v1 时 mcp-stdio-authorityexperimentalenforced

Refs #3246(实现)、#3167#3217#3228#3055、ADR-0096、ADR-0036。

🤖 Generated with Claude Code

https://claude.ai/code/session_0115eg8dAaCfWaDYYAm3ma36


Generated by Claude Code

…tity, fail-closed, no system bypass)

Records the decision closing the platform's last identity-less execution
surface: the long-lived MCP stdio transport, which bridges the raw metadata
service + data engine with no per-request principal (the `mcp-stdio-authority`
conformance row's ADMISSION REQUIREMENT).

- D1: stdio's identity is an env-supplied API key (OS_MCP_STDIO_API_KEY),
  resolved through the same @objectstack/core verify chain as HTTP/REST, and
  threaded as the ExecutionContext every stdio data read runs under (per-call,
  so revocation applies live).
- D2: fail-closed — stdio auto-start without a valid key refuses to start; the
  HTTP surface is unaffected.
- D3: no `system` bypass mode — full authority is a provisioned+minted key
  (attributable, revocable, scoped), never an identity-skipping switch. Records
  why (industry alignment: MCP spec env-credential model, Postgres/GitHub MCP
  servers, Anthropic's agent-identity model) so nobody re-invents it.

Status: Proposed. Implementation tracked in #3246. Extends ADR-0096; sibling
to the consume-side spawn policy (#3055).

Refs #3246, #3167, #3228, #3217, ADR-0096, ADR-0036.

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 Ready Ready Preview, Comment Jul 19, 2026 5:37am

Request Review

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

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants