For the complete documentation index, see llms.txt. This page is also available as Markdown.

Use x402 from an AI agent

Wire the x402 Endpoint into any Base MCP–capable AI agent so it can discover, quote, prepare, and submit a carbon retirement from a plain-language request.

The x402 Endpoint is built for the x402 agent-payments ecosystem and plugs directly into Base MCP. The fastest path is the Klima Base MCP plugin, which connects the endpoint to agents such as Claude Code.

Setup

1

Install

Connect Base MCP and add the Klima plugin by following the Base MCP setup guide. The plugin definition is plugins/klima-retire.md.

2

Ask in plain language

For example: "Retire 2 tonnes of carbon under $15/tonne, beneficiary 'Acme Corp'."

3

Approve once

The agent runs discoverquoteprepare/retire, shows you the cost, submits a single wallet approval, and returns your Carbonmark certificate URL.

Prefer a direct integration?

You do not need MCP to use the endpoint. You can:

  • Call the GET or POST endpoints yourself, then sign and submit the prepare/retire batch (approve + retirement) with your own wallet on Base — see Retire carbon with x402.

  • Use the gasless relay path — sign one authorization and let a Klima executor submit it — see Gasless retirement (paid relay).

Agent discovery

x402 directories and agent crawlers can index the endpoint automatically through its public well-known documents:

Resources

Last updated