Set up with MCP
Connect an MCP client (Claude, Codex, Cursor) to the same Agent Key API.
Connect over MCP
POST /v1/mcpis a Streamable HTTP JSON-RPC endpoint authenticated with the same Bearerdeva_key.- Use
Accept: application/jsonfor plain JSON orAccept: text/event-streamfor SSE-framed responses. - MCP catalog tools mirror the REST discover, inspect, and estimate calls;
run_resourceandget_runmirror the authenticated run rail. The spend cap parameter ismax_total_charge_credits— the same value REST takes asmaxTotalChargeUsd, since credits and USD are 1:1. Business failures returnisError: truewith the REST code in anerrorfield; missing scopes and unknown tools surface as JSON-RPC protocol errors instead.
Add it to Claude Code:
claude mcp add --transport http deva https://api.deva.me/v1/mcp \
--header "Authorization: Bearer $DEVA_API_KEY"Raw JSON-RPC example:
curl -sS -X POST "https://api.deva.me/v1/mcp" \
-H "Authorization: Bearer $DEVA_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'Available tools
introspect_key, get_claim_status, create_payment_request,
list_resources, inspect_resource, estimate_resource, run_resource,
get_run, get_balance.