Skip to main content
The Cleo MCP server is a stateless Streamable HTTP endpoint built into the Cleo API. Its tools wrap the same services as the REST API, use the same scopes, and return the same error codes. There are two ways to connect:
  • Sign in with Cleo (OAuth). For ChatGPT, Claude and other agents that support MCP authorization. You pick a business and Read only or Read and approve. The agent cannot pay. See Connect your agent.
  • An API key. For integrations and agents that send a header. The key’s scopes decide what the agent can do, payments included. This page covers it.

Endpoints

The mcp. hosts need no path. A key works only on its own environment’s host. Send the key as a Bearer token on every request:
While Cleo has the partner API turned off, every request answers 503 service_unavailable.

Connect your client

For production, use https://api.cleo-pay.com/v1/mcp and a cleo_live_ key. To connect without a key, leave out the header and sign in instead. See Connect your agent.

Scopes and tool visibility

tools/list shows only the tools the key’s or the connection’s scopes allow. If a tool is missing, check the key’s scopes first. Calling a hidden tool directly fails at the protocol level with JSON-RPC error -32600 (“Access denied”), not with a forbidden_scope tool result. This is the one place where MCP and REST errors differ. A key whose business has not finished identity verification sees only get_business_status.

Tools

Business

Bills

create_payable and submit_payable take custom field answers with the same shapes and rules as POST /v1/payables and POST /v1/payables/{payableId}/submit. Both must answer the business’s required bill-level fields, or the tool fails with validation_error. See Write answers. Each answer list takes up to 200 answers. list_payables takes customFieldId and customFieldValue together, with the same rules as GET /v1/payables: the id of a bill-level dropdown or multiple-choice field, and an option id, externalId or value. updatedSince and expand work as on GET /v1/payables. Listing custom fields and syncing their options are REST only, so custom-fields:read and custom-fields:write add no tools.

Members

Payments

Balance

Invoices

Contacts

Bank accounts

Webhook endpoints

Rotating a secret, listing deliveries and redelivering an event are REST only. The webhook tools answer feature_unavailable until Cleo turns webhooks on for the business.

Reviewing bills

approve_payable and flag_payable let an agent review bills without paying them. The payables:approve scope never lets a key or a connection pay.
  1. Call list_payables with paymentStatus: "unpaid" and status: "pending_approval". Read every page until you have totalCount bills.
  2. Read each bill with get_payable. Compare its vendor, totalAmountCents and eventDate with what the business expects.
  3. If they match, call approve_payable with the bill’s totalAmountCents, vendorKey and customNumber exactly as you read them, as expectedTotalAmountCents, expectedVendorKey and expectedCustomNumber. Send null for expectedCustomNumber when the bill has no number. Add a comment that says what it matched.
  4. If anything differs, call flag_payable with a reason that says what differs. Use list_members to name who should look.
Approval fills the member’s own step, under the same rules as the Cleo web app.
  • If someone changed the total, moved the bill to another vendor or changed its bill number since you read it, the bill is not approved and the tool answers payable_changed, usually naming what differs. Read it again before you decide. For the bill number, surrounding spaces are ignored and a blank number counts as none; otherwise the match is exact.
  • A bill that is not waiting for approval, a step that belongs to another approver, and a step this member already approved answer validation_error. An admin can approve any step, as in the web app.
  • When the business requires categories and the bill has none, approval answers validation_error. Set the category in Cleo first.
  • When the last step is approved and no other approver is still open, the bill’s status becomes approved and it waits for payment. Paying it is a separate call.
  • A flag shows as Flagged with the reason in the bill’s activity in Cleo, and in flags on the bill. It changes nothing else, and nobody is assigned.
  • Cleo records each approval and flag as the key’s member, with the agent’s name: the OAuth client’s name for a connected agent, or the API key’s name. The bill’s activity in Cleo shows, for example, Jane Doe approved via ChatGPT. The tool results do not include the agent’s name.
The server’s instructions tell every connected agent the same rules: approve only when vendor, amount and event date match, flag otherwise, and never pay a bill or move money unless the user asks for that payment in so many words. A key with payments:initiate can still pay when asked. Leave that scope off a key that should only review. The review_unpaid_bills prompt starts this review. Its optional expectations argument takes what to compare with, such as a P&L. REST equivalents: POST /v1/payables/{payableId}/approve, POST /v1/payables/{payableId}/flags and GET /v1/members.

Paying from the right source

  1. Call list_funding_sources. Pick an item with canPay: true.
  2. Copy its pay fields into create_payment: paymentRail and fundingSource for the Cleo Pay balance, paymentRail and bankAccountId for a Dwolla bank.
  3. Paying from the Cleo Pay linked bank (fundingSource: "BANK") is not available through the API yet and answers feature_unavailable.
The rules are in Funding sources. Before paying, an agent can call get_business_status to explain why the business cannot pay.

Retrying safely

Write tools take an idempotencyKey argument, 1 to 64 characters. A key is bound to the tool and the arguments it first came with:
  • The same key with the same arguments returns the first result. The action does not run again.
  • The same key with other arguments, or for another tool, answers idempotency_conflict.
  • Money tools never run twice under one key. If one fails in a way that may have moved money, every retry with its key answers payment_unconfirmed. Check list_payments or list_balance_transactions before you try again with a new key.
Without a key, create_payable, create_contact and add_bank_account create a new record on each retry. Full rules: Idempotency.

Errors

A failed tool call returns isError: true, the text "<code>: <message>", and the same error as REST in structuredContent:
Links in details are absolute. Show them to your user: setup, bank linking and unlocking happen in the Cleo web app. The MCP endpoint’s own 401, 429 and 503 answers use the REST error body and carry X-Request-Id. Each HTTP request to the endpoint counts once against the key’s rate limit, and every counted answer carries the RateLimit-* headers; see Rate limits. The codes are listed in Errors.

Data protection

Reads never return full bank account numbers, routing numbers or tax ids. Bank and tax numbers you send to create_contact or add_bank_account are write-only.