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

# Install and Connect APIXO MCP

> Install APIXO MCP in Cursor, Claude Code, Codex, or another MCP client, then connect through browser sign-in and device approval.

This guide uses the normal local setup path: **install MCP → call `apixo_setup` → sign in and approve in your browser → call `apixo_finish_setup` → use APIXO tools**. You do not need to create, copy, or paste an API key for this flow.

## Before you start

* Node.js `>= 20` and npm `>= 9` (the server runs with `npx`)
* An MCP-compatible client, such as [Cursor](https://www.cursor.com), [Claude Code](https://docs.claude.com/en/docs/agents-and-tools/claude-code/overview), [Codex CLI](https://github.com/openai/codex), Claude Desktop, Windsurf, Cline, Continue, or Zed
* A browser where you can sign in to your APIXO account and approve the device

<Info>
  The package is `@apixo/mcp-server`. `npx -y @apixo/mcp-server` downloads the current release when needed; you do not install it globally.
</Info>

## Step 1: Register the MCP server

Register the server **without** `APIXO_API_KEY`. The browser setup in the next step creates and stores the credential for this installation.

<Tabs>
  <Tab title="Cursor">
    Open or create `~/.cursor/mcp.json` (Windows: `%USERPROFILE%\.cursor\mcp.json`) and add an entry under `mcpServers`:

    ```json theme={null}
    {
      "mcpServers": {
        "apixo": {
          "command": "npx",
          "args": ["-y", "@apixo/mcp-server"],
          "env": {
            "APIXO_MCP_CLIENT_TYPE": "cursor"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Claude Code">
    Run this in a terminal. The trailing `--` separates the Claude Code command from the MCP server command:

    ```bash theme={null}
    claude mcp add --env APIXO_MCP_CLIENT_TYPE=claudeCli apixo -- npx -y @apixo/mcp-server
    ```

    Claude Code defaults to **local** scope. Add `--scope user` to make the server available across your projects, or `--scope project` for a committable project configuration.
  </Tab>

  <Tab title="Codex CLI">
    Run this in a terminal:

    ```bash theme={null}
    codex mcp add apixo -- npx -y @apixo/mcp-server
    ```

    You should see a message similar to `Added global MCP server 'apixo'.`

    <img src="https://mintcdn.com/gravity-5d102d7e/20MVoji7DqRucvXD/images/integrations/mcp/installation/windows/step-02-add-apixo-mcp.png?fit=max&auto=format&n=20MVoji7DqRucvXD&q=85&s=b2534a31ff803d9ec119459bfedc5f54" alt="Register APIXO MCP in Codex" width="857" height="274" data-path="images/integrations/mcp/installation/windows/step-02-add-apixo-mcp.png" />

    If `codex` is not recognized, see [CLI not found on PATH](/docs/integrations/mcp/troubleshooting#cli-not-found-on-path).
  </Tab>

  <Tab title="Other MCP clients">
    Most MCP clients load stdio servers from a JSON configuration with this shape. Add the `apixo` entry under the `mcpServers` object required by your client:

    ```json theme={null}
    {
      "mcpServers": {
        "apixo": {
          "command": "npx",
          "args": ["-y", "@apixo/mcp-server"],
          "env": {
            "APIXO_MCP_CLIENT_TYPE": "generic"
          }
        }
      }
    }
    ```

    Common config locations:

    | Client | Config file |
    | - | - |
    | Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
    | Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
    | Windsurf | `~/.codeium/windsurf/mcp_config.json` |
    | Cline / Continue / Zed | Configure from each client's MCP settings UI |

    Use your client's documentation if its config location differs. `APIXO_MCP_CLIENT_TYPE` is an optional label that makes this device easier to recognize in the APIXO Dashboard; use a short identifier for your client or omit the `env` block to use `generic`.
  </Tab>
</Tabs>

## Step 2: Start browser setup

Reload or restart your MCP client so it launches the new server. In a new conversation, ask the client to call the setup tool:

```text theme={null}
Use the apixo MCP tool apixo_setup to connect this installation to my APIXO account. For Codex, set client_type to codexCli.
```

`apixo_setup` opens the verification URL in your browser when possible. If it cannot open a browser, use the `verification_url` returned by the tool.

## Step 3: Sign in and approve the device

In the browser, sign in to APIXO if prompted, review the device approval request, and approve it. Return to the same MCP client conversation after the browser confirms success.

The API key created for this installation is kept in the MCP server's private local credential store. It is not shown in the browser-setup tool response or in your chat.

## Step 4: Finish setup

Ask the client to complete the pending approval:

```text theme={null}
Use the apixo MCP tool apixo_finish_setup now.
```

If the browser approval is still pending, finish it in the browser and call `apixo_finish_setup` again. A successful response reports that the local installation is configured; it does not reveal the credential.

## Step 5: Verify and use the tools

First, check that the MCP registration is present:

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp list
    claude mcp get apixo
    ```
  </Tab>

  <Tab title="Codex CLI">
    ```bash theme={null}
    codex mcp get apixo
    ```

    <img src="https://mintcdn.com/gravity-5d102d7e/20MVoji7DqRucvXD/images/integrations/mcp/installation/windows/step-03-check-apixo-mcp.png?fit=max&auto=format&n=20MVoji7DqRucvXD&q=85&s=32a5e14a326a01d1a74fca9b77286708" alt="Inspect the Codex MCP registration" width="858" height="153" data-path="images/integrations/mcp/installation/windows/step-03-check-apixo-mcp.png" />
  </Tab>

  <Tab title="Other clients">
    Open the client's MCP or Tools settings and confirm that `apixo` is connected. If it does not appear, reload the client once more.
  </Tab>
</Tabs>

Then try one of these prompts:

```text theme={null}
Use only the apixo MCP tools. List the available image models and show the input schema for one model you recommend for a product image.
```

```text theme={null}
Use only the apixo MCP tools. Explain how to submit a batch, reconcile a failed item,
and verify the signed webhook. Do not create any tasks or reveal a webhook secret.
```

This read-only prompt should call `apixo_get_batch_integration_guide`. Review the guide before using `apixo_submit_batch` or `apixo_get_batch_status` in your application.

```text theme={null}
Use only the apixo MCP tools. What is the current balance for this APIXO installation?
```

The returned balance is specific to your account.

<img src="https://mintcdn.com/gravity-5d102d7e/20MVoji7DqRucvXD/images/integrations/mcp/installation/windows/step-04-test-balance.png?fit=max&auto=format&n=20MVoji7DqRucvXD&q=85&s=921370b48c49c219dd14722a0a351e3c" alt="Check the APIXO balance from Codex" width="2553" height="1400" data-path="images/integrations/mcp/installation/windows/step-04-test-balance.png" />

For generation, ask the agent to look up the schema first and put any production API call in your server-side application code. Do not expose an API key in browser-delivered code.

## Revoke a device connection

To formally disconnect an MCP installation, open [Dashboard → API Keys](https://apixo.ai/dashboard/api-keys) and **revoke the device key** whose name follows this format:

```text theme={null}
MCP/{clientType}/{hostLabel}/{installationId}
```

This Dashboard action is the server-side revocation. It prevents that device key from authorizing future API calls. The MCP server's local credential file is only a local copy used by this machine; deleting it is local cleanup, **not** a Dashboard logout or server-side revocation.

After revoking a device key, complete browser setup again to connect a new device key. See [Troubleshooting](/docs/integrations/mcp/troubleshooting) if the client continues to use a stale local credential.

## Advanced: manually supply `APIXO_API_KEY`

Use this only when browser approval is not practical: CI, another browserless environment, or local development debugging. An explicitly configured `APIXO_API_KEY` takes precedence over the browser-created local credential.

For example, a CI-only server configuration can include the secret in its environment:

```json theme={null}
{
  "mcpServers": {
    "apixo": {
      "command": "npx",
      "args": ["-y", "@apixo/mcp-server"],
      "env": {
        "APIXO_API_KEY": "provided-by-your-secret-manager"
      }
    }
  }
}
```

Keep this value in your CI secret manager or local development environment. Do not commit it, put it in a shared project configuration, or paste it into chat.

## Next steps

<CardGroup cols={2}>
  <Card title="What APIXO MCP can do" icon="book-open" href="/docs/integrations/mcp">
    Browse the tool overview and MCP capabilities.
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/docs/integrations/mcp/troubleshooting">
    Fix browser setup, Node.js, and client connection problems.
  </Card>

  <Card title="Generation API reference" icon="sparkles" href="/docs/api-reference/generate-task">
    Learn the REST task flow your application will call in production.
  </Card>

  <Card title="Browse models" icon="grid" href="/docs/models">
    Explore model capabilities and inputs.
  </Card>
</CardGroup>


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