# MCP endpoint (/docs/developers/mcp)

Eight tools at /api/mcp that let any AI app price bills, make pay links and follow orders, with a card that renders in the chat. It never holds keys.

```text
https://todokupay.xyz/api/mcp
```

Streamable HTTP, stateless (a fresh server per request), JSON responses, CORS open. Server name `todoku`, title "Todoku", with the Todoku icon at 512 and 192 pixels.

<Diagram name="mcp" alt="Sequence: a person asks an AI app for airtime, the app calls quote, gets a pay link and card, the person pays in their wallet, the app polls order_status until Delivered; then my_orders returns 401, the person signs in with their wallet, and the app retries with a token" />

## Tools [#tools]

| Tool | Inputs | Returns | Sign-in |
| --- | --- | --- | --- |
| `list_services` | `kind?`, `serviceId?` | Services, minimums, and plans for one service (up to 60) | No |
| `verify_recipient` | `serviceId`, `recipient`, `meterType?`, `planCode?` | Masked holder name, can pay, minimum, owed, due date, bouquet, renewal price | No |
| `quote` | `serviceId`, `recipient?`, `amountNaira?`, `planCode?`, `meterType?`, `subscriptionType?`, `quantity?`, `contactPhone?`, `confirmRepeat?`, `savedRecipientId?`, `note?`, `payer?`, `asset?` | Without `payer`: a **pay link** open 72 hours, with the card. With `payer`: the **unsigned transactions** for that wallet to sign within about a minute | Only with `savedRecipientId` |
| `order_status` | `orderId?` or `payLinkId?` | Where it stands, with transaction links and the card. Never a token or PIN | No |
| `update_bill` | `payLinkId`, `editKey`, `amountNaira?`, `recipient?`, `planCode?`, `note?` | A replaced link. Called by the card only | Card's edit key |
| `cancel_bill` | `payLinkId`, `editKey?` | The link, cancelled | Edit key, or the signed-in person who asked |
| `my_orders` | `limit?` (up to 20), `filter?` | Your latest orders | Yes |
| `my_recipients` | none | Your saved numbers, last digits only | Yes |

Personal tools answer HTTP **401** with a `WWW-Authenticate` header pointing at Todoku's resource metadata, which starts the AI app's sign-in ([AI app sign-in](/docs/developers/oauth)). Public tools never ask.

## The card [#the-card]

`quote`, `order_status` and `cancel_bill` carry an MCP Apps card: the resource `ui://todoku/bill-card-v1.html` (`text/html;profile=mcp-app`), linked through `_meta.ui.resourceUri` and the older aliases. It shows the biller's logo, the number's last digits, the amount, the note, a QR of the pay link, **Open to pay**, **Copy link**, **Edit** and **Cancel**, then polls `order_status` (every 6 seconds for 3 minutes, every 15 seconds to 20 minutes, every 45 seconds to 2 hours) until **Delivered** with **View receipt**, or **Refunded**. Apps without cards get the same facts as text.

The edit key that lets the card change its own link is returned in the result's `_meta`, never in the text the model reads.

## Limits [#limits]

| | |
| --- | --- |
| Per IP | 1,500 requests a minute before anything runs |
| Per caller | 300 a minute (or 120 per signed-in wallet); status checks have their own 600 |
| `verify_recipient`, `quote` | 10 a minute per caller, 60 a minute in all |
| Quotes for one named payer | 2 a minute |
| Off switch | `surface:mcp` stops the whole endpoint (503) |

## It can't spend [#it-cant-spend]

Todoku holds no user keys. A pay link is paid by a person in their own wallet; unsigned transactions are signed by the wallet named as `payer`. The sign-in gives an app your orders and saved numbers, never the power to pay.