Skip to main content
Cleo Pay runs a hosted Model Context Protocol (MCP) server that lets AI agents operate your Cleo Pay account with the same capabilities as the REST API. Connect Claude Code, Cursor, VS Code, or any MCP client that supports Streamable HTTP, and your agent can list and create payables, send ACH payments, manage vendor contacts, and link bank accounts — limited to exactly the scopes you grant its API key. The server is remote and stateless: there is nothing to install or host. Point your client at the endpoint, pass your API key in the Authorization header, and it’s ready.
New to Cleo Pay? Read the Quickstart first — the MCP tools operate on the same payables, payments, contacts, and bank accounts as the REST API.

Environments

Both environments also accept an explicit path form: https://api.stg.cleo-pay.com/v1/mcp (Sandbox) and https://api.cleo-pay.com/v1/mcp (Live). API keys are environment-bound: a cleo_test_ key only authenticates against Sandbox, and a cleo_live_ key only against Live. Sandbox is a fully separate environment with its own data — nothing you create there appears in Live, and payments run against a simulated banking network.
Start in Sandbox. Wire up your agent with a cleo_test_ key, rehearse your flows end to end, then switch the endpoint and key to go live.

Get an API key

1

Create a key in the dashboard

In the Cleo Pay dashboard, go to Settings → Developers and click Create API key. You need admin access on the business. Give the key a name, select the scopes it should have (see Scopes and tool visibility below), and optionally set an expiration date.
2

Copy the secret

The full key (for example cleo_test_a1b2c3d4e5f6g7h8_...) is shown once, at creation time. Store it in a secrets manager or environment variable — it cannot be retrieved again. If you lose it, rotate the key to mint a new secret.
Treat API keys like passwords. Anyone holding the key can act on your business within its scopes. Never commit keys to version control, and rotate immediately if you suspect a leak — rotation atomically mints a new secret and revokes the old one.
Your business must have completed identity verification before API keys will authenticate. Until verification is finished, requests are rejected with 401 Unauthorized.

Connect your client

The examples below use the Sandbox endpoint and a cleo_test_ key. For Live, swap in https://mcp.cleo-pay.com and a cleo_live_ key.
Then ask Claude something like “list my Cleo payables” — it discovers and calls the tools automatically.
MCP client config files contain your API key in plain text. Keep them out of version control — in particular, add .vscode/mcp.json to .gitignore if you put a key in it, or use your client’s secret-input mechanism.
Any MCP client that supports Streamable HTTP with custom headers works. Clients that only support OAuth-based remote connectors (such as Claude Desktop’s one-click connectors) are not yet supported.

Scopes and tool visibility

Each tool requires a scope. The server only advertises the tools your key is allowed to call — tools/list omits everything else, so your agent never sees a tool it can’t use. Calling an out-of-scope tool directly returns a JSON-RPC Access denied error. Grant the minimum scopes your integration needs. A read-only agent (reporting, reconciliation) needs only the :read scopes; keep payments:initiate on a separate, tightly-held key. Requests are rate-limited to 100 requests per minute per API key. Exceeding the limit returns HTTP 429.

Tools

All tools return JSON. Amounts are integers in cents; dates use YYYY-MM-DD.

Payables

Returns items (without line items) and totalCount.
Returns the payable with its full line items.
Not idempotent — a retry creates a second draft. See Idempotency and retries.

Payments

In the Live environment, create_payment moves real money. Scope keys carefully and rehearse in Sandbox first.
Returns the affected payableId and a payments array — large amounts may split into multiple ACH transfers. Payment statuses: pending, scheduled, processing, held, completed, failed, cancelled, refunded.Payments to a payee without a linked bank account are held until the payee provides their details; scheduling is not supported for held payments.

Bank accounts

The account starts in pending_verification; it becomes usable after verify_micro_deposits succeeds. Not idempotent — do not auto-retry on timeout.
Maximum 3 attempts — a wrong pair consumes one. After 3 failures the account becomes permanently unverified.
list_bank_accounts takes no parameters and returns all linked accounts.get_bank_account and remove_bank_account take a single required bankAccountId (string).The business’s default verified account cannot be removed — set another account as default in the Cleo Pay dashboard first. Account statuses: pending_verification, verified, unverified, removed.

Contacts

Not idempotent — do not auto-retry on timeout.
All three take a required contactId (string).update_contact additionally accepts: displayName, emails (replaces all emails, max 5), phone, address — these apply to payee-type contacts only — and netTerms (integer ≥ 0), which applies to any contact.archive_contact and unarchive_contact are idempotent — safe to call on an already-archived or already-active contact. Revoked contacts cannot be unarchived.

Idempotency and retries

Agents retry things. Here is what is safe:

Errors

Remember that tools outside your key’s scopes don’t appear in tools/list at all — if a tool seems missing, check the key’s scopes.

Data protection

  • Bank account and routing numbers are write-only: responses only ever include the last 4 digits.
  • Tax IDs are write-only: responses include a mask (for example ***6789).
  • Responses are explicit allowlists — internal fields are never serialized.
  • Every write is recorded in an append-only action log attributed to your API key, with request ID and IP address.

Next steps