[Works with](https://autarcho.com/works-with/)

# Use Autarcho from an MCP client

For clients that speak the Model Context Protocol, the published server wraps this API: no HTTP code, one environment variable.

[Open the chat](https://chat.autarcho.com) [Make a key first](https://autarcho.com/start/)

## The change

Add the server to your MCP client and set `AUTARCHO_API_KEY`.

```
{
  "mcpServers": {
    "autarcho": {
      "command": "npx",
      "args": ["-y", "autarcho-mcp"],
      "env": {
        "AUTARCHO_API_KEY": "ak_..."
      }
    }
  }
}
```

A key is `ak_` followed by 64 hex characters, made on your own machine; the [start page](https://autarcho.com/start/) covers making one and adding credit. Model ids come from [the catalogue](https://autarcho.com/models/).

## What works

- `list_models`, `get_price`, `chat_completion` and `get_balance`, over stdio.
- A price is read without the key, because the price lookup is public.
- `AUTARCHO_BASE_URL` points it somewhere else, which is useful against a local gateway.

## What to watch

- `max_tokens` defaults to 256 and is capped at 2048, because an MCP client is often a model passing whatever number it saw in a schema, and this bills per token.
- The server has no state: every call is one request, and a conversation is the client resending its messages.
- A tool call that is refused costs nothing, so a client may retry with a different model.

The full list of what is refused, what is charged and what a retry costs is on [the API reference](https://autarcho.com/docs/api/).

[What a request costs](https://autarcho.com/pricing/) [Other clients](https://autarcho.com/works-with/)
