x402 for AI agent payments, and where MCP fits
x402 puts a payment inside an HTTP request or an MCP tool call. MCP authorization, built on OAuth 2.1, decides which client may call an MCP server and with which scopes. An AI agent that pays for a tool can meet both in one call. This guide explains each from its specification, how the two meet, and what an institution that holds the money or the keys has to control itself.
Short answer
x402 is an open payment standard published by the x402 Foundation under Linux Foundation governance. A server answers a request it wants paid for with its payment requirements, the client signs a payment authorization and repeats the request, and the server verifies the payment, serves the request and settles. Version 2 of the specification defines this flow over HTTP and over MCP tool calls.
MCP authorization, often called MCP OAuth, is the part of the Model Context Protocol specification that lets an MCP client call a protected MCP server with an OAuth access token. The current revision, 2026-07-28, builds on a draft of OAuth 2.1 and on several RFCs. It is optional, and it is written for HTTP transports.
The two answer different questions. The access token says which client may call the server and with which scopes. The signed x402 payload says which address pays how much to whom, and until when. Neither specification sets a budget for the agent or records who approved a payment. Where a regulated institution holds the funds or the keys an agent pays with, those controls are the institution's to build.
What x402 is and who publishes it
x402 builds on the HTTP status code 402 Payment Required. The specification describes it as an open payment standard that enables clients to pay for external resources, with message formats and payment flows that work across payment schemes, networks and transport layers. The x402 site calls it an open, neutral standard for internet-native payments, names stablecoin payments as the primary use case and states zero protocol fees.
Coinbase created x402. On 2 April 2026 the Linux Foundation announced the x402 Foundation and the contribution of the protocol from Coinbase, and on 14 July 2026 the foundation reported its operational launch. The specification lives in the foundation's repository, which is licensed under Apache-2.0. The version read for this guide is protocol version 2, last changed on 26 October 2026. Who else governs or backs agent payment protocols is tracked in the agent payment protocols tracker.
Three parties take part. The resource server asks for payment for an API, content or data. The client is any application or agent that requests the resource. The facilitator is a service that verifies payments and settles them on a blockchain on the server's behalf.
What each message carries
| Message | Sent by | What it carries |
|---|---|---|
PaymentRequired | The resource server | One or more accepted ways to pay. Each names the scheme, the network, the amount in the asset's smallest unit, the asset, the recipient (payTo) and the longest time allowed to complete the payment. |
PaymentPayload | The client | The option the client accepted and a signed payload for that scheme. For the exact scheme on EVM networks this is an EIP-712 signature over an EIP-3009 transfer authorization that names the payer, the recipient, the value, a validity window and a 32-byte nonce. |
SettlementResponse | The resource server | Whether settlement succeeded, the transaction reference, the network and the payer. |
Networks are named in the CAIP-2 format, for example eip155:8453 for Base. The reference implementations support EVM networks, among them Base and Avalanche, and Solana. On EVM networks the asset is an ERC-20 token that implements EIP-3009, USDC being the example the specification gives. The asset field can also hold an ISO 4217 currency code for fiat, and the specification encourages networks outside blockchains to follow the same naming, with sepa:eu as its example.
How an x402 payment flows
Over HTTP, the transport the protocol started with, the default flow has six steps.
- The client, which can be an AI agent, requests a resource.
- Without a valid payment, the server answers
402 Payment Requiredand puts itsPaymentRequiredobject, base64-encoded, in aPAYMENT-REQUIREDheader. - The client picks one of the accepted options, signs the payment authorization and repeats the request with the
PaymentPayloadin aPAYMENT-SIGNATUREheader. - The server verifies the payment itself or through a facilitator's
POST /verify, which is read-only and must not commit payment state. - The server serves the request, then settles through
POST /settle, typically by broadcasting a transaction. - The server returns the response with the
SettlementResponsein aPAYMENT-RESPONSEheader.
This is the default authorization flow: verify, serve, settle. Funds move only after the request has been served successfully. The specification also defines an upfront flow, which settles before the resource is served, and an escrow flow, which commits a deposit or ceiling first and records the final charge afterwards. The schemes include exact, which transfers a specific amount, upto, which authorizes up to a maximum for one request, and batch-settlement.
For the exact scheme on EVM networks, replay protection rests on the EIP-3009 nonce, which the token contract does not accept twice, and on the validity window of each authorization.
The same payment inside an MCP tool call
The x402 MCP transport carries the same messages inside tool calls. A paid tool called without payment returns a tool result with isError set to true and the PaymentRequired object in structuredContent. The client calls again with the payment in _meta["x402/payment"]. The server verifies the payment, runs the tool, settles and returns the settlement in _meta["x402/payment-response"]. If settlement fails after the tool has run, the server returns the payment error and none of the tool's content.
What MCP authorization does not cover
- Payments. The authorization specification deals in tokens and scopes. It defines no payment, amount or spending limit.
- What a scope means. The specification defines no scope names. The server publishes the scopes it supports, and what each allows is the server's decision.
- What a tool may do. The overview of the specification says hosts must obtain explicit user consent before invoking any tool, and treats descriptions of tool behaviour as untrusted unless they come from a trusted server. It also states that MCP itself cannot enforce these principles at the protocol level, and that implementors should build consent and authorization flows into their applications.
- Local servers. A server reached over STDIO takes its credentials from the environment, outside this specification.
- Servers that skip it. Authorization is optional, so a remote MCP server can run without it.
How x402 and MCP authorization relate for an agent that pays
Both can apply to one call. An agent connects to a remote MCP server with an OAuth access token issued for that server. One of the server's tools is paid, so the first call returns the x402 PaymentRequired object. The agent signs a payment and calls the tool again with the payment in _meta, still sending its access token.
Two credentials are at work, held under two different keys. The access token comes from the authorization server and shows that this client may call this server with these scopes. The x402 payload is signed with the payer's key and authorizes one transfer of a stated amount to a stated recipient within a time window. The payload names the paying address. It does not carry the OAuth client's identity.
Neither depends on the other. The x402 MCP transport does not refer to MCP authorization, and the MCP authorization specification does not mention payment. A server can use one, both or neither.
| Question | x402 | MCP authorization |
|---|---|---|
| Who is calling the server? | Not defined. | The OAuth client, with an access token issued for that server. |
| On whose behalf? | Not defined. The payload names the paying address. | A resource owner, through the authorization flow, or the client itself under the Client Credentials extension. |
| Which tools or data? | Not defined. | Scopes, with 403 insufficient_scope and step-up authorization. |
| How much, to whom, until when? | The signed payload: amount, recipient and validity window. | Not defined. |
| A budget across many calls? | Out of scope: the specification excludes client-side budget management and calls budget management for agents implementation-specific. | Not defined. |
| Replay and reuse | A nonce and a validity window, for the exact scheme on EVM networks. | Tokens bound to one server, short-lived access tokens and refresh-token rotation for public clients. |
| A record afterwards | The settlement response, with the transaction reference. | Not defined. |
What a regulated institution has to control
Where an agent pays from an account, a card or a wallet that a regulated institution holds or operates, the institution carries duties that neither specification takes on. Under Article 72(1) of PSD2, where a payment service user denies having authorised an executed payment transaction, the payment service provider has to prove that it was authenticated, accurately recorded, entered in the accounts and not affected by a technical breakdown or other deficiency. Article 72(2) adds that the recorded use of a payment instrument is not, in itself, necessarily enough to prove that the payer authorised it.
This guide does not assess which payment or crypto-asset rules apply to a given x402 payment. Whatever the rules, the controls below sit with the institution.
| Control | What the institution decides | Where the specifications stop |
|---|---|---|
| Limits | Caps per payment, per period and per recipient for each agent credential, checked before a payment is signed or released. | x402 leaves budgets to the implementation, and its upto scheme caps one request at a maximum. MCP authorization grants scopes and defines no amounts. |
| Approvals | Which payments a person approves before release, and which person. | The MCP overview expects hosts to ask for consent before a tool runs and leaves the flow to implementors. x402 defines no approval. |
| Agent credentials | One credential per agent, separate from the account holder's own, that can be withdrawn without touching the account. | MCP authorization issues tokens to a client for one server. x402 identifies only the paying address. |
| Recipients and networks | Which recipients, assets and networks an agent may pay. | The server names the recipient and the network in PaymentRequired, and the client chooses among the server's options. x402 defines no list on the payer's side. |
| Audit | A record that links each payment to the agent, its token, the instruction it carried out and the person who approved it, kept so that it can be produced in a dispute. | x402 returns a transaction reference. MCP authorization defines no audit record. |
| Revocation | Withdrawing one agent's access at once, while the account and every other credential keep working. | Short-lived access tokens limit how long a leaked token works. An x402 authorization lapses at the end of its validity window. |
Which records the core of an account-holding institution needs for this, from delegate tokens with their own limits to signed mandates referenced on every posting, is set out in the agent payment protocols tracker. What an MCP server for a core banking system exposes, and the controls around it, is set out in the note on a core banking MCP server.
Where Finray fits
Finray, which publishes this guide, does not rank products here. Apart from the facts below, nothing on this page is described as supported by a Finray product.
Corebanq has an MCP server, and AI agents can initiate payments through Corebanq. The customer institution sets the limits and approvals for those payments itself, in the Corebanq Configurator.
CoreFA supports OAuth sign-in, including for MCP clients. A shorter overview for banks, e-money institutions and fintechs, with human-in-the-loop approvals and MCP authentication, is at agentic payments for banks, EMIs and fintechs.
Corebanq support for x402 is rolling out, planned for January 2027, in two roles: a bank customer's agent paying by x402 from a Corebanq account, and Corebanq accepting x402 payment for APIs.
Frequently asked questions
- What is x402?
- An open payment standard, published by the x402 Foundation under Linux Foundation governance, that puts a payment inside an HTTP request or an MCP tool call. The server answers with 402 Payment Required and its payment requirements, the client signs a payment authorization and repeats the request, and the server verifies the payment, serves the request and settles. The x402 site names stablecoin payments as the primary use case.
- Does an MCP OAuth token authorise a payment?
- No. The access token lets one client call one MCP server with the scopes it was granted, and the MCP authorization specification defines no payment, amount or recipient. In a paid MCP tool call under x402, the payment is authorised by a separate payload that the payer signs, naming the amount, the recipient and a validity window.
- Does MCP authorization limit what an AI agent can spend?
- No. It grants access tokens with scopes for one MCP server and defines no amounts. Spending limits have to be enforced where the payment is authorised or released.
- Do x402 and MCP authorization depend on each other?
- No. The x402 MCP transport carries payment data in a tool call's _meta field and does not refer to MCP authorization, and the MCP authorization specification does not mention payment. An MCP server can use both: the access token admits the client, and the x402 payload pays for the tool call.
- Who signs an x402 payment?
- The payer. For the exact scheme on EVM networks, the payload carries an EIP-712 signature over an EIP-3009 transfer authorization that names the payer, the recipient, the value, a validity window and a 32-byte nonce. A facilitator can verify and settle the payment for the server.
- What should a bank check before an AI agent pays from an account it holds?
- Which credential the agent holds and whether it can be withdrawn on its own, the caps for each payment and period, which payments a person approves, which recipients and networks are allowed, and whether each payment can be linked to the agent, the instruction and the approver if the payer later disputes it. Under PSD2 Article 72 the provider has to prove that a disputed payment was authenticated and accurately recorded.
Sources
- x402 Foundation, x402 Protocol Specification, protocol version 2, last changed 26 October 2026, accessed 23 November 2026
- x402 Foundation, x402 HTTP transport, version 2, accessed 23 November 2026
- x402 Foundation, x402 MCP transport, version 2, last changed 3 February 2026, accessed 23 November 2026
- x402 Foundation, x402 repository on GitHub (licence and payment schemes), accessed 23 November 2026
- x402 Foundation, x402 site, accessed 23 November 2026
- Linux Foundation, launch of the x402 Foundation, 2 April 2026, accessed 23 November 2026
- x402 Foundation, operational launch, 14 July 2026, accessed 23 November 2026
- Model Context Protocol, Specification, revision 2026-07-28, security and trust principles, accessed 23 November 2026
- Model Context Protocol, Versioning (current revision 2026-07-28), accessed 23 November 2026
- Model Context Protocol, Authorization, revision 2026-07-28, accessed 23 November 2026
- Model Context Protocol, Authorization: security considerations, revision 2026-07-28, accessed 23 November 2026
- Model Context Protocol, Authorization Extensions, OAuth Client Credentials, 2026-07-28, stable, accessed 23 November 2026
- IETF, The OAuth 2.1 Authorization Framework, draft-ietf-oauth-v2-1-13 (Internet-Draft), accessed 23 November 2026
- RFC 8707, Resource Indicators for OAuth 2.0, accessed 23 November 2026
- RFC 9207, OAuth 2.0 Authorization Server Issuer Identification, accessed 23 November 2026
- RFC 9728, OAuth 2.0 Protected Resource Metadata, accessed 23 November 2026
- Ethereum Improvement Proposals, EIP-3009: Transfer With Authorization, accessed 23 November 2026
- Directive (EU) 2015/2366 on payment services (PSD2), Article 72, accessed 23 November 2026
Status as of 23 November 2026. The specifications are versioned and change; check the revision before you build on it. The guide is research, not legal advice. For corrections, write to legal@finray.tech.