Skip to content
mcp-pay View on GitHub

Teams running an MCP server with tools worth charging for

Metering paid MCP tools

Charge per call for a specific MCP tool by returning HTTP 402 and verifying an X-PAYMENT proof before running it — without building a bespoke billing layer.

The problem

An MCP server exposes a tool that costs real money to run — an API call, a compute job, a data lookup — but MCP has no native way to say "this call costs 0.003 USD" or to require payment before serving it.

How mcp-pay helps

Declare a per_call price for the tool in pay.json, and let the reference server return 402 with X-PAYMENT-REQUIRED. The agent retries with a proof, the server verifies it with a facilitator, and only then runs the tool.

What that looks like in practice

  • Per-tool pricing lives in a static, cacheable manifest — no per-request pricing logic to maintain.
  • The 402 response tells the agent exactly how to pay.
  • Settlement happens on the rail, verified server-to-facilitator; mcp-pay never holds funds.
  • A free default keeps unpriced tools open while metering only the ones you choose.

Build this flow

See the 402 handshake, browse more use cases, or follow a guide.