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

# Connect Claude Code, Claude Desktop or Codex

> Use an API key to connect Claude Code, Claude Desktop, Codex, Cursor or another MCP client to your ZynfoAI workspace.

Tools that run on your computer connect with an **API key**. You need to be an **owner or admin**, and
the workspace must be on the **Pro plan or the 7-day trial**.

The MCP server address is:

```
https://app.zynfo.ai/api/mcp
```

## Step 1: Create a key

1. Go to **Settings → API keys** and click **New key**.
2. Name it after the tool, such as "Claude Code".
3. Tick what the tool may do. For a first try, pick **Search the knowledge base**, **Read tickets** and
   **Read plan usage**.
4. Click **Create key** and copy the key. It starts with `zk_live_`.

You see the key only once. Store it like a password. See [API keys](/api-and-mcp/api-keys).

## Claude Code

In your terminal, replace `YOUR_KEY` with the key and run:

```bash theme={null}
claude mcp add --transport http zynfoai https://app.zynfo.ai/api/mcp --header "Authorization: Bearer YOUR_KEY"
```

Add `--scope user` after `claude mcp add` to make ZynfoAI available in every project. Without it, it's
added for the current project only.

Check that it connected:

```bash theme={null}
claude mcp list
```

`zynfoai` should show as connected. Start `claude`, or open a new session if one was already running,
and ask, for example, "Show my open ZynfoAI tickets". Inside Claude Code, `/mcp` lists the servers and
their tools.

To remove it, run `claude mcp remove zynfoai`.

## Claude Desktop

Claude Desktop reads its servers from a settings file, and it connects to a web address through a small
helper called `mcp-remote`. You need [Node.js](https://nodejs.org) installed.

1. In Claude Desktop, open **Settings → Developer** and click **Edit Config**. This opens
   `claude_desktop_config.json`.
2. Add a `zynfoai` entry under `mcpServers`. Keep what's already in the file, and keep it valid JSON:

```json theme={null}
{
  "mcpServers": {
    "zynfoai": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://app.zynfo.ai/api/mcp",
        "--header",
        "Authorization:${ZYNFO_AUTH}"
      ],
      "env": {
        "ZYNFO_AUTH": "Bearer YOUR_KEY"
      }
    }
  }
}
```

There is no space after `Authorization:`. The space is inside the `ZYNFO_AUTH` value.

3. Quit Claude Desktop completely and open it again. The app reads this file only when it starts.
4. In a new chat, look for ZynfoAI in the tools menu, and ask your question.

If Node was installed with a version manager such as `nvm`, Claude Desktop may not find `npx`. Replace
`"command": "npx"` with the full path to it, which `which npx` prints in a terminal, and add
`"PATH": "<the folder that path is in>:/usr/local/bin:/usr/bin:/bin"` to `env`.

If the server doesn't appear, open **Settings → Developer**, click `zynfoai` and read its log.

## Codex

Codex can connect to a remote MCP server with a bearer token. Put the key in an environment variable,
then add the server to `~/.codex/config.toml`:

```toml theme={null}
[mcp_servers.zynfoai]
url = "https://app.zynfo.ai/api/mcp"
bearer_token_env_var = "ZYNFOAI_API_KEY"
```

```bash theme={null}
export ZYNFOAI_API_KEY=YOUR_KEY
```

Start Codex from the same terminal. Codex changes its settings often, so check its current MCP
documentation if a name has changed.

## Other tools

Cursor, VS Code and other tools that support remote MCP servers connect the same way. Give them the
server address and an `Authorization: Bearer YOUR_KEY` header, with the key you created. If the tool
asks for a transport, choose **Streamable HTTP**.

## If something goes wrong

| What you see | What it means |
| - | - |
| `401` or "not valid" | The key is wrong, expired or revoked. Create a new key. |
| `403` with `pro_plan_required` | The workspace isn't on the Pro plan or the trial. |
| `403` with `insufficient_scope` | The key doesn't have the permission for that tool. Create a key with it ticked. |
| `429` | The key made more than 60 requests in a minute. Wait a moment. |
| The tool lists no ZynfoAI tools | Start a new session. Tools load when a session starts. |

## Related topics

* [Connect AI agents to ZynfoAI](/api-and-mcp/overview)
* [MCP tools](/api-and-mcp/mcp-tools)
* [REST API](/api-and-mcp/rest-api)


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