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

# ankra mcp

> Connect a coding agent to the Ankra MCP server

## ankra mcp

Connect a coding agent to the Ankra MCP server.

'ankra mcp connect' is the guided setup. To manage the external MCP servers your
organisation's agent runs may call, see 'ankra org mcp-servers'.

## ankra mcp connect

Register the Ankra MCP server with Claude Code, Cursor or Codex.

This creates a personal API token that only the MCP server accepts, read-only
unless you pass `--write`, pinned to the project you are acting in (`--project`
chooses another) and expiring in 90 days. Running connect again replaces it and
revokes the old one, which is also how to renew it.

The token is never printed. It is stored in \~/.ankra/mcp/\<client>.json, readable
only by you, and is not written into the agent's config:

* Claude Code gets a headers helper, so it fetches the token when it needs it.
* Cursor and Codex read ANKRA\_MCP\_TOKEN, so add this to your shell profile:
  export ANKRA\_MCP\_TOKEN="\$(ankra mcp token `--client` cursor)"

Reads are the place to start; give an agent `--write` when you want it to act,
for example to open a fix pull request. Writes still ask for confirmation.

```bash theme={null}
ankra mcp connect --client <claude-code|cursor|codex> [flags]
```

**Examples**

```bash theme={null}
ankra mcp connect --client claude-code
ankra mcp connect --client cursor --project platform-team
ankra mcp connect --client codex --write --expires-days 30 --skills
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `--client` | | Client: claude-code, cursor, codex (required) |
| `--expires-days` | `90` | Days until the token expires |
| `-o`, `--output` | | Output format: json or yaml (default: human-readable) |
| `--skills` | `false` | Also install the Ankra skills for this client, without asking |
| `--write` | `false` | Also allow the mutating tools (mcp:write) |

## ankra mcp token

Print the token 'ankra mcp connect' stored for a client, for use in
export ANKRA\_MCP\_TOKEN="\$(ankra mcp token `--client` cursor)". It refuses to print
to a terminal, so the token stays out of your scrollback.

```bash theme={null}
ankra mcp token --client <client> [flags]
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `--client` | | Client: claude-code, cursor, codex (required) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.