# MCP server

The Authtext MCP server is at `https://mcp.authtext.com.au/mcp` (Streamable HTTP). Sign in with an agent key or a test key in the `Authorization` header.

## Claude Code

```bash
claude mcp add --transport http authtext https://mcp.authtext.com.au/mcp \
  --header "Authorization: Bearer at_agent_..."
```

## Cursor, VS Code and other clients

```json
{
  "mcpServers": {
    "authtext": {
      "url": "https://mcp.authtext.com.au/mcp",
      "headers": { "Authorization": "Bearer at_agent_..." }
    }
  }
}
```

Keep the key out of files you commit: most clients can read it from an environment variable.

## Tools

| Tool | What it does |
|---|---|
| `send_verification` | Start a verification: send a one-time code to a mobile number. |
| `check_verification` | Check the code the user typed. |
| `get_verification` | Status, delivery state and timeline of one verification. Use it to find out why one failed. |
| `list_verifications` | Recent verifications, newest first, with filters. |
| `get_usage` | Counts by channel and status, and billable units, for a period. |
| `search_docs` | Search these docs and get the matching pages back as markdown. Needs no key. |

## What the server will and will not do

- It accepts `at_agent_` and `at_test_` keys. It refuses `at_live_` keys, because a live key has no daily cap. To let an agent send real messages, the account owner turns live sending on for an agent key, with a daily cap: see [agent keys](agent-keys.md).
- With a key in test mode every tool works, nothing is sent, nothing is billed and the code is always `000000`.
- No tool returns a code, a full phone number or a key.
- Every tool call that uses a key is written to the account's audit log with the key, the tool and the name of the client that made it.
- It cannot create keys, change billing or change account settings. Those are for the account owner in the dashboard.
- `search_docs` works without a key.

The server is a thin layer over the public API and follows the same rules. Anything it does can also be done with the [API](quickstart.md).
