MCP server
Add AgentPay to Claude or Cursor
Use AgentPay natively from any MCP-compatible agent runtime. The server wraps the live API and exposes register_agent, check_balance, pay, and redeem.
{
"mcpServers": {
"agentpay": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://agentpay.nanocorp.app/mcp"]
}
}
}Direct remote endpoint: https://agentpay.nanocorp.app/mcp. If pay hits low balance, the tool returns the raw 402 body with topup_url for the operator.
Buy the $10 Agent Credits Pack
One-time purchase — 1,000 prepaid transaction credits, no subscription. Credits never expire.
Secure checkout via Stripe · Instant delivery · No account required
Register your agent — get an API key
No auth required. Provide the same email you used at checkout so your credits are automatically matched when they arrive. You get 25 free trial credits instantly.
curl -X POST https://agentpay.nanocorp.app/api/register-agent \
-H "Content-Type: application/json" \
-d '{"agent_name": "my-agent", "email": "agent@example.com"}'{
"api_key": "ap_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ01",
"balance": 25,
"credits_included": 25,
"topup_url": "https://checkout.nanocorp.so/c/QfsWt42Pnik0EmvWOyvr"
}Authorization: Bearer header for all subsequent requests.Check your balance
Verify your agent wallet is active and credits are credited. Works without auth (demo mode) or with your key (live mode — shows real balance).
curl https://agentpay.nanocorp.app/api/demo/balance \
-H "Authorization: Bearer ap_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ01"{
"status": "success",
"mode": "live",
"agent_name": "my-agent",
"balance": 25.0,
"credits_included": 25,
"topup_url": "https://checkout.nanocorp.so/c/QfsWt42Pnik0EmvWOyvr"
}Authorization header this returns a "mode": "demo"response with a simulated balance — useful for testing pipelines without spending real credits.Make a payment
Send credits from your agent to any recipient agent. The tofield is the recipient’s agent name or identifier.
curl -X POST https://agentpay.nanocorp.app/api/pay \
-H "Authorization: Bearer ap_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ01" \
-H "Content-Type: application/json" \
-d '{"amount": 1.00, "to": "vendor-agent"}'{
"status": "success",
"mode": "live",
"tx_id": "live-a1b2c3d4",
"balance_after": 24.0,
"topup_url": "https://checkout.nanocorp.so/c/QfsWt42Pnik0EmvWOyvr"
}402 insufficient_balance when your wallet is empty — the response includes a topup_url to send to your operator for a refill.Receive credits after a top-up
After your operator completes checkout with the registered email, call POST /api/redeem to apply the credits to your wallet. Idempotent — safe to call multiple times.
curl -X POST https://agentpay.nanocorp.app/api/redeem \
-H "Authorization: Bearer ap_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ01"{
"status": "success",
"credits_added": 1000,
"balance_after": 1000,
"checkout_session_id": "cs_live_abc123"
}Authentication reference
| Header | Format | Required on |
|---|---|---|
| Authorization | Bearer ap_live_… | /api/pay, /api/redeem, live balance |
| X-API-Key | ap_live_… | Alternative to Authorization |
No auth — returns key
Auth optional
Auth optional (sandbox)
Auth required
Auth required
Ready to integrate?
Buy the credits pack, register your agent, and you’re live in under a minute.
Buy $10 Agent Credits PackMachine-readable descriptor at /.well-known/agent.json