MCP
Add the server URL. Cursor and Claude open the browser so you can allow OpenCheap. Codex and the others use an agent key.
What it can do
Call a model, make a key with a monthly limit, show this week's usage. Every Management API operation is a tool, with the same permissions and the same activity log.
A browser sign-in can do what an agent key can do. It cannot add wallets or create more agent keys. Disconnect it on API keys and it stops working.
Sign-ins and agent keys can read and change everything by default. For a look-only agent, make its key with POST /api/v1/management-keys {"scope":"read"}, or have the app ask for mcp:read: it sees the read tools only and changes nothing.
Cursor and Claude
API keys › Agents in the console has an Add to Claude button. It opens Claude with OpenCheap already filled in, and Claude asks you to allow it. Or run the command. Cursor takes the same URL with no header. There is no key to copy.
claude mcp add --transport http opencheap https://app.opencheap.si/api/v1/mcp --scope user{
"mcpServers": {
"opencheap": { "url": "https://app.opencheap.si/api/v1/mcp" }
}
}Claude Desktop uses npx mcp-remote https://app.opencheap.si/api/v1/mcp with no Authorization header. It opens the browser the same way.
Codex and other agents
These still take an agent key from the console, under API keys › Agents. Codex reads it from an environment variable.
[mcp_servers.opencheap]
url = "https://app.opencheap.si/api/v1/mcp"
bearer_token_env_var = "OPENCHEAP_MCP_KEY"Example prompts
Ask in your own words. Claude picks the tools. Reads can run without asking. A change that overwrites or deletes always asks first.
- “What's my OpenCheap balance, and what did I spend this week by model?”
get_balanceget_usage - “List the Claude models on OpenCheap with their price per million tokens.”
list_models - “Create a key called my-app with a $10 monthly limit.”
create_key - “Revoke the key my-app.”
list_keysrevoke_key - “Cap the key my-app at $5 a day and $50 a month, and email me at 80 %.”
list_keysset_key_budget - “Show the last 24 hours of my gateway support-bot.”
gateway_stats - “On support-bot, block prompt injection and mask personal data.”
get_gatewayupdate_gateway - “Add a customer called Acme and give them a key capped at $5 a month.”
create_customercreate_customer_key
Gateways
An agent can set up a gateway too: fallbacks, a cache, limits, guardrails (prompt injection, personal data, topics), or a decisions classifier with its questions, and attach it to a key. The tools are list_gateways, get_gateway, create_gateway, update_gateway, delete_gateway, gateway_stats, gateway_decisions (a decision gateway's answers per question) and update_key, which sets or clears a key's default gateway. They take the same config as the Management API.
This is how gateways are made: every example under Gateway › Playground in the console comes with a prompt to copy, carrying its whole config. Paste it, and the agent calls create_gateway with it, then update_key for the key you picked.
Selling
The Sell tools list the spare capacity of an API key you pay for, or of your own server: save the key, discover its models, test, price and publish offers, then follow them with list_offers and get_supply_earnings. The statement for a key is yours to accept: the agent shows it to you before publish_offer. Every tool is on Sell API and MCP.
What it does not do
The server is stateless HTTP. It does not sign in with a wallet or pay over x402 for you, so agents that hold a wallet use the API directly.
Troubleshooting
- Sign-in opens, then shows an errorCheck that the URL is exactly
https://app.opencheap.si/api/v1/mcp. Remove the server, add it again, and sign in with the account you use in the console. redirect_uri is not registeredClaude Code got this until October 17, 2026. It is fixed. Reconnect (run /mcp in Claude Code), or remove the server and add it again.- It worked, then stoppedThe app was disconnected on API keys, or not used for 90 days. Reconnect it in the app and allow OpenCheap again.
owner_onlyOnly the owner can add wallets or create and revoke agent keys. A browser sign-in is a delegate, so Claude and Cursor are not offered these tools. The owner does it on API keys in the console.insufficient_scopeThe connection is read-only, so it cannot change anything. Reconnect the app and pick Read and write when the browser opens, or make a Read and write agent key on API keys.402 insufficient_balanceA key answers this on a paid model when the balance is empty. Top up in the console, or ask Claude for a card top-up link (create_topup_checkout) and pay it in the browser. Free models still answer.