# Quickstart with Cursor and Codex

> Configuration snippets for adding the AkaPhone MCP server to Cursor, OpenAI Codex and other MCP clients.

Source: https://akaphone-docs.pages.dev/quickstart/cursor-and-codex/

The same `akaphone-mcp` server (version 1.0.0 or later) works in any MCP client that can launch a stdio server. It needs Node.js 20 or newer. Get a `ak_live_…` key from **API keys** in the [dashboard](https://akaphone.abhgnx-417.workers.dev) first, and a model key for tasks (see [Model keys](https://akaphone-docs.pages.dev/guides/model-keys/)).

## Cursor

Add the server to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` in a project:

```json title="~/.cursor/mcp.json"
{
  "mcpServers": {
    "akaphone": {
      "command": "npx",
      "args": ["-y", "akaphone-mcp"],
      "env": {
        "AKAPHONE_API_KEY": "ak_live_...",
        "MODEL_API_KEY": "AIza..."
      }
    }
  }
}
```

Reload Cursor, then check the server is enabled in Cursor's MCP settings. Ask the agent: *“Create a phone and tell me what Android version it runs.”*

> **Do not commit keys**
>
> If you use a project-level `.cursor/mcp.json`, add it to `.gitignore`. It contains your AkaPhone key and your model key.

## Codex

Add the server to `~/.codex/config.toml`:

```toml title="~/.codex/config.toml"
[mcp_servers.akaphone]
command = "npx"
args = ["-y", "akaphone-mcp"]

[mcp_servers.akaphone.env]
AKAPHONE_API_KEY = "ak_live_..."
MODEL_API_KEY = "AIza..."
```

Start a new Codex session; the AkaPhone tools are available to it.

## Any other MCP client

Run `npx -y akaphone-mcp` as a stdio server with these environment variables:

| Variable | Required | Notes |
|---|---|---|
| `AKAPHONE_API_KEY` | yes | Your `ak_live_…` key. |
| `AKAPHONE_API_URL` | no | Defaults to `https://akaphone.abhgnx-417.workers.dev`. |
| `MODEL_API_KEY` | for tasks | Sent with each task as `X-Model-Key`; never stored by AkaPhone. |
| `MODEL_PROVIDER` | no | `gemini` (default), `anthropic` or `openai`. Any other value stops the server at startup with a clear error. |

## Next

- [MCP tools reference](https://akaphone-docs.pages.dev/mcp/tools/): every tool, its arguments and what it returns.
- [Tasks](https://akaphone-docs.pages.dev/concepts/tasks/): how ARTEMIS runs a task, and choosing `flash` or `pro`.
- [Claude Code quickstart](https://akaphone-docs.pages.dev/quickstart/claude-code/#troubleshooting): troubleshooting applies to every client.
