PROVIDER GUIDE · UPDATED 2026-07-10

How to make an MCP server payable with x402

A provider-oriented implementation map covering payment wrappers, discovery metadata and buyer compatibility.

TARGET QUESTION · x402 MCP server tutorial

DIRECT ANSWER

Wrap a remote MCP resource with the current x402 MCP payment wrapper, declare accepted payment requirements and expose accurate tool discovery metadata. Test the unpaid 402 response, buyer signer flow, retry and paid result on a test network before mainnet. Publish the transport, endpoint, tool schema, price and a buyer path that uses an x402-aware client.

Key takeaways

  • MCP tool discovery and x402 payment are complementary layers, not one configuration field.
  • Use current v2 packages and explicit network identifiers.
  • A provider should test the exact instructions it publishes for buyers.

Server responsibilities

The server defines requirements for the protected resource, verifies a signed payload, performs the work only after valid payment and returns the resource with settlement evidence. A facilitator can handle verification and settlement, but the resource server remains responsible for enforcing the route correctly.

MCP-specific discovery

For paid MCP tools, the discovery extension should name the tool, describe its purpose, declare transport, include a usable input schema and provide a safe example. This allows directories and agents to understand the capability before paying. Invalid custom fields can prevent Bazaar discovery.

  • Keep read-only and mutating tools clearly distinguished.
  • Provide realistic example arguments that do not touch private data.
  • Document whether a failed tool execution is charged or refunded.

Test the buyer path

Run the official client example or equivalent x402-aware bridge with a limited test wallet. Confirm the initial 402, selected scheme, signed retry, returned MCP content and settlement. Then repeat from the exact client instructions shown in your documentation; a server is not easy to adopt if only its author can connect it.

Related directory entries

Sources and methodology

TOLL·402 distinguishes public claims, registry discovery, unpaid quote checks and settled paid-call verification. Sources below support the visible claims; presence in a registry is not treated as verification.

  1. Official MCP with x402 guideCurrent end-to-end MCP bridge example.
  2. x402 seller quickstartCurrent server wrapper and accepted requirements.
  3. x402 Bazaar documentationDiscovery extension behavior.

Continue reading