Skip to content

Pick x402 payment options on a supported network only - #474

Merged
jancurn merged 1 commit into
mainfrom
claude/sweet-allen-6k6s24
Oct 27, 2026
Merged

jancurn merged 1 commit into
mainfrom
claude/sweet-allen-6k6s24

Conversation

@jancurn

@jancurn jancurn commented Oct 26, 2026

Copy link
Copy Markdown
Member

A server may offer the same price on several chains at once. Apify's x402 endpoints list Base and two Solana entries, and the accept selector took the first entry with the requested scheme regardless of its network, so a Solana entry listed first made x402 sign and --x402 session auto-pay fail with "Unknown network" even though a Base entry was present. Found while reviewing #465.

  • The selector now skips entries on networks mcpc cannot sign for, in the PAYMENT-REQUIRED header path and in the flat _meta.x402 tool-meta fallback alike.
  • When no entry is on a supported network, the error lists what the server offered and the supported networks.
  • Unit tests for both paths, changelog entry.

Refs #465


Generated by Claude Code

A server may offer the same price on several chains at once. Apify's
x402 endpoints list Base and two Solana entries, and the accept
selector took the first entry with the requested scheme regardless of
its network, so a Solana entry listed first made "x402 sign" and the
--x402 session auto-pay fail with "Unknown network" even though a Base
entry was present.

The selector now skips entries on networks mcpc cannot sign for, in
the PAYMENT-REQUIRED header path and in the flat _meta.x402 tool-meta
fallback alike. When no entry is on a supported network, the error
lists what the server offered and the supported networks.

Refs #465

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015xAB5XbFwVwx3u72PLZFzQ
@jancurn
jancurn merged commit ba41cde into main Oct 27, 2026
7 checks passed
@jancurn
jancurn deleted the claude/sweet-allen-6k6s24 branch October 27, 2026 12:22
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.

3 participants