Skip to content

Mcp-ts support for batch-settlement#2238

Open
phdargen wants to merge 1 commit intox402-foundation:mainfrom
phdargen:batch-settlement-mcp-ts
Open

Mcp-ts support for batch-settlement#2238
phdargen wants to merge 1 commit intox402-foundation:mainfrom
phdargen:batch-settlement-mcp-ts

Conversation

@phdargen
Copy link
Copy Markdown
Collaborator

@phdargen phdargen commented May 8, 2026

Description

  • add missing mcp hook primitives aligning with http transport: skipHandler, cancellation dispatcher etc
  • changed the core v2 matcher so paymentPayload.accepted.extra may include additive client fields, while all server-declared fields still have to match -> this allows corrective 402 retries with payloads based on either original 402 or corrective 402 requirements
  • add batch-settlement to mcp-ts e2e tests

Tests

Checklist

  • I have formatted and linted my code
  • All new and existing tests pass
  • My commits are signed (required for merge) -- you may need to rebase if you initially pushed unsigned commits
  • I added a changelog fragment for user-facing changes (docs-only changes can skip)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

@phdargen is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added typescript sdk Changes to core v2 packages labels May 8, 2026
@phdargen phdargen force-pushed the batch-settlement-mcp-ts branch from 07fe3ef to b09454d Compare May 8, 2026 14:30
@github-actions github-actions Bot added the examples Changes to examples label May 8, 2026
@ryanRfox
Copy link
Copy Markdown
Contributor

ryanRfox commented May 8, 2026

Hey @phdargen, I just opened #2250 (issue #2249) which makes the e2e harness chain-pluggable for any EVM chain in DEFAULT_STABLECOINS. We're touching some of the same files and are directionally aligned: we both widened MCP scheme registration to eip155:* independently.

Two spots where we picked different patterns and it might be worth comparing notes:

Chain selection. I went with a catalog lookup (resolveViemChain(caip2) walks viem's chain DB and falls back to defineChain for any chain viem hasn't packaged), so any chain in DEFAULT_STABLECOINS works without harness edits. You used a binary eip155:8453 ? base : baseSepolia ternary in e2e/clients/mcp-typescript/index.ts:21, so any non-Base-mainnet CAIP-2 (e.g. eip155:31611, Mezo Testnet, which also has batch-settlement) silently falls through to Base Sepolia's RPC.

EIP-712 token name. Same binary in e2e/servers/mcp-typescript/index.ts:103 (EVM_NETWORK === "eip155:84532" ? "USDC" : "USD Coin"). I replaced the corresponding ternaries in the four other EVM servers with EVM_PERMIT2_ASSET_NAMES: Record<string, string> keyed by EVM_NETWORK. FWIW Permit2's EIP-712 domain doesn't include token name or version, so this one's largely cosmetic. Mentioning it more for symmetry across the EVM servers than correctness.

Also: #2250 wires EVM_PERMIT2_ASSET from the resolved NetworkConfig in generic-server.ts, so spawned servers get it set per-network without reading the env directly.

Your new env vars in test.config.json optional arrays lgtm. Same table-driven pattern I'm using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

examples Changes to examples sdk Changes to core v2 packages typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants