beginner 10 minutes
Publish a pay.json manifest
The manifest is the first thing an agent fetches. This guide walks through writing a minimal pay.json, validating it, and serving it at the well-known path. No payment logic yet — just discoverable pricing.
- 1
Start from the schema
Declare the mcp_pay version and a link to your Server Card. Pricing and accepts come next.
{ "mcp_pay": "0.1", "server_card": "/.well-known/mcp/server-card.json" } - 2
Add a pricing rule
Set a free default and price one tool per_call. The pricing block attaches rules to a default, tools, resources, or prompts.
"pricing": { "default": { "model": "free" }, "tools": { "get_forecast": { "model": "per_call", "amount": "0.003", "currency": "USD" } } } - 3
List accepted rails
Add an accepts array naming each rail you support with its network and pay-to details.
"accepts": [ { "rail": "x402", "network": "eip155:8453", "asset": "USDC", "pay_to": "0x1234..." } ] - 4
Serve it at the well-known path
Publish the file so a GET to /.well-known/mcp/pay.json returns it. It is static, cacheable, and needs no auth to read.
Validate before you ship
- ▸Use the mcp-pay-cli to validate the manifest against the JSON Schema.
- ▸Keep the mcp_pay version field accurate — it is a v0.1 draft and the schema is versioned.
More guides in the index, or read the architecture to see the full 402 handshake.