Quickstart

Three paths. Start with the hosted edge flow, then drop to local development only if you are contributing or self-hosting.

MCP server
~2 min
Claude Desktop, Cursor, any MCP host
REST API
~5 min
Any language, direct HTTP calls
Local dev
~20 min
Contributing, self-hosting
Path A - MCP server

MCP server (~2 min)

1

Get an API key

Register with one curl call - no Solana wallet, no Stripe account needed to start.

curl -s -X POST https://api.agentpay.so/api/merchants/register \
  -H "Content-Type: application/json" \
  -d '{ "name": "My Agent", "email": "you@example.com" }'
{ "merchantId": "mer_...", "apiKey": "apk_..." }

Save both values. The API key is shown once.

2

Add to Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "agentpay": {
      "command": "npx",
      "args": ["-y", "@agentpayxyz/mcp-server"],
      "env": {
        "AGENTPAY_API_KEY": "apk_your_key_here",
        "AGENTPAY_MERCHANT_ID": "mer_your_merchant_id"
      }
    }
  }
}

Restart Claude Desktop.

3

Try it

Ask Claude any of these:

> "Create a governed mandate to book a train, budget 100 GBP, require my approval above 50."
> "Connect Firecrawl without exposing the raw API key to the agent."
> "Create a 5 dollar payment request for a research task."
> "Look up the AgentPassport for agent_001."

Claude calls the AgentPay tools and returns the result. No dashboard. No copy-pasting credentials.

Remote MCP (no local process)
https://api.agentpay.so/api/mcpPass your API key as Authorization: Bearer apk_...

Full MCP reference -> with all 30+ tools, parameters, and examples.

Path B - REST API

REST API (~5 min)

1

Register

curl -s -X POST https://api.agentpay.so/api/merchants/register \
  -H "Content-Type: application/json" \
  -d '{ "name": "My Agent", "email": "you@example.com" }'
2

Create a governed mandate

A mandate captures what the agent is allowed to do, the budget cap, and the approval policy.

curl -s -X POST https://api.agentpay.so/api/mandates \
  -H "Authorization: Bearer apk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "merchantId": "mer_...",
    "objective": "Book a train London to Bristol",
    "budgetCap": 50,
    "currency": "GBP",
    "approvalThreshold": 20,
    "agentId": "my-agent-01"
  }'
{
  "success": true,
  "intentId": "mnd_...",
  "status": "pending_approval",
  "recommendation": "Cheapest direct service: 24.50 GBP, 07:04 depart"
}
3

Approve and execute

# Approve
curl -s -X POST https://api.agentpay.so/api/mandates/mnd_.../approve \
  -H "Authorization: Bearer apk_..."

# Execute
curl -s -X POST https://api.agentpay.so/api/mandates/mnd_.../execute \
  -H "Authorization: Bearer apk_..."

# Get receipt
curl -s https://api.agentpay.so/api/receipt/mnd_...
4

Capability Vault flow

Start a connect session. The user opens the connect URL, enters their key once, and AgentPay vaults it for future governed execution.

curl -s -X POST https://api.agentpay.so/api/capabilities/connect-sessions \
  -H "Authorization: Bearer apk_..." \
  -H "Content-Type: application/json" \
  -d '{ "provider": "firecrawl", "merchantId": "mer_...", "agentId": "my-agent-01" }'
{
  "sessionId": "cap_sess_...",
  "status": "auth_required",
  "connectUrl": "https://api.agentpay.so/connect/cap_sess_..."
}
Path C - Local dev

Local development (~20 min)

For contributors or self-hosters. Requires Node.js 20+, Docker, and Wrangler.

git clone https://github.com/Rumblingb/Agentpay.git
cd Agentpay
npm ci
cp .env.example .env

Required secrets to start the API:

DATABASE_URL=postgresql://...
ANTHROPIC_API_KEY=sk-ant-...
WEBHOOK_SECRET=<any-32-char-string>

Everything else is optional. Missing integrations should fail closed on their own routes, not block first boot.

# Workers API on :8787
cd apps/api-edge && npx wrangler dev

# Dashboard on :3000
cd dashboard && npm run dev

# MCP server pointing at local API
AGENTPAY_API_URL=http://localhost:8787 \
AGENTPAY_API_KEY=apk_dev_test \
npx -y @agentpayxyz/mcp-server
MCP tool reference ->
All 30+ tools with parameters
Runnable examples ->
Start from working flows, not a blank page
Use the adapters ->
OpenAI, LangChain, Vercel AI SDK
AgentPassport ->
Portable identity and trust
Pricing ->
Launch free - Builder $39 - Growth $149