# 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.

- Source: https://finray.tech/intelligence/x402-agent-payments/
- Published: 2026-11-23
- Publisher: Finray Technologies Ltd (finray.tech), unrelated to finray.io
- All sources accessed on 23 November 2026

*Finray Technologies Ltd publishes this guide. Finray makes software for banks and other regulated institutions. The guide ranks no vendor; what Finray's products support is stated only under Where Finray fits. It is research, not legal advice.*

---

## 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](https://finray.tech/intelligence/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

*The three x402 messages, who sends each and what it carries (x402 specification v2, section 5)*

| 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.

1. The client, which can be an AI agent, requests a resource.
2. Without a valid payment, the server answers `402 Payment Required` and puts its `PaymentRequired` object, base64-encoded, in a `PAYMENT-REQUIRED` header.
3. The client picks one of the accepted options, signs the payment authorization and repeats the request with the `PaymentPayload` in a `PAYMENT-SIGNATURE` header.
4. The server verifies the payment itself or through a facilitator's `POST /verify`, which is read-only and must not commit payment state.
5. The server serves the request, then settles through `POST /settle`, typically by broadcasting a transaction.
6. The server returns the response with the `SettlementResponse` in a `PAYMENT-RESPONSE` header.

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 covers

MCP authorization lets an MCP client make requests to a restricted MCP server on behalf of a resource owner. In the 2026-07-28 revision it is optional. Implementations that use an HTTP transport should follow it. Implementations that use STDIO should not, and take credentials from the environment instead.

The roles are those of OAuth 2.1. The protected MCP server is the resource server, the MCP client is the OAuth client, and an authorization server issues the access tokens. The revision cites draft 13 of OAuth 2.1, which is still an IETF Internet-Draft, together with RFC 6750, RFC 8414, RFC 7591, RFC 8707, RFC 9728 and RFC 9207.

For an agent that pays, two points matter: each access token is issued for one MCP server, which must refuse a token issued for any other. The token carries scopes, which the server names and interprets, and nothing in it defines a payment.

Discovery through Protected Resource Metadata, PKCE, the audience check and step-up scopes, and how they apply to an AI agent's own credential, are set out on the page on [MCP OAuth and AI agent identity](https://finray.tech/platforms/corefa/ai-agents/).

### An agent with no person present

The core specification describes a client acting for a resource owner. For access between machines without user interaction, the MCP authorization extensions repository lists an OAuth Client Credentials extension, marked stable for the 2026-07-28 revision. It uses credentials registered in advance, recommends JWT client authentication and also allows a client secret.

## 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.

*Which specification answers which question when an AI agent pays for an MCP tool*

| 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.

*Controls the institution sets for agent payments and where the two specifications stop*

| 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](https://finray.tech/intelligence/agent-payment-protocols-tracker/#what-does-the-banks-core-need-for-agent-payments). 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](https://finray.tech/notes/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](https://finray.tech/platforms/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](https://finray.tech/solutions/agentic-payments/).

## 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

All accessed on 23 November 2026.

1. [x402 Foundation, x402 Protocol Specification, protocol version 2, last changed 26 October 2026, accessed 23 November 2026](https://github.com/x402-foundation/x402/blob/main/specs/x402-specification-v2.md)
2. [x402 Foundation, x402 HTTP transport, version 2, accessed 23 November 2026](https://github.com/x402-foundation/x402/blob/main/specs/transports-v2/http.md)
3. [x402 Foundation, x402 MCP transport, version 2, last changed 3 February 2026, accessed 23 November 2026](https://github.com/x402-foundation/x402/blob/main/specs/transports-v2/mcp.md)
4. [x402 Foundation, x402 repository on GitHub (licence and payment schemes), accessed 23 November 2026](https://github.com/x402-foundation/x402)
5. [x402 Foundation, x402 site, accessed 23 November 2026](https://www.x402.org/)
6. [Linux Foundation, launch of the x402 Foundation, 2 April 2026, accessed 23 November 2026](https://www.linuxfoundation.org/press/linux-foundation-is-launching-the-x402-foundation-and-welcoming-the-contribution-of-the-x402-protocol)
7. [x402 Foundation, operational launch, 14 July 2026, accessed 23 November 2026](https://x402.org/linux-foundation-announces-operational-launch-of-x402-foundation-to-standardize-internet-native-payments-for-ai-agents-and-applications/)
8. [Model Context Protocol, Specification, revision 2026-07-28, security and trust principles, accessed 23 November 2026](https://modelcontextprotocol.io/specification/2026-07-28)
9. [Model Context Protocol, Versioning (current revision 2026-07-28), accessed 23 November 2026](https://modelcontextprotocol.io/specification/versioning)
10. [Model Context Protocol, Authorization, revision 2026-07-28, accessed 23 November 2026](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization)
11. [Model Context Protocol, Authorization: security considerations, revision 2026-07-28, accessed 23 November 2026](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization/security-considerations)
12. [Model Context Protocol, Authorization Extensions, OAuth Client Credentials, 2026-07-28, stable, accessed 23 November 2026](https://github.com/modelcontextprotocol/ext-auth/blob/main/specification/stable/oauth-client-credentials/2026-07-28/oauth-client-credentials.mdx)
13. [IETF, The OAuth 2.1 Authorization Framework, draft-ietf-oauth-v2-1-13 (Internet-Draft), accessed 23 November 2026](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-13)
14. [RFC 8707, Resource Indicators for OAuth 2.0, accessed 23 November 2026](https://www.rfc-editor.org/rfc/rfc8707.html)
15. [RFC 9207, OAuth 2.0 Authorization Server Issuer Identification, accessed 23 November 2026](https://www.rfc-editor.org/rfc/rfc9207.html)
16. [RFC 9728, OAuth 2.0 Protected Resource Metadata, accessed 23 November 2026](https://www.rfc-editor.org/rfc/rfc9728.html)
17. [Ethereum Improvement Proposals, EIP-3009: Transfer With Authorization, accessed 23 November 2026](https://eips.ethereum.org/EIPS/eip-3009)
18. [Directive (EU) 2015/2366 on payment services (PSD2), Article 72, accessed 23 November 2026](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32015L2366)

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.

Related: [Agent payment protocols tracker](https://finray.tech/intelligence/agent-payment-protocols-tracker/) · [Agent payment playground (free tool)](https://finray.tech/tools/agent-payment-playground/) · [Agentic payments for banks, EMIs and fintechs](https://finray.tech/solutions/agentic-payments/) · [AI agent identity and MCP authentication](https://finray.tech/platforms/corefa/ai-agents/) · [Core banking MCP server: tools and controls](https://finray.tech/notes/core-banking-mcp-server/) · [x402 payment header decoder (free tool)](https://finray.tech/tools/x402-payment-header-decoder/)
