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

# MCP installation

> Connect Claude Desktop, Codex, or any stdio MCP client to Kettio.

The Kettio MCP server gives an AI client tools for working with brand assets: finding local
files, reading brand context, generating and editing images, removing backgrounds, and opening
previews.

> [!NOTE]
>
> The server includes `rank_assets`, which scores local files directly — an MCP client does not
> need to touch the REST API to rank creative. See [Set up your agent](https://docs.kettio.com/quickstart/agent-setup.md)
> for the fastest path.

## Requirements

* Node.js 18 or newer
* A Professional or API-enabled Kettio account for ranking
* A Kettio API key from [Dashboard → API Keys](https://kettio.com/dashboard?section=api-keys)

## Connect your client

The server is distributed as a hosted tarball, so `npx` fetches it directly — there is nothing
to clone and nothing to build.

> [tab] Claude Code
>
> ```bash theme={null}
> claude mcp add kettio \
>   --transport stdio \
>   -e KETTIO_API_URL=https://kettio.com \
>   -e KETTIO_API_KEY=your-api-key-here \
>   -- npx -y --package=https://kettio.com/downloads/kettio-mcp-server-3.0.0.tgz kettio-mcp
> ```
>
> Run `claude mcp list` and confirm `kettio` is connected.

> [tab] Codex
>
> ```bash theme={null}
> codex mcp add kettio \
>   --env KETTIO_API_URL=https://kettio.com \
>   --env KETTIO_API_KEY=your-api-key-here \
>   -- npx -y --package=https://kettio.com/downloads/kettio-mcp-server-3.0.0.tgz kettio-mcp
> ```

> [tab] Claude Desktop
>
> Add to your Claude Desktop config. On macOS that is
> `~/Library/Application Support/Claude/claude_desktop_config.json`:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "kettio": {
>       "command": "npx",
>       "args": [
>         "-y",
>         "--package=https://kettio.com/downloads/kettio-mcp-server-3.0.0.tgz",
>         "kettio-mcp"
>       ],
>       "env": {
>         "KETTIO_API_URL": "https://kettio.com",
>         "KETTIO_API_KEY": "your-api-key-here"
>       }
>     }
>   }
> }
> ```

> [tab] Other clients
>
> Configure a stdio server with this command and two environment variables:
>
> ```bash theme={null}
> npx -y --package=https://kettio.com/downloads/kettio-mcp-server-3.0.0.tgz kettio-mcp
> ```
>
> ```bash theme={null}
> KETTIO_API_URL=https://kettio.com
> KETTIO_API_KEY=your-api-key-here
> ```

## Verify the setup

Restart your MCP client after saving the configuration, then ask:

> What Kettio tools do you have?

You should see `rank_assets`, `rank_ad_batch`, `get_rank_run`, and `list_audiences`. Full schemas
are in the [tool reference](https://docs.kettio.com/mcp/tools.md).

> [!WARNING]
>
> Kettio displays a new key only once. Do not commit it to your repository or paste it into public
> issue threads. If you lose it, create a replacement from
> [Dashboard → API Keys](https://kettio.com/dashboard?section=api-keys).

## How it fits together

```mermaid theme={null}
flowchart TD
    A[Agent<br/>Claude Code · Codex · Desktop] -->|"Rank the ads in public/ads/"| B[MCP server]
    B -->|reads local files| C[Your repo<br/>public/ads/]
    B -->|uploads + scores| D[Kettio API]
    D -->|scores · confidence · rationale| B
    B -->|ranked result| A
```

## Next

> [card] [Set up your agent](https://docs.kettio.com/quickstart/agent-setup.md)
>
> End-to-end install, plus the rules worth giving the agent.

> [card] [Tool reference](https://docs.kettio.com/mcp/tools.md)
>
> Every tool and its parameters.


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