Skip to main content
The Atoa Model Context Protocol (MCP) server provides a set of tools that AI assistants and applications can use to interact with the Atoa payment API. Process payments, manage customers, handle refunds, access bank feeds, and more — all through natural language or programmatic tool calls.

HTTP Mode (hosted)

Connect any MCP-compatible client to Atoa’s hosted server. No local installation required.

NPX Mode (local)

Run the MCP server locally via npx. Works offline and keeps credentials off HTTP.

Prerequisites

Before you begin, make sure you have:
Connect any MCP-compatible client directly to Atoa’s hosted MCP server — no local installation required. Endpoint: https://mcp.atoa.me/mcp Pass your SDK token and target environment as request headers on every connection:
Use your Sandbox token with X-Atoa-Env: sandbox and your Production token with X-Atoa-Env: production. Mixing a token with the wrong environment will return authentication errors.

AI Assistant Configuration

Most AI clients support HTTP-mode MCP connections natively. Use these configs to point your assistant directly at the Atoa MCP server.
Run from your terminal:
Atoa MCP tools loaded in Claude Code
Switch X-Atoa-Env from sandbox to production (and swap your token) when you go live.

Connecting Programmatically (MCP SDK)

For web applications and backend services, use the MCP SDK’s StreamableHTTPClientTransport:

Rate Limits

The HTTP endpoint enforces rate limiting on a per-token basis. Requests that exceed the allowed rate will receive a 429 Too Many Requests response. If this happens, back off and retry after a short delay using an exponential backoff strategy.

NPX Mode (Local)

Run the Atoa MCP server locally via npx. Use this when you prefer not to send auth headers over HTTP, need to work offline, or your AI client does not support HTTP-mode MCP connections. Requires Node.js 18+ and npm 9+ (node --version to check).

Quick Setup

The fastest way to get started is the interactive wizard:
This walks you through a series of prompts and generates the configuration snippet you need to add to your AI client’s config file.

Manual Configuration

Add the following to your AI client’s MCP configuration file:
Edit claude_desktop_config.json:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
Claude Desktop showing an Atoa tool call result
Passing credentials via the env object keeps your token out of the process argument list, which is more secure than using --auth-token CLI flags.
Optional environment variables you can add to the env block: Switch ATOA_ENV from sandbox to production (and swap your token) when you go live. Once configured, restart your AI client and ask:
If everything is set up correctly, the assistant will call get_stores and return your store list.

Available Tools

Browse the 29 tools below, organized into 8 categories. Click any category to expand.

get_stores

List all active stores linked to your merchant account

process_payment

Create a new payment request (returns a payment link and QR code)

cancel_payment

Cancel a pending payment request

get_payment_status

Check the current status of a payment

get_transactions

Retrieve transaction history with filters (date range, status, customer)

create_customer

Register a new customer — requires either email or phoneNumber

list_customers

List all customers with pagination

get_customer

Get details for a specific customer

update_customer

Update customer information

delete_customer

Remove a customer record

list_payment_methods

List saved payment methods (cards) for a customer

get_payment_method

Get details of a specific saved card

delete_payment_method

Remove a saved card

charge_saved_card

Charge a previously saved card — returns AUTHORIZED, not COMPLETED

capture_payment

Settle a pre-authorized payment (required for MANUAL_CAPTURE)

cancel_card_payment

Void a pre-authorization or unsettled card payment

get_refund_payments

List refunds for a given payment

initiate_refund

Start a refund for a COMPLETED payment (full or partial)

cancel_refund

Cancel an INITIATED refund — production only

list_merchant_webhooks

List all registered webhook endpoints

create_webhook

Register a new webhook endpoint (supports OAuth 2.0 or Basic Auth)

delete_webhook

Remove a webhook endpoint

initiate_ais_auth

Start the bank authorization flow — returns a URL the user must visit

fetch_all_accounts

List authorized bank accounts (requires completed authorization)

fetch_account_details

Get sort code, account number and bank name for an account

fetch_account_balance

Get the current balance for an account

fetch_account_transactions

Retrieve paginated transactions for an account

revoke_account_access

Revoke access to one account, multiple accounts, or an entire session

get_institutions

List all supported banking institutions
Some tools are guarded by your merchant’s capabilities. For example, card-on-file tools require card payments to be enabled, AIS tools require AIS bank feed access, and tipping requires tipping to be enabled. Contact [email protected] to check which features are active on your account.

Core Workflows

The simplest flow — create a payment link and check when it’s completed.
The assistant will:
  1. Call get_stores to resolve your default store
  2. Call process_payment with amount: 25, currency: "GBP"
  3. Return a paymentLink and qrCodeUrl you share with the customer
  4. The customer opens the link or scans the QR code to pay via their bank app
amount must be a positive number with no more than 2 decimal places (e.g., 25.99 ✅ — 25.999 ❌). Currency defaults to "GBP".
Poll for completion:
The assistant calls get_payment_status and returns one of:
This two-step flow saves a card during a regular payment, then charges it in future without the customer re-entering details.Step 1 — First payment (saves the card)
The assistant calls process_payment with savePaymentMethod: true and atoaCustomerId: "cust_abc123". After the customer completes the payment, their card is stored.
atoaCustomerId is required when savePaymentMethod is true. The customer must exist first — create them with create_customer if needed.
Step 2 — List saved cards
The assistant calls list_payment_methods and returns the saved cards with masked numbers.Step 3 — Charge the saved card
The assistant calls charge_saved_card with:
charge_saved_card always returns status AUTHORIZED, not COMPLETED. For AUTO_CAPTURE, settlement happens automatically. For MANUAL_CAPTURE, you must call capture_payment to collect the funds — otherwise the authorization expires and no money moves.
Step 4 — Capture (MANUAL_CAPTURE only)
The assistant calls capture_payment with the paymentRequestId from step 3.
The assistant calls initiate_refund. Key constraints:
  • Payment must be in COMPLETED status — pending, expired, or cancelled payments cannot be refunded
  • Partial refunds are supported — amount must be ≤ the original payment amount
  • The refund goes through as INITIATEDPENDINGCOMPLETED (or FAILED)
  • To cancel an INITIATED refund before it processes, use cancel_refundproduction only
Sandbox: To simulate a failed refund, call initiate_refund with refundNotes: "FAILURE TEST". Use this to test your error-handling paths — cancel_refund is not available in sandbox.
Webhooks notify your server when payment or refund statuses change.
The assistant calls create_webhook with:
You can create one webhook per event type. Register separate webhooks for payment status and refund status if you need both.

Troubleshooting

Your auth token is invalid, expired, or mis-formatted. Check:
  1. Get a fresh token from the Atoa Dashboard
  2. HTTP mode: confirm the Authorization header is Bearer YOUR_TOKEN (with a space after Bearer) and the X-Atoa-Env header matches your token type (sandbox or production)
  3. NPX mode: confirm ATOA_AUTH_TOKEN and ATOA_ENV are set correctly in the env block of your config
  4. Sandbox tokens and production tokens are not interchangeable — ensure you are using the right one for each environment
  1. Restart your AI client after updating the config file — most clients load MCP config only on startup
  2. Verify the config file path and key name match your client (see the config tabs above)
  3. NPX mode: check Node.js version — node --version must be 18+
  4. NPX mode: run the server manually to see errors: npx @atoapayments/mcp
This is normal. All card payments return AUTHORIZED first.
  • AUTO_CAPTURE: settlement happens automatically within minutes — no action needed
  • MANUAL_CAPTURE: you must call capture_payment to settle the funds
  • CAPTURE_BEFORE_EXPIRY: Atoa auto-captures before the hold expires — no action needed unless you want early settlement
If you want immediate settlement with no extra step, use captureType: "AUTO_CAPTURE".
The user must complete the bank authorization before this tool works. After calling initiate_ais_auth:
  1. Share the authorizationUrl with the user
  2. Wait for them to approve access in their banking app
  3. Only then call fetch_all_accounts with the returned accountAuthId
In sandbox, the authorization URL may redirect immediately with mock data.
Refunds require the payment to be in COMPLETED status. Check the payment status first with get_payment_status. You cannot refund a PENDING, EXPIRED, CANCELLED, or FAILED payment.
This is expected — cancel_refund only works in production. To test refund cancellation paths in sandbox, call initiate_refund with refundNotes: "FAILURE TEST" to simulate a failure instead.
Some tools require specific features to be enabled on your merchant account. For example:
  • Card-on-file tools (charge_saved_card, capture_payment, cancel_card_payment) require card payments
  • AIS / Bank Feed tools require AIS bank feed access
  • Tips on process_payment require tipping to be enabled
Contact [email protected] to check which capabilities are active or to enable additional features.
The get_stores tool only returns active stores. If a store is disabled in your Atoa Dashboard, it won’t appear. Enable the store in the dashboard and retry.
If you experience timeouts connecting to https://mcp.atoa.me:
  1. Check your internet connection
  2. Verify no firewall rules are blocking outbound HTTPS (port 443)
  3. Check Atoa Status for service incidents
The HTTP endpoint enforces rate limiting per token. If you receive a 429 response:
  1. Wait briefly before retrying the request
  2. Space out sequential tool calls
  3. If you consistently hit rate limits for a production use case, contact [email protected]

Need Help?

Contact our team at [email protected] or use chat support on the Dashboard.