# Sanaa MCP server

Lets an AI coding tool (Claude, Claude Code, Cursor, ChatGPT) set up and manage your Sanaa account in plain language. Platform deployment only.

- **URL:** `POST https://<platform-host>/api/mcp` (stateless, JSON replies)
- **Auth:** `Authorization: Bearer sk_test_...` (or `sk_live_...`). The same keys, scopes and test/live separation as the REST API. A test key only sees and changes test tenants.

## Add it

Claude Code:

```
claude mcp add --transport http sanaa https://<platform-host>/api/mcp --header "Authorization: Bearer sk_test_..."
```

Cursor (`.cursor/mcp.json`):

```json
{ "mcpServers": { "sanaa": { "url": "https://<platform-host>/api/mcp", "headers": { "Authorization": "Bearer sk_test_..." } } } }
```

Then ask, for example: "Read the Sanaa integration guide, then implement the booking connector in this codebase, register it with Sanaa, and run the connector test until it passes."

## Tools

| Tool | Scope | Changes data |
|---|---|---|
| `get_integration_guide` | `tenants:read` | no |
| `get_connector`, `set_connector`, `run_connector_test` | `connector:write` | set only |
| `list_tenants`, `get_tenant` | `tenants:read` | no |
| `create_tenant`, `update_tenant_settings`, `provision_tenant` | `tenants:write` | yes |
| `search_phone_numbers` | `tenants:read` | no |
| `assign_phone_number` | `tenants:write` | yes (costs money: live keys, live tenants, limited per organization) |
| `list_calls`, `get_call` | `calls:read` (transcripts need `calls:transcripts`) | no |
| `get_usage` | `usage:read` | no |
| `list_webhook_deliveries` | `webhooks:write` | no |

A key only sees the tools its scopes allow. Every tool calls the same code as the REST endpoint of the same name.

Not in the first version: API key management, webhook endpoint creation (REST API only).

## Being listed in a directory

Adding the server by URL needs no approval. Listing in Claude's or ChatGPT's connector directories is a separate review (public https endpoint, privacy policy, public docs, working login); not started.
