You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/mcp-2026-07-28-upgrade.md
+54-9Lines changed: 54 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
# MCP 2026-07-28 Upgrade
2
2
3
-
Branch: `ccbbccbb/mcp-2026-07-28-upgrade`
4
-
5
3
This repository targets the final MCP `2026-07-28` specification through the released TypeScript SDK v2 packages. The release-candidate compatibility adapter has been removed.
6
4
7
5
## Authoritative Sources
@@ -16,6 +14,7 @@ This repository targets the final MCP `2026-07-28` specification through the rel
16
14
- Replaced `@modelcontextprotocol/sdk` v1 with:
17
15
-`@modelcontextprotocol/server` v2
18
16
-`@modelcontextprotocol/node` v2
17
+
-`@modelcontextprotocol/express` v2
19
18
- Zod v4.2 or newer
20
19
- Replaced the local JSON-RPC adapter with SDK-native `createMcpHandler` and `serveStdio`.
21
20
- Kept stdio dual-era:
@@ -30,9 +29,28 @@ This repository targets the final MCP `2026-07-28` specification through the rel
30
29
-`Mcp-Method`
31
30
-`Mcp-Name`
32
31
- Added Host and Origin validation before the HTTP MCP handler.
32
+
- Added MCP OAuth resource-server support for HTTP:
33
+
- localhost can run without authorization
34
+
- non-local binds fail closed unless OAuth is configured
35
+
- authorization-server metadata discovery and RFC 7662 token introspection
36
+
- baseline `mcp`, wallet-write `evm:write`, and signing `evm:sign` scopes
33
37
- Configured all static list capabilities with `listChanged: false`; resource subscriptions remain disabled.
34
-
- Configured one-hour public cache hints for discovery, list operations, resource templates, and resource reads.
38
+
- Configured one-hour public cache hints for discovery, static list operations, resource templates, and the public `evm://networks`resource. Unannotated future resources retain conservative cache defaults.
35
39
- Migrated MCP-bound schemas to Zod 4 object schemas so the SDK emits JSON Schema 2020-12.
40
+
- Added an `outputSchema` to all 25 tools. Every successful tool call returns equivalent JSON in both `structuredContent` and a pretty-printed text content block; bigint values are represented as decimal strings.
41
+
- Added native MCP multi-round-trip confirmation to the six wallet-backed operations:
42
+
-`write_contract`
43
+
-`transfer_native`
44
+
-`transfer_erc20`
45
+
-`approve_token_spending`
46
+
-`sign_message`
47
+
-`sign_typed_data`
48
+
- Integrity-protected confirmation continuation state with the SDK HMAC codec:
49
+
- binds the complete tool arguments and current HTTP bearer token
50
+
- expires after five minutes
51
+
- is consumed once per process before wallet access
52
+
- rejects tampering, argument changes, cross-token use, and replay
53
+
- Bounded `wait_for_transaction` with `timeoutSeconds` from 1 through 90, defaulting to 90 seconds so it returns before the 120-second HTTP transport timeout.
36
54
- Kept process diagnostics on `stderr`, including the npm CLI startup line, so stdio `stdout` contains protocol messages only.
37
55
38
56
## Final-Spec Differences from the RC
@@ -47,11 +65,35 @@ The repository no longer carries RC behavior for the following changes:
47
65
48
66
## Compatibility Decisions
49
67
50
-
- HTTP remains strict `2026-07-28` to preserve the RC branch's modern-only deployment decision.
68
+
- HTTP remains strict `2026-07-28` to preserve the existing modern-only deployment decision.
51
69
- Stdio serves both modern and legacy clients because local hosts commonly require gradual negotiation.
52
70
- The static tool, prompt, and resource surfaces do not advertise change notifications.
53
-
-`wait_for_transaction` remains a normal synchronous tool. The Tasks extension is not advertised.
54
-
- The server does not implement MCP OAuth. It uses environment-configured RPC and wallet credentials.
71
+
-`wait_for_transaction` remains a bounded synchronous tool. The Tasks extension is not advertised because the released v2 SDK removed its experimental server runtime; the extension currently has no supported TypeScript runtime integration to adopt.
72
+
- Wallet-backed operations are not executed until the client accepts the tool's MCP `input_required` confirmation. Prompts and server instructions do not request a second conversational confirmation.
73
+
- OAuth is HTTP-only. Stdio continues to obtain wallet and RPC credentials from its environment.
74
+
75
+
## HTTP OAuth Configuration
76
+
77
+
The HTTP process acts as an OAuth resource server; it does not issue access tokens. With the default local `MCP_HOST=127.0.0.1`, omitting `MCP_OAUTH_ISSUER_URL` keeps OAuth disabled. Setting it enables OAuth locally. Binding to a non-local interface requires OAuth and aborts startup if the configuration is incomplete.
78
+
79
+
Required when OAuth is enabled:
80
+
81
+
-`MCP_OAUTH_ISSUER_URL`: exact HTTPS authorization-server issuer without a query or fragment
82
+
-`MCP_PUBLIC_URL`: exact externally reachable MCP endpoint with the `/mcp` path and no query or fragment; non-local deployments require HTTPS
83
+
-`MCP_OAUTH_CLIENT_ID`: RFC 7662 introspection client ID
-`MCP_OAUTH_METADATA_URL`: authorization-server metadata URL; defaults to the RFC 8414 URL derived from the issuer, including correct well-known path insertion for issuers with a path
89
+
-`MCP_OAUTH_INTROSPECTION_URL`: introspection endpoint when metadata does not publish `introspection_endpoint`
90
+
-`MCP_OAUTH_AUDIENCE`: expected token audience/resource; defaults to `MCP_PUBLIC_URL`
91
+
-`MCP_OAUTH_SCOPES`: additional advertised scopes; the minimal built-in `mcp` scope is always advertised
92
+
-`MCP_OAUTH_REQUIRED_SCOPES`: additional scopes required for every MCP request; the baseline `mcp` scope is always required
93
+
94
+
Introspection must return an active token with a client identity, expiration, the expected audience/resource, and appropriate scopes. In addition to the baseline scope, transaction and approval tools require `evm:write`; signing tools require `evm:sign`.
95
+
96
+
Authorization-server metadata must support the authorization-code response type and PKCE `S256`. The issuer, metadata URL, and every authorization-server endpoint must use HTTPS. Metadata discovery and introspection reject redirects and use a 10-second deadline.
55
97
56
98
## Verification
57
99
@@ -60,9 +102,13 @@ The automated MCP integration tests cover:
60
102
- final `server/discover` shape and server identity metadata
61
103
- optional `clientInfo`
62
104
- deterministic tool listing and closed no-argument schemas
105
+
- output schemas and structured tool results
106
+
- confirmation requests and declines for all six wallet-backed operations, plus shared-helper coverage for argument binding, tamper rejection, and single-use replay prevention
107
+
- bounded transaction waiting
63
108
- cache hints on discovery, list, and resource results
64
109
- resource reads and a read-only tool call
65
110
- final `HeaderMismatch` and `UnsupportedProtocolVersion` error codes
111
+
- local authorization opt-out, remote fail-closed behavior, OAuth metadata validation, RFC 7662 introspection, audience checks, and scopes
66
112
67
113
Release checks:
68
114
@@ -77,6 +123,5 @@ bun run build:http
77
123
78
124
These are enhancements, not compliance blockers:
79
125
80
-
- Add `outputSchema` and `structuredContent` to high-value read tools while preserving text content for older clients.
81
-
- Adopt the Tasks extension only if transaction confirmation regularly exceeds practical request timeouts.
82
-
- Add MCP OAuth before exposing wallet-backed write tools through a shared remote deployment.
126
+
- Revisit the Tasks extension only after the official SDK provides a released server runtime for the final extension protocol.
127
+
- Add deployment-specific rate limiting, audit logging, secret management, and authorization-server operational guidance before hosting a shared production endpoint.
0 commit comments