@arispay/payagent-mcp
v6.0.0
Published
Let AI agents pay for APIs through ArisPay: fiat payments (EUR, GBP, USD) with spend mandates, receipts, and idempotency. Four tools: setup, discover, pay, history. Use with Claude, Cursor, or any MCP client.
Maintainers
Readme
@arispay/payagent-mcp
Let AI agents pay for APIs through ArisPay. An MCP server for Claude Desktop, Cursor, Windsurf, or any MCP client. It is a thin wrapper around the payagent SDK.
pay settles an HTTP 402 from your ArisPay funding account in EUR, GBP or USD. ArisPay enforces the agent's mandate (per transaction, per day, per month, allowed domains) before it authorizes a payment.
Tools
Four core tools (the default surface):
| Tool | What it does | Money |
|------|--------------|-------|
| setup | Create or recover an account and a payer agent in one call | moves none |
| discover | Search the ArisPay marketplace by intent and budget | read-only |
| pay | Request → 402 → authorize at ArisPay → retry → structured receipt. Requires an idempotencyKey; a repeated key returns the cached receipt and does not pay again | spends real money |
| history | Recent payments | read-only |
Agent administration (create_agent, list_agents, rename_agent) loads only when the host config sets PAYAGENT_MCP_PROFILE=admin.
Every tool declares MCP safety annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint). pay is the only destructive tool.
Setup
Add the server to your MCP client config. No environment variables are required.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"arispay": {
"command": "npx",
"args": ["-y", "@arispay/payagent-mcp"]
}
}
}Cursor
Same server block in .cursor/mcp.json. Windsurf: same pattern in ~/.codeium/windsurf/mcp_config.json.
Cold start
- Ask the agent to run
setup({ email: "[email protected]" }). It returns the agent and its mandate. - Add money to your funding account in the ArisPay dashboard.
- Ask the agent to
pay.
Credentials persist to ~/.payagent/config.json. The payagent CLI uses the same file.
Environment variables (all optional)
| Variable | Description |
|----------|-------------|
| ARISPAY_API_KEY | Developer key. Usually not necessary: setup makes one. |
| ARISPAY_URL | ArisPay API base URL. Default https://api.arispay.app. |
| PAYAGENT_MCP_PROFILE | admin additionally loads the three agent-administration tools. Default: core (four tools). |
Receipts and idempotency
pay requires a caller-chosen idempotencyKey (min 8 chars; use a UUID). Every completed payment writes a machine-readable receipt (amount in cents, currency, payment id, remaining mandate) to ~/.payagent/mcp-receipts.json. A second pay with a key that already paid returns the stored receipt and does not pay again.
One exception: the seller took the payment and then failed to deliver. A retry with the same key inside 9 minutes sends the same payment again, and the seller serves it without a new charge.
How it works
- The agent calls
paywith a URL and anidempotencyKey. The seller answers HTTP 402 with anarispay-fiatoffer. payagentasks ArisPay to authorize the payment. ArisPay checks the mandate and the balance.payagentretries the request with the authorization. The seller settles it at ArisPay.- The tool returns the response and a structured receipt.
A 402 that has no arispay-fiat offer is not paid. The tool returns an error.
Migrating from v5
v6 is a breaking release. The server pays in fiat only.
| v5 tool | v6 |
|---------|----|
| setup, discover, pay, history | kept |
| create_agent, list_agents, rename_agent | kept, behind PAYAGENT_MCP_PROFILE=admin |
| inspect, balance, check_payment_signal, fund_agent | removed |
The variables PAYAGENT_PRIVATE_KEY, ARISPAY_AGENT_KEY and PAYAGENT_WALLET are no longer read.
Install
npm install @arispay/payagent-mcpOr run it with npx @arispay/payagent-mcp from an MCP client config. npx buyforme-mcp is the same server under the consumer brand.
Related
License
MIT
