Commit e472bbe
Both MCP transports register the same tools from the same McpDataBridge, but
the two hosts implement that bridge over different seams: HTTP runs every data
verb through callData, which gates on the object's declared apiEnabled /
apiMethods before dispatch, while the stdio bridge went straight to the engine
and applied no gate. One declaration, two transports, two answers.
This is a surface-area declaration leak, not an authorization bypass -- the
gate is a surface-area control by api-exposure.ts's own ADR note, and every
stdio call passed the engine's CRUD/FLS/RLS before this change and after it.
What was leaking is the author's exposure declaration.
The decision is not re-implemented here: it comes from the spec's single source
of truth (resolveEffectiveApiMethods / isApiOperationAllowed), the same helpers
checkApiExposure (runtime) and apiAccessDenialFromEnable (rest) delegate to, so
each surface owns only its envelope. Refusals carry the same two machine codes
REST answers with.
Gated verbs are exactly the six buildMcpBridge routes through callData;
list_objects / describe_object stay ungated because the HTTP bridge answers
both off the metadata service, and gating them would be a fresh divergence
pointing the other way. The isSystem bypass, the fail-open on unresolvable
metadata and the flat-shape fallback are matched to the HTTP path deliberately.
Claude-Session: https://claude.ai/code/session_016pY4Xb2iDecfDtT3CWoiTW
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6ca0b49 commit e472bbe
3 files changed
Lines changed: 555 additions & 5 deletions
File tree
- .changeset
- packages/mcp/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
0 commit comments