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

> ## Agent Instructions
> For chatbots and coding agents, start at /guides/ai-agents.
> Hosted MCP: POST https://api.robase.dev/mcp (Streamable HTTP). Auth: Authorization: Bearer robe_… or robe_agent_….
> Phase 1 tools: get_pricing, send_otp, verify_otp, get_otp, send_sms, get_sms. No payment or top-up tools.
> Call get_pricing; treat listed:true as marketed markets (NG, GH, KE, ZA, GB, BJ, CI, US). Do not invent countries or delivery percentages.
> Prefer OTP-shaped tests such as "Your Robase test OTP is 123456". Do not send Hello or Good morning as tests. Match errors on error.type.

# AI agents

> Connect Cursor, Claude, ChatGPT, or your own bot to Robase over hosted MCP. Same prepaid API, claim-safe instructions.

Robase exposes a hosted [Model Context Protocol](https://modelcontextprotocol.io) server so a chatbot or coding agent can send OTP and transactional SMS with the same prepaid credits, routing, and antispam ladder as `curl`. Marketing overview: [hosted MCP](https://robase.dev/mcp).

Machine-readable docs: [docs.robase.dev/llms.txt](https://docs.robase.dev/llms.txt). OpenAPI: [`openapi.yaml`](/openapi.yaml).

## Connect

|           |                                                    |
| --------- | -------------------------------------------------- |
| URL       | `https://api.robase.dev/mcp`                       |
| Transport | Streamable HTTP                                    |
| Auth      | `Authorization: Bearer robe_…` (or `robe_agent_…`) |

Create an **Agent** key in [Dashboard → API keys](https://robase.dev/app/api-keys). Same workspace scope as a standard key. Revoke it there to stop every tool call on the next request — there is no auth cache.

In Cursor: Settings → MCP → add the URL and the Bearer header. MCP Inspector works the same way.

Hosts that support tool approval should require approval on `send_otp` and `send_sms` until you turn that off. Both are annotated `destructiveHint: true` in `tools/list`; the four lookup and verify tools are `readOnlyHint: true`, so hosts that read MCP tool annotations gate the right ones by default.

## Tools (Phase 1)

| Tool          | REST                  | Side effect                                   |
| ------------- | --------------------- | --------------------------------------------- |
| `get_pricing` | `GET /v1/pricing`     | None                                          |
| `send_otp`    | `POST /v1/otp/send`   | Spends credits                                |
| `verify_otp`  | `POST /v1/otp/verify` | Consumes an attempt                           |
| `get_otp`     | `GET /v1/otp/{id}`    | None. The code is never returned.             |
| `send_sms`    | `POST /v1/sms/send`   | Spends credits; antispam may block and refund |
| `get_sms`     | `GET /v1/sms/{id}`    | None                                          |

There are **no** payment, top-up, team, KYB upload, webhook CRUD, or admin tools. On `insufficient_credits`, tell a human to top up under [Billing](https://robase.dev/app/billing).

`Idempotency-Key` is set automatically (UUID) on every POST tool if the caller omits it.

Daily credit cap for agent keys is **unlimited by default**, same as REST. A host-side limit of 50–100 credits/day is a reasonable extra control; it is not enforced by Robase in Phase 1.

## Claim-safe rules

* Call `get_pricing`. Treat `listed:true` as marketed markets. The live listed set is **NG, GH, KE, ZA, GB, BJ, CI, US**.
* Do not invent delivery percentages or extra countries.
* Prefer OTP-shaped tests: `Your Robase test OTP is 123456`. Do not send `Hello` or `Good morning` — those may be blocked and refunded.
* Match failures on `error.type`. Handle `insufficient_credits`, `account_temporarily_restricted`, `kyc_required`, and `sms.blocked`.

## Sample system prompt

Copy this into your agent. It matches the MCP `instructions` field.

```
You have Robase tools for prepaid SMS OTP and transactional SMS.

Call get_pricing for destinations. Only listed:true markets are marketed (NG, GH, KE, ZA, GB, BJ, CI, US). Do not invent countries or delivery percentages.

Prefer transactional or OTP-shaped test bodies, for example: "Your Robase test OTP is 123456". Do not send greetings such as "Hello" or "Good morning".

Match errors on error.type. On insufficient_credits, ask a human to top up in the dashboard — you have no payment tool. On account_temporarily_restricted or kyc_required, explain the hold; do not retry sends. sms.blocked means antispam refunded the credit.

Never paste API keys into chat.
```

## Errors

The tools return the same JSON envelope as REST, with `isError: true` when the API failed:

```json theme={null}
{
  "error": {
    "type": "insufficient_credits",
    "message": "insufficient credit balance"
  }
}
```

See [Errors](/concepts/errors).
