MCP Server

Drop AgentPay into Claude Desktop or any MCP host in 30 seconds. 30+ tools across mandates, credentials, payments, and identity — no infrastructure to build.

Install
npx -y @agentpayxyz/mcp-server
Claude Desktop config

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"
      }
    }
  }
}

Get your API key: POST /api/merchants/register — register with one curl call, no Stripe or wallet needed.

Remote MCP (no local process)
https://api.agentpay.so/api/mcpPass your API key as Authorization: Bearer apk_...
# Mint a short-lived token (useful for OpenAI / Anthropic remote MCP)
curl -X POST https://api.agentpay.so/api/mcp/tokens \
  -H "Authorization: Bearer apk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"audience":"openai","ttlSeconds":3600}'
Governed MandatesCapability VaultPayments & FundingIdentity & AgentPassportAgent Registry

Governed Mandates

Mandates are the safety layer for autonomous agents. The agent proposes an objective and budget cap; the principal approves once; AgentPay enforces automatically through the full create → plan → approve → execute lifecycle.

agentpay_create_mandate

Create a governed mandate and auto-trigger the planning step. Returns a mandate record with status, AI-generated recommendation, and approval requirement.

paramtypereqdescription
principalIdstringyesThe human principal who owns the mandate and holds approval authority
operatorIdstringyesThe agent or operator initiating the mandate
objectivestringyesOutcome-oriented plain-language description of what should happen
sourcestringno"direct_human" or "delegated_agent" (default: delegated_agent)
constraintsobjectnoExecution constraints — e.g. { budgetMax: 5000 } in pence/cents
mandateobjectnoPolicy — e.g. { amountPence: 5000, currency: "GBP", autoApproveAmountPence: 2000, approvalMethod: "inline" }
agentpay_approve_mandate

Approve a mandate in awaiting_approval state. Transitions to approved so execution can begin.

paramtypereqdescription
intentIdstringyesMandate ID to approve
actorIdstringnoOperator or principal ID recording who approved
approvalTokenstringnoEphemeral token from a linked approval session
agentpay_execute_mandate

Start execution of an approved mandate. Returns execution state and journey session ID.

paramtypereqdescription
intentIdstringyesMandate ID to execute
actorIdstringnoAgent/operator identifier starting execution
jobIdstringnoOptional downstream execution job ID
agentpay_get_mandate

Fetch the full mandate record including current status, approval state, recommendation, and latest journey state.

paramtypereqdescription
intentIdstringyesMandate ID to fetch
agentpay_get_mandate_journey_status

Fetch the live journey or execution session status for a mandate that is currently executing. If no journey session exists yet, that is expected until downstream dispatch starts.

paramtypereqdescription
intentIdstringyesMandate ID
agentpay_get_mandate_history

Fetch the append-only audit timeline for a mandate — all state transitions, approvals, and execution events.

paramtypereqdescription
intentIdstringyesMandate ID
agentpay_cancel_mandate

Cancel or revoke a mandate that has not yet started executing. Audit trail is preserved.

paramtypereqdescription
intentIdstringyesMandate ID to cancel
actorIdstringnoWho is cancelling — for audit trail
reasonstringnoOptional cancellation reason

Capability Vault

The Capability Vault lets agents call external APIs (Firecrawl, Perplexity, OpenAI, Browserbase…) without ever seeing the raw API key. The user vaults the key once via a secure connect flow; all future calls proxy through AgentPay.

agentpay_list_capability_providers

List the governed external capability catalog — all providers AgentPay can vault and proxy.

agentpay_request_capability_connect

Start a secure connect session for a capability provider. Returns a connectUrl the user opens to vault their API key. The agent never sees the raw credential.

paramtypereqdescription
providerstringyesProvider slug — firecrawl, perplexity, openai, tavily, exa, browserbase, serper, google_maps, etc.
capabilityKeystringyesStable merchant-scoped identifier for this capability, e.g. "firecrawl_primary"
subjectTypestringyes"merchant", "principal", "agent", or "workspace"
subjectRefstringyesID of the owning merchant, principal, agent, or workspace
baseUrlstringnoBase URL — implied by provider preset if omitted
allowedHostsstring[]noAllowed upstream hosts — implied by preset if omitted
authSchemestringno"bearer", "x_api_key", or "basic" — implied by preset
credentialKindstringno"api_key", "bearer_token", or "basic_auth" — implied by preset
freeCallsnumbernoFree-call quota before paid usage approval is required
agentpay_list_capabilities

List all capabilities already connected for your merchant account.

paramtypereqdescription
merchantIdstringyesYour merchant ID
agentpay_get_capability

Fetch metadata for a single connected capability.

paramtypereqdescription
capabilityIdstringyesCapability ID to fetch
agentpay_execute_capability

Execute an upstream API call through the governed proxy. AgentPay injects the vaulted credential, enforces the allowlisted host, and returns approval_required once the spend allowance is exhausted.

paramtypereqdescription
capabilityIdstringyesConnected capability ID
endpointstringyesUpstream path to call (e.g. /v1/scrape)
methodstringnoHTTP method (default: POST)
bodyobjectnoRequest body forwarded to the upstream API

Payments & Funding

Tools for inline human funding — Stripe Checkout (card) and Razorpay (UPI) — and for vaulting reusable payment methods so governed mandates can charge without re-prompting.

agentpay_create_human_funding_request

Create a host-native human funding request. Returns a nextAction payload with a Stripe Checkout URL (card) or UPI QR/deep-link the host can render inline. The human pays without leaving the chat.

paramtypereqdescription
amountnumberyesAmount to request
currencystringyesCurrency code (GBP, USD, INR…)
descriptionstringnoWhat this payment is for
merchantIdstringyesYour merchant ID
preferredMethodstringnocard or upi (default: card)
agentpay_create_funding_setup_intent

Create a reusable Stripe funding setup intent so the principal can save a card for future governed spending.

paramtypereqdescription
principalIdstringyesPrincipal/user ID to attach the card to
merchantIdstringyesYour merchant ID
agentpay_confirm_funding_setup

Confirm a completed Stripe funding setup and persist the saved payment method.

paramtypereqdescription
setupIntentIdstringyesStripe Setup Intent ID to confirm
agentpay_list_funding_methods

List all saved funding methods for a principal.

paramtypereqdescription
principalIdstringyesPrincipal ID
agentpay_create_payment_intent

Create a USDC payment intent and return a Solana Pay URI.

paramtypereqdescription
amountnumberyesAmount in USD
descriptionstringnoPayment description
merchantIdstringyesYour merchant ID
agentpay_get_intent_status

Check whether a payment has been confirmed on-chain.

paramtypereqdescription
intentIdstringyesPayment intent ID
agentpay_get_receipt

Get the full settlement receipt for a completed payment.

paramtypereqdescription
intentIdstringyesPayment or mandate ID
agentpay_parse_upi_payment_request

Parse and normalize a raw upi://pay URI or decoded QR payload. Returns payee, amount, reference, and all standard fields.

paramtypereqdescription
upiUristringyesRaw upi://pay URI or decoded QR string

Identity & AgentPassport

AgentPassport is portable agent identity — trust score, linked accounts, phone verification, and credential attestations that travel across platforms.

agentpay_get_passport

Look up an agent's trust score, interaction history, and linked identities.

paramtypereqdescription
agentIdstringyesAgent ID (agt_… or string identifier)
agentpay_get_identity_bundle

Fetch the portable identity bundle for an agent — verified identities, linked accounts, and trust state.

paramtypereqdescription
agentIdstringyesAgent ID
agentpay_verify_identity_bundle

Verify an agent identity and issue a credential.

paramtypereqdescription
agentIdstringyesAgent ID to verify
agentpay_verify_identity_credential

Verify an already-issued identity credential.

paramtypereqdescription
credentialIdstringyesCredential ID to verify
agentpay_link_identity_bundles

Link two agent identities together in the trust graph.

paramtypereqdescription
agentIdstringyesPrimary agent ID
linkedAgentIdstringyesAgent ID to link
agentpay_start_identity_phone_verification

Start a phone verification challenge for an agent identity.

paramtypereqdescription
agentIdstringyesAgent ID
phoneNumberstringyesE.164 phone number
agentpay_confirm_identity_phone_verification

Confirm a phone verification challenge with the OTP code.

paramtypereqdescription
agentIdstringyesAgent ID
verificationIdstringyesVerification ID from start step
codestringyesOTP code from SMS
agentpay_provision_identity_inbox

Provision or return a portable agent inbox. Returns an inbox address the agent can use to send and receive messages across platforms.

paramtypereqdescription
agentIdstringyesAgent ID
agentpay_send_identity_inbox_message

Send a message from a provisioned agent inbox.

paramtypereqdescription
agentIdstringyesSending agent ID
tostringyesRecipient address or agent ID
bodystringyesMessage body
agentpay_list_identity_inbox_messages

List recent inbox messages for an agent.

paramtypereqdescription
agentIdstringyesAgent ID
limitnumbernoNumber of messages to return (default: 10)

Agent Registry

Register agents on the AgentPay network, discover other agents, and fetch public identity records.

agentpay_register_agent

Register a new AI agent on the AgentPay network. Returns an agent ID and public identity record.

paramtypereqdescription
namestringyesAgent display name
descriptionstringnoWhat this agent does
merchantIdstringyesOwning merchant ID
agentpay_get_agent

Look up a registered agent's public identity record.

paramtypereqdescription
agentIdstringyesAgent ID to look up
agentpay_discover_agents

Search and filter agents on the network by capability, trust level, or name.

paramtypereqdescription
querystringnoSearch query
capabilitystringnoFilter by capability (e.g. travel, finance)
limitnumbernoResults to return (default: 20)
agentpay_get_merchant_stats

Get your account's payment and mandate statistics.

paramtypereqdescription
merchantIdstringyesYour merchant ID

Environment variables

variablerequireddescription
AGENTPAY_API_KEYyesYour merchant API key (apk_…)
AGENTPAY_MERCHANT_IDnoYour merchant ID (mer_…). Recommended — used in mandate and capability calls.
AGENTPAY_API_URLnoOverride the API base URL. Defaults to the production Workers endpoint.

Example prompts

Once configured, ask Claude any of these to exercise the full tool surface:

> Create a governed mandate to book a train London to Bristol, budget £100, require my approval above £50.
> Connect Firecrawl without exposing the raw API key to the agent.
> Run a Firecrawl scrape through the connected capability.
> Create a £49 card payment request so the human can pay without leaving the chat.
> Create a ₹499 UPI funding request.
> Look up the AgentPassport for agent_001.
> Provision an inbox for agent_001 and send a message to traveler@example.com.
> List all mandates and their current status.
> Show me the audit timeline for mandate mnd_abc123.
Quickstart
MCP in 2 min, REST in 5 min
Adapters
OpenAI, LangChain, Vercel AI SDK
AgentPassport
Portable identity and trust
Pricing
Launch free · Builder $39 · Growth $149