fix(mcp): quickstart session handling, modern carrier demo, current pins#832
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the MCP HTTP quickstart so it exercises the real MCP path, modernizes the MCP tool-call example to the current
_metaevidence carrier with explicit tamper-detection checks, and updates plugin-pack pins to the published0.15.0server. Examples and configuration pins only; no package source, wire format, schema, or runtime behavior changes.Scope
examples/mcp-http-quickstart/quickstart.tsexamples/mcp-tool-call/demo.ts,examples/mcp-tool-call/README.md,examples/mcp-tool-call/package.jsonsurfaces/plugin-pack/{claude-code/.mcp.json, cursor/mcp.json, codex/codex-config.pinned.json, vscode/mcp.json}Explicitly not changed: any published package source, tool schemas, the carrier format, transports.
Changes
peac_verifywith the correctjwsinput field (wasreceipt) plus the public key (offline verification) and anissuerexpectation (issuer binding), captures theMcp-Session-Idheader frominitializeand reuses it on subsequent requests, sends the current2025-11-25protocol version with anAcceptheader covering JSON and SSE responses, sendsnotifications/initializedas a proper JSON-RPC notification (noid) via a dedicated helper that drains the response body, applies a 10s request timeout to all fetch calls, and labels local verification explicitly as a fallback when the MCP path did not verify (no more silent fallback).peac_receipthelper with the current carrier (computeReceiptRef+attachReceiptToMeta+extractReceiptFromMetaAsync, top-level_metakeys), and adds two tamper checks: a modifiedreceipt_jwsis rejected by thereceipt_refconsistency check, and a modified payload fails Ed25519 verification withE_INVALID_SIGNATURE. Thetype_unregisteredwarning for integrator-defined type URI values remains documented and asserted.@peac/[email protected]->@peac/[email protected]across the four client configs.Validation
@peac/mappings-mcptests: 81 passed.@peac/mcp-servertests: 289 passed.examples/mcp-tool-call:tsc --noEmitclean;pnpm demoruns end-to-end with both tamper checks failing as expected.examples/mcp-http-quickstart: verified against a locally started--transport httpserver (session header honored,peac_verifyreturns PASSED through the MCP path) and against an unreachable server (fallback clearly labeled, exit reflects state).