Skip to the page

MCP server

The Model Context Protocol lets an AI agent use a service through named tools. AquaPay's MCP server gives an agent one gateway account's payments, with the same keys, scopes and rules as the API.

Connect a client

https://mcp.bhimpay.online/mcp
  • The transport is streamable HTTP, with JSON answers.
  • The agent signs in with an API key: Authorization: Bearer aqk_…. A key belongs to one gateway account, so the agent sees that account and nothing else.
  • Give an agent a read-only key unless it has to create something. The console's Developers, MCP page makes one and fills these entries in with it.
claude mcp add --transport http aquapay https://mcp.bhimpay.online/mcp \
  --header "Authorization: Bearer aqk_live_…"
{
  "mcpServers": {
    "aquapay": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.bhimpay.online/mcp",
        "--header",
        "Authorization:${AQUAPAY_AUTH}"
      ],
      "env": {
        "AQUAPAY_AUTH": "Bearer aqk_live_…"
      }
    }
  }
}
{
  "mcpServers": {
    "aquapay": {
      "url": "https://mcp.bhimpay.online/mcp",
      "headers": {
        "Authorization": "Bearer aqk_live_…"
      }
    }
  }
}
  • Claude Code: Run it in your project's directory.
  • Claude Desktop: Add it to claude_desktop_config.json (Settings → Developer → Edit config), then restart the app.
  • Cursor: Add it to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for every project.

Tools

Each tool runs the API operation it names, through the same checks: the key's scopes and allowed addresses, the account's rate limits, idempotency, and the request log.

ToolWhat it doesScope
get_balanceRead what the account can pay out now, and what payouts in flight hold.read
get_payinRead one pay-in by id, or find pay-ins by your reference.read
list_payinsList pay-ins, newest first, by status or reference.read
get_payoutRead one payout by id, or find payouts by your reference.read
verify_webhook_signatureCheck a webhook's signature with the endpoint's secret, on the server. The secret is never returned.read
search_docsSearch the integration guide and the API descriptions.read
create_payinOpen a pay-in and get the page to send the payer to.payins:write
create_payoutSend a payout. It takes the payment password as an input every time: the password is a person's approval.payouts:write

When an agent moves money

  • create_payout takes the payment password as an input on every call. The password is a person's approval, so an agent cannot send a payout on its own.
  • A write tool takes an optional idempotencyKey. Without one, the key is derived from the tool call itself, so a client's retry of the same call replays and a new call never does.
  • create_payout returns the attempt key, so a lost answer is recovered with get_payout.
  • A payout an agent creates still reaches a provider at most once, and still ends in one of the same answers. See what to do next.

What it is good for

  • A support agent that answers "where is my payout?" by reading the payout and its UTR.
  • A coding agent that reads these docs through search_docs while it writes your integration.
  • A finance agent that checks the balance before a batch of payouts, which a person then approves.