Cursor integration
Cursor runs @burnbound/mcp as a local stdio MCP server configured in an mcp.json file. Once added, Cursor's agent can pay x402 APIs with fetch_paid and check its budget with get_budget, and Burnbound checks every payment against the agent's policy before it is signed. Configuration as documented in Cursor's MCP docs.
Where does the config go?
| File | Applies to |
|---|---|
~/.cursor/mcp.json |
Every project. |
.cursor/mcp.json |
This project only. |
Use the global file for a single agent you use everywhere, and the project file when each repository should pay as its own Burnbound agent, with its own caps and audit.
Add the server
You need Node.js 20 or later and an agent key (bb_agent_…) from the Burnbound dashboard. Add this to the file, or merge the burnbound entry into an existing mcpServers object:
{
"mcpServers": {
"burnbound": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@burnbound/mcp"],
"env": {
"BURNBOUND_KEY": "bb_agent_…"
}
}
}
}
command must be on the system PATH or a full path. If Cursor cannot find npx, run which npx (macOS, Linux) or where npx (Windows) in a terminal and use that path as command.
Keep the key out of the repository
A project .cursor/mcp.json is easy to commit by mistake. Cursor can read the key from the environment instead, with ${env:NAME}:
{
"mcpServers": {
"burnbound": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@burnbound/mcp"],
"env": {
"BURNBOUND_KEY": "${env:BURNBOUND_KEY}"
}
}
}
}
The variable must be set in the environment Cursor starts with, for example by exporting it in your shell profile and opening the project from that shell. If the key ends up empty, the server exits with BURNBOUND_KEY is required.
Check that it runs
- Open Customize in Cursor's sidebar and check that
burnboundis listed and enabled. If you editedmcp.jsonwhile Cursor was open and it does not appear, restart Cursor. - In the agent chat, ask: "What is my Burnbound budget?". The agent calls
get_budgetand shows the daily cap, what remains and the allowed hosts.
If the server fails, open the Output panel (Cmd+Shift+U on macOS, Ctrl+Shift+U elsewhere) and choose MCP Logs in the dropdown. The server writes its startup errors there:
| Message or result | Fix |
|---|---|
BURNBOUND_KEY is required. |
The key is missing from env, or ${env:BURNBOUND_KEY} is empty. |
BURNBOUND_KEY has an invalid format. |
The key was pasted with extra characters. |
Every tool answers unauthorized |
The key was revoked or mistyped. Create a new one in the dashboard. |
host_not_allowed |
Add the URL's host to the agent's allowed hosts in the dashboard. |
First paid call
Add a seller's host to the agent's allowed hosts, then ask the agent. For example, with CoinGecko (pro-api.coingecko.com, 0.01 USDC per call on Base when we last verified it):
Use fetch_paid to GET
https://pro-api.coingecko.com/api/v3/x402/onchain/search/pools?query=weth&network=eth
with maxAmountUsd "0.02".
The result is paid with the amount, the transaction and the response body, marked as untrusted. More verified sellers, with their hosts and prices, are in the x402 API catalog, and the agent can search it with search_paid_apis.
Cursor runs shell commands: choose the wallet mode with that in mind
Cursor's agent can run terminal commands. With client-side signing, the wallet key lives on the same machine, and an agent that runs commands as your user could read it and sign outside Burnbound. For an agent that runs commands on its own, connect a Coinbase CDP wallet instead: the agent then holds nothing that can sign. See Agent wallets: Coinbase CDP vs a local key.
Related
- Quickstart: from sign-up to the first payment.
- x402 MCP server: setup for Claude Code and Cursor: what the five tools do.
- MCP tools reference: every input, result and error code.