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.
npx -y @agentpayxyz/mcp-serverEdit ~/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.
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 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_mandateCreate a governed mandate and auto-trigger the planning step. Returns a mandate record with status, AI-generated recommendation, and approval requirement.
| param | type | req | description |
|---|---|---|---|
principalId | string | yes | The human principal who owns the mandate and holds approval authority |
operatorId | string | yes | The agent or operator initiating the mandate |
objective | string | yes | Outcome-oriented plain-language description of what should happen |
source | string | no | "direct_human" or "delegated_agent" (default: delegated_agent) |
constraints | object | no | Execution constraints — e.g. { budgetMax: 5000 } in pence/cents |
mandate | object | no | Policy — e.g. { amountPence: 5000, currency: "GBP", autoApproveAmountPence: 2000, approvalMethod: "inline" } |
agentpay_approve_mandateApprove a mandate in awaiting_approval state. Transitions to approved so execution can begin.
| param | type | req | description |
|---|---|---|---|
intentId | string | yes | Mandate ID to approve |
actorId | string | no | Operator or principal ID recording who approved |
approvalToken | string | no | Ephemeral token from a linked approval session |
agentpay_execute_mandateStart execution of an approved mandate. Returns execution state and journey session ID.
| param | type | req | description |
|---|---|---|---|
intentId | string | yes | Mandate ID to execute |
actorId | string | no | Agent/operator identifier starting execution |
jobId | string | no | Optional downstream execution job ID |
agentpay_get_mandateFetch the full mandate record including current status, approval state, recommendation, and latest journey state.
| param | type | req | description |
|---|---|---|---|
intentId | string | yes | Mandate ID to fetch |
agentpay_get_mandate_journey_statusFetch 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.
| param | type | req | description |
|---|---|---|---|
intentId | string | yes | Mandate ID |
agentpay_get_mandate_historyFetch the append-only audit timeline for a mandate — all state transitions, approvals, and execution events.
| param | type | req | description |
|---|---|---|---|
intentId | string | yes | Mandate ID |
agentpay_cancel_mandateCancel or revoke a mandate that has not yet started executing. Audit trail is preserved.
| param | type | req | description |
|---|---|---|---|
intentId | string | yes | Mandate ID to cancel |
actorId | string | no | Who is cancelling — for audit trail |
reason | string | no | Optional 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_providersList the governed external capability catalog — all providers AgentPay can vault and proxy.
agentpay_request_capability_connectStart 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.
| param | type | req | description |
|---|---|---|---|
provider | string | yes | Provider slug — firecrawl, perplexity, openai, tavily, exa, browserbase, serper, google_maps, etc. |
capabilityKey | string | yes | Stable merchant-scoped identifier for this capability, e.g. "firecrawl_primary" |
subjectType | string | yes | "merchant", "principal", "agent", or "workspace" |
subjectRef | string | yes | ID of the owning merchant, principal, agent, or workspace |
baseUrl | string | no | Base URL — implied by provider preset if omitted |
allowedHosts | string[] | no | Allowed upstream hosts — implied by preset if omitted |
authScheme | string | no | "bearer", "x_api_key", or "basic" — implied by preset |
credentialKind | string | no | "api_key", "bearer_token", or "basic_auth" — implied by preset |
freeCalls | number | no | Free-call quota before paid usage approval is required |
agentpay_list_capabilitiesList all capabilities already connected for your merchant account.
| param | type | req | description |
|---|---|---|---|
merchantId | string | yes | Your merchant ID |
agentpay_get_capabilityFetch metadata for a single connected capability.
| param | type | req | description |
|---|---|---|---|
capabilityId | string | yes | Capability ID to fetch |
agentpay_execute_capabilityExecute 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.
| param | type | req | description |
|---|---|---|---|
capabilityId | string | yes | Connected capability ID |
endpoint | string | yes | Upstream path to call (e.g. /v1/scrape) |
method | string | no | HTTP method (default: POST) |
body | object | no | Request 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_requestCreate 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.
| param | type | req | description |
|---|---|---|---|
amount | number | yes | Amount to request |
currency | string | yes | Currency code (GBP, USD, INR…) |
description | string | no | What this payment is for |
merchantId | string | yes | Your merchant ID |
preferredMethod | string | no | card or upi (default: card) |
agentpay_create_funding_setup_intentCreate a reusable Stripe funding setup intent so the principal can save a card for future governed spending.
| param | type | req | description |
|---|---|---|---|
principalId | string | yes | Principal/user ID to attach the card to |
merchantId | string | yes | Your merchant ID |
agentpay_confirm_funding_setupConfirm a completed Stripe funding setup and persist the saved payment method.
| param | type | req | description |
|---|---|---|---|
setupIntentId | string | yes | Stripe Setup Intent ID to confirm |
agentpay_list_funding_methodsList all saved funding methods for a principal.
| param | type | req | description |
|---|---|---|---|
principalId | string | yes | Principal ID |
agentpay_create_payment_intentCreate a USDC payment intent and return a Solana Pay URI.
| param | type | req | description |
|---|---|---|---|
amount | number | yes | Amount in USD |
description | string | no | Payment description |
merchantId | string | yes | Your merchant ID |
agentpay_get_intent_statusCheck whether a payment has been confirmed on-chain.
| param | type | req | description |
|---|---|---|---|
intentId | string | yes | Payment intent ID |
agentpay_get_receiptGet the full settlement receipt for a completed payment.
| param | type | req | description |
|---|---|---|---|
intentId | string | yes | Payment or mandate ID |
agentpay_parse_upi_payment_requestParse and normalize a raw upi://pay URI or decoded QR payload. Returns payee, amount, reference, and all standard fields.
| param | type | req | description |
|---|---|---|---|
upiUri | string | yes | Raw 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_passportLook up an agent's trust score, interaction history, and linked identities.
| param | type | req | description |
|---|---|---|---|
agentId | string | yes | Agent ID (agt_… or string identifier) |
agentpay_get_identity_bundleFetch the portable identity bundle for an agent — verified identities, linked accounts, and trust state.
| param | type | req | description |
|---|---|---|---|
agentId | string | yes | Agent ID |
agentpay_verify_identity_bundleVerify an agent identity and issue a credential.
| param | type | req | description |
|---|---|---|---|
agentId | string | yes | Agent ID to verify |
agentpay_verify_identity_credentialVerify an already-issued identity credential.
| param | type | req | description |
|---|---|---|---|
credentialId | string | yes | Credential ID to verify |
agentpay_link_identity_bundlesLink two agent identities together in the trust graph.
| param | type | req | description |
|---|---|---|---|
agentId | string | yes | Primary agent ID |
linkedAgentId | string | yes | Agent ID to link |
agentpay_start_identity_phone_verificationStart a phone verification challenge for an agent identity.
| param | type | req | description |
|---|---|---|---|
agentId | string | yes | Agent ID |
phoneNumber | string | yes | E.164 phone number |
agentpay_confirm_identity_phone_verificationConfirm a phone verification challenge with the OTP code.
| param | type | req | description |
|---|---|---|---|
agentId | string | yes | Agent ID |
verificationId | string | yes | Verification ID from start step |
code | string | yes | OTP code from SMS |
agentpay_provision_identity_inboxProvision or return a portable agent inbox. Returns an inbox address the agent can use to send and receive messages across platforms.
| param | type | req | description |
|---|---|---|---|
agentId | string | yes | Agent ID |
agentpay_send_identity_inbox_messageSend a message from a provisioned agent inbox.
| param | type | req | description |
|---|---|---|---|
agentId | string | yes | Sending agent ID |
to | string | yes | Recipient address or agent ID |
body | string | yes | Message body |
agentpay_list_identity_inbox_messagesList recent inbox messages for an agent.
| param | type | req | description |
|---|---|---|---|
agentId | string | yes | Agent ID |
limit | number | no | Number of messages to return (default: 10) |
Agent Registry
Register agents on the AgentPay network, discover other agents, and fetch public identity records.
agentpay_register_agentRegister a new AI agent on the AgentPay network. Returns an agent ID and public identity record.
| param | type | req | description |
|---|---|---|---|
name | string | yes | Agent display name |
description | string | no | What this agent does |
merchantId | string | yes | Owning merchant ID |
agentpay_get_agentLook up a registered agent's public identity record.
| param | type | req | description |
|---|---|---|---|
agentId | string | yes | Agent ID to look up |
agentpay_discover_agentsSearch and filter agents on the network by capability, trust level, or name.
| param | type | req | description |
|---|---|---|---|
query | string | no | Search query |
capability | string | no | Filter by capability (e.g. travel, finance) |
limit | number | no | Results to return (default: 20) |
agentpay_get_merchant_statsGet your account's payment and mandate statistics.
| param | type | req | description |
|---|---|---|---|
merchantId | string | yes | Your merchant ID |
Environment variables
Example prompts
Once configured, ask Claude any of these to exercise the full tool surface: