Skip to content

feat: production alignment — schemes, Path2, rmcp MCP parity - #55

Merged
gitctrlx merged 5 commits into
mainfrom
feat/production-alignment
Aug 8, 2026
Merged

feat: production alignment — schemes, Path2, rmcp MCP parity#55
gitctrlx merged 5 commits into
mainfrom
feat/production-alignment

Conversation

@gitctrlx

@gitctrlx gitctrlx commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

Production-alignment slice (ex-chain-breadth), now including full V2 MCP transport on the official Rust MCP SDK.

Delivered

  • Scheme markersbatch-settlement / auth-capture sealed markers in r402-core.
  • SVM Path 2 foundationenable_smart_wallet_verification (default false, matches TS). Path 1 layout failures fall through to outcome-based TransferChecked matching. CPI inner-instruction extraction remains follow-up.
  • find_matching_requirements — Go FindMatchingRequirements semantics (scheme/network/amount/asset/payTo).
  • ResourceServer — shared verify/settle orchestration used by MCP (HTTP can share later).
  • r402-mcp rewrite on official rmcp 3.x (breaking vs placeholder shell):
    • Constants match Go/TS (MCP_PAYMENT_REQUIRED_CODE = 402 i32, meta keys).
    • Encode: transport mcp.md dual structuredContent + content[0].text; R5 settlement failure same format.
    • Server: PaymentWrapper ports Go server.go (tool-level 402, not transport errors).
    • Client: X402McpClient + McpToolCaller / PaymentSigner + hooks (V2-only; no V1 fallback).
    • Docs: crate README usage, catalog no longer marked placeholder.

Intentional gaps vs foundation

  • V2-only (no Go V1 MCP fallback).
  • No TS-only SEP-1036 / JSON-RPC -32042.
  • Paid retry that still 402 → McpClientError::StillRequired (stricter than Go).
  • No live e2e binary yet (unit tests cover encode/server/client).

Explicit follow-ups

  • Plumb RpcSimulateTransactionResult.inner_instructions for CPI-only wallets.
  • EVM batch-settlement / auth-capture implementations.
  • PaymentSigner adapter over registered scheme clients / r402-http signing surface.
  • Conformance CI + example MCP server/client binaries.

Test plan

  • cargo test -p r402-core --lib
  • cargo test -p r402-mcp --features full
  • cargo clippy -p r402-core -p r402-mcp --features full --all-targets -- -D warnings
  • CI green on PR

- Add sealed BatchSettlementScheme and AuthCaptureScheme markers.
- SVM Path 2: opt-in smart-wallet verification with layout fallthrough,
  TransferChecked outcome matching, and Path1/Path2 split.
- r402-mcp: PaymentWrapper + pay_and_call with foundation meta keys
  (no longer a stub).
- Document remaining CPI plumbing and follow-up schemes.
Copilot AI lite review requested due to automatic review settings August 8, 2026 07:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Replace the Value-shell MCP crate with an rmcp 3.x based transport that
matches foundation Go/TS constants (payment code 402) and mcp.md dual
structuredContent+text payment-required results. PaymentWrapper and
X402McpClient follow go/mcp control flow. Add find_matching_requirements
in r402-core (scheme/network/amount/asset/payTo).
Complete V2 MCP transport parity: ResourceServer orchestration in
r402-core, dual-format payment-required/settlement-failure (R5),
PaymentWrapper control flow matching go/mcp/server.go, and
X402McpClient with PaymentSigner/hooks matching go/mcp/client.go.
Update docs and remove placeholder labels from the crate catalog.
@gitctrlx gitctrlx changed the title feat: production alignment foundation (schemes, Path2, MCP) feat: production alignment — schemes, Path2, rmcp MCP parity Aug 8, 2026
Match workspace Facilitator mock style: return ready futures instead of
async fn bodies without await. Unblocks `just clippy` / CI -D warnings.
@gitctrlx
gitctrlx merged commit 50e7448 into main Aug 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants