Sign In

@agentpay-run/mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentpay-run/mcp-server

Official MCP server for AgentPay. Lets agents charge vendors, check budgets, and inspect quota through any MCP-compatible client (Claude Desktop, Cursor, etc.).

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

@agentpay-run/mcp-server

Official MCP server for AgentPay.

Lets agents running through any MCP-compatible client (Claude Desktop, Cursor, Continue, your own MCP host) charge vendors, check budgets, and inspect tier quota through your AgentPay wallet — with all of AgentPay's policy gates, anomaly detection, and audit logging in front.

Why

The state of the art for giving an agent a budget is "share your Stripe key and pray." AgentPay puts a real spend-control layer between the agent and the payment rail. This MCP server exposes that layer as standard MCP tools so any agent can use it without a vendor-specific integration.

Tools exposed

ToolWhat it does
chargeCharge a vendor. Returns approved/denied + which policy matched + remaining budget.
get_walletRead-only wallet snapshot: budget, spent, per-tx cap, vendor allowlist, active state.
get_quotaRead-only tier + remaining quota: wallets, today's charges, audit retention.

Install in Claude Desktop

  • Get a wallet API key at agentpay.run/dashboard (use a ap_test_... key while you wire things up).
  • Open claude_desktop_config.json (Claude Desktop → Settings → Developer → Edit Config).
  • Add:
{
  "mcpServers": {
    "agentpay": {
      "command": "npx",
      "args": ["-y", "@agentpay-run/mcp-server"],
      "env": {
        "AGENTPAY_API_KEY": "ap_test_..."
      }
    }
  }
}
  • Restart Claude Desktop. You'll see the agentpay server in the MCP indicator (bottom right of the chat).

Install in Cursor / other MCP hosts

Anywhere that accepts an MCP server config, point it at npx -y @agentpay-run/mcp-server with the same AGENTPAY_API_KEY env var.

Usage

Once installed, just talk to your agent like you would otherwise:

"Charge openai.com $12 against my dev wallet, then tell me what's left."

The agent picks charge, reads back the response, and decides what to do based on the policy verdict.

Configuration

Env varRequiredDefaultNotes
AGENTPAY_API_KEYyesWallet API key. ap_test_... for development, ap_live_... for production wallets.
AGENTPAY_BASE_URLnohttps://agentpay.runOverride for self-hosted or local dev (e.g. http://localhost:3000).

Local development

git clone https://github.com/sdeanesh-png/agentpay
cd agentpay/sdk/mcp
npm install
npm run build
AGENTPAY_API_KEY=ap_test_... node dist/index.js

The server speaks MCP over stdio. To smoke-test it manually, pipe a JSON-RPC tools/list request:

echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'   | AGENTPAY_API_KEY=ap_test_dummy node dist/index.js

Security

  • The wallet API key is the only secret. It's wallet-scoped — even if compromised, the blast radius is bounded by the policy you set on that wallet (per-tx cap, monthly budget, vendor allowlist).
  • The server is stateless. Every call re-queries AgentPay; nothing is cached locally.
  • For production, use ap_live_... keys with strict per-tx caps and a vendor allowlist. Treat them like API tokens: rotate via the dashboard if exposed.

License

MIT.

Keywords

agentpay

FAQs

Package last updated on 09 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts