> ## 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.

# APIXO MCP

> Help AI coding tools integrate APIXO into your codebase

APIXO MCP is a local [Model Context Protocol](https://modelcontextprotocol.io) server that plugs APIXO into any MCP-compatible AI client. It exposes APIXO's full model catalog and per-model parameter schemas to your agent, so when you ask "add APIXO to my project", the agent can write correct integration code — without you reading docs or guessing field names.

It works in any client that speaks MCP. Common ones:

* **Cursor** (config file: `~/.cursor/mcp.json`)
* **Claude Code** (CLI: `claude mcp add ...`)
* **Codex CLI** (CLI: `codex mcp add ...`)
* **Claude Desktop**, **Windsurf**, **Cline**, **Continue**, **Zed**, and other MCP clients (any client that loads stdio MCP servers from JSON config)

The server ships as the `@apixo/mcp-server` npm package and runs locally on your machine. It authenticates with your APIXO API key and talks to the same endpoints documented under [Generation APIs](/models) and the [LLM Gateway](/llm).

## What you can do

<CardGroup cols={3}>
  <Card title="Scaffold APIXO into your codebase" icon="code">
    Ask your agent to add a model to your project. It reads the model schema through MCP and writes parameter-accurate calls into your existing files.
  </Card>

  <Card title="Discover models and schemas" icon="magnifying-glass">
    Your agent can browse APIXO's model catalog and fetch any model's full input schema on demand — no copy-pasting from the docs.
  </Card>

  <Card title="Run and inspect tasks from chat" icon="sparkles">
    The same tools also let the agent submit ad-hoc generation tasks and check your account balance directly from the conversation.
  </Card>
</CardGroup>

Most of the value is in the first capability: APIXO has many models with very different input parameters, and MCP gives the agent a reliable source of truth so the code it writes against APIXO compiles and runs on the first try.

## Tools exposed by the server

`@apixo/mcp-server` registers the following tools. Most clients show them under an "apixo" namespace.

| Tool                     | What it does                                                                                                                                                        |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `apixo_list_models`      | List APIXO models from the published schema index. Supports filtering by `category` (image, video, audio, text) and `integration_type` (`task_api`, `llm_gateway`). |
| `apixo_get_model_schema` | Fetch one model's full schema by `model_id` or slug, including all input parameters.                                                                                |
| `apixo_generate_task`    | Submit a generation task to `POST /api/v1/generateTask/{model}` with model-specific `input`. Supports `async` and `callback` request types.                         |
| `apixo_get_task_status`  | Fetch a task's status and result from `GET /api/v1/statusTask/{model}?taskId=...`.                                                                                  |
| `apixo_get_balance`      | Read the current balance for the API key the server is configured with.                                                                                             |

<Tip>
  Together, `apixo_list_models` + `apixo_get_model_schema` + `apixo_generate_task` + `apixo_get_task_status` cover the full Generation task flow described in [How APIXO Works](/concepts/how-apixo-works).
</Tip>

## When to use MCP

| Use MCP when…                                                                        | You probably don't need MCP when…                                                                                           |
| ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| You're integrating APIXO into a project with an AI coding tool open                  | Your integration is already shipped and stable on the [REST APIs](/api-reference/generate-task)                             |
| You're evaluating multiple models and want the agent to write the glue code for each | You only call APIXO from a backend service that humans maintain                                                             |
| You want a chat-driven way to submit tasks or check account state while developing   | You only use APIXO's [LLM Gateway](/llm) — point your existing Claude / OpenAI / Gemini SDK at the gateway base URL instead |

## Get started

<CardGroup cols={2}>
  <Card title="Install APIXO MCP" icon="download" href="/integrations/mcp/installation">
    Step-by-step setup for Cursor, Claude Code, Codex, and other MCP clients on Windows, macOS, and Linux.
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/integrations/mcp/troubleshooting">
    Fix common issues: `codex` not on PATH, API key not picked up, `npx` failures, missing tools in the client.
  </Card>
</CardGroup>
