> ## Documentation Index
> Fetch the complete documentation index at: https://docs.minisend.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect your agent with MCP

> Add the Minisend MCP server and let your coding agent quote payouts, create orders, collect M-Pesa payments, and provision wallets directly.

The Minisend MCP server gives your coding agent tools it can call against your account. Instead of writing the request yourself, you can say "pay 5,000 KES to 0712345678 on M-Pesa" and the agent quotes it, validates the recipient, and creates the order.

It also answers questions about the API. The knowledge tools work without a key, so an agent can learn the recipient rules and webhook behaviour before you have provisioned anything.

## Add it

<CodeGroup>
  ```bash Claude Code theme={null}
  claude mcp add --transport http minisend https://mcp.minisend.xyz/mcp \
    --header "Authorization: Bearer ms_live_..."
  ```

  ```json Cursor, VS Code, Windsurf theme={null}
  {
    "mcpServers": {
      "minisend": {
        "url": "https://mcp.minisend.xyz/mcp",
        "headers": {
          "Authorization": "Bearer ms_live_..."
        }
      }
    }
  }
  ```
</CodeGroup>

That is the whole install. Nothing to download, nothing to keep up to date.

Get your key from the dashboard under [API keys](/dashboard/api-keys).

### Wallet API tools

The Wallet API uses a separate key namespace, so it takes a second header. Add it only if you use that product.

<CodeGroup>
  ```bash Claude Code theme={null}
  claude mcp add --transport http minisend https://mcp.minisend.xyz/mcp \
    --header "Authorization: Bearer ms_live_..." \
    --header "X-Minisend-Wallet-Key: wsk_live_..."
  ```

  ```json Cursor, VS Code, Windsurf theme={null}
  {
    "mcpServers": {
      "minisend": {
        "url": "https://mcp.minisend.xyz/mcp",
        "headers": {
          "Authorization": "Bearer ms_live_...",
          "X-Minisend-Wallet-Key": "wsk_live_..."
        }
      }
    }
  }
  ```
</CodeGroup>

A `ms_live_` key will not work on the Wallet API, and a `wsk_live_` key will not work anywhere else.

## What your agent can do

| Product    | Tools                                                                                                                                     |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Off-ramp   | `offramp_quote`, `offramp_validate_account`, `offramp_create_order`, `offramp_submit_deposit`, `offramp_get_order`, `offramp_list_orders` |
| Onramp     | `onramp_quote`, `onramp_create_order`, `onramp_get_order`, `onramp_list_orders`                                                           |
| Checkout   | `checkout_create_session`, `checkout_get_session`                                                                                         |
| Wallet API | `wallet_create`, `wallet_get`, `wallet_get_by_ref`, `wallet_balance`, `wallet_deposits`, `wallet_list_deposits`                           |
| Account    | `minisend_whoami`                                                                                                                         |

### Knowledge tools

These answer from data built into the server. No key, no network call, no rate limit.

| Tool                       | What it answers                                                                                                                                |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `minisend_api_schema`      | The exact request and response fields for an endpoint, including which headers change its behaviour                                            |
| `minisend_recipient_rules` | Required recipient fields for a currency and payout method, accepted phone formats, exact mobile network names, and the per-transaction limits |
| `minisend_explain_error`   | What a status code and error message actually mean, and whether retrying can help                                                              |
| `minisend_webhook_spec`    | Event names, the signature scheme, and the ordering rules a naive handler gets wrong                                                           |

They exist because these are the questions where a wrong answer produces a failed payout rather than a confused reader. Recipient fields differ by both currency and method, and mobile network names are case-sensitive exact strings.

## You only see the tools your key can use

The server asks the API what your key is authorised for and lists tools accordingly. If your account does not have off-ramp access yet, no off-ramp tools appear, so your agent never burns a turn on a call that was always going to fail. Wallet tools appear only when you supply the wallet key header.

If you expected payment tools and only see knowledge tools, ask your agent to run `minisend_diagnose_key`. The usual cause is a key that was truncated on the way into your config, or a placeholder that was never replaced.

After changing headers, restart your client. Tool lists are read once when the connection opens.

## These tools move real money

<Warning>
  There is no sandbox. Every call goes to production. `offramp_create_order` creates a real payout order, and `onramp_create_order` sends a real payment prompt to a real phone.
</Warning>

MCP clients ask for approval before each tool call. Leave that on. Read what the agent is about to do, particularly the amount and the recipient, before approving.

Two behaviours worth knowing, because they are the ones an agent can get wrong:

Creating an off-ramp order does not pay anyone. The flow is non-custodial, so you send the USDC yourself, and for KES, GHS, and UGX you then report the transaction hash. The order response tells you which path applies.

Creating an onramp order is one-shot. The prompt fires immediately, and if the customer cancels it, the order fails. Create a new order rather than retrying the same one, which is what stops a customer being charged twice.

## Your keys

Keys are read from the request headers, passed to the Minisend API, and discarded. Nothing is stored, cached, or written to logs. The server holds no credentials of its own.

Standard rate limits apply and are counted against your account, not against the MCP server, so other users cannot consume your budget.

## MCP or the skill?

Both, if you like. They solve different problems.

The [agent skill](/ai-agent-skill) teaches your agent the API offline so it writes correct integration code. Nothing is called, and it works with no key and no network.

The MCP server lets your agent operate your account live. Use it to try a payout before writing any code, to check an order's status while debugging, or to run one-off operations without building a script.

<Card title="API keys" icon="key-round" href="/dashboard/api-keys">
  Generate the key you will paste into the header.
</Card>
