Skip to content
RU

Claude Desktop

Connect Claude Desktop to Mixen — pay from your balance in roubles, with the Anthropic Messages protocol: tool calling, streaming, and prompt caching.

Claude Desktop is Anthropic’s application with three tabs: Chat, Cowork, and Code. A custom API endpoint is configured not through environment variables (the app reads neither ANTHROPIC_BASE_URL nor settings.json — unlike the CLI, see Claude Code) but through its built-in third-party inference configuration. Mixen implements the Anthropic Messages protocol, so it plugs in as such a provider; development sessions (the Code tab) are what gets routed through the gateway. An Anthropic account is not required — the steps are the same signed in or not.

  1. Open Help → Troubleshooting → Enable Developer Mode — the app restarts with a Developer menu.
  2. Open Developer → Configure Third-Party Inference…
  3. In the Connection section, set Inference provider to Gateway.
  4. Fill in the Gateway credentials card:
Field Value
Gateway base URL https://api.mixen.ai
Gateway API key your mxn-… key from the dashboard
Credential kind Static API key
Gateway auth scheme Bearer (default) or x-api-key — Mixen accepts both
  1. Press Apply Changes (older builds call it Apply locally) and restart the app fully: Quit from the menu, not just closing the window.

Key points:

  • The base URL carries no /v1 suffix and no trailing slash: the app appends /v1/messages to the request path itself.
  • The gateway requirements are POST /v1/messages with streaming and tool use; Mixen supports all of it (the same surface Claude Code uses).
  • GET /v1/models for model auto-discovery is optional. If the model picker is empty or missing what you need — set the models explicitly, by full IDs from the catalog: anthropic/claude-sonnet-5.5 and so on. Bare aliases like sonnet do not resolve without discovery.

With a gateway active, the app runs sessions locally only: the environment picker offers no SSH hosts or Anthropic-hosted cloud environments, and Remote Control is unavailable. If you need the agent on a remote machine — run the CLI there with the variables from the Claude Code guide.

The Gateway (Connection) and the MCP server are two independent channels, not duplicates: the former is the inference itself (session models over our /v1/messages), the latter is tools inside any session. Setup options:

Connection MCP What you get
Mixen Mixen everything on one balance: sessions on our models + tools (recommended)
Anthropic subscription Mixen Anthropic pays for the Claude sessions, while mixen_chat/images/balance are ours
Mixen — sessions on our models only, no tools

The Code tab (and Cowork) can attach MCP tools right from the Third-Party Inference configuration: Developer → Configure Third-Party Inference… → Connectors → MCP servers → Add MCP servers → Blank (a manual server from scratch; the other list items are presets). Add the Mixen MCP server there and the agent in a session gets tools without a single line of integration code:

Field Value
Name mixen
Transport Streamable HTTP (or simply HTTP; not STDIO and not legacy SSE)
URL https://api.mixen.ai/v1/mcp
Header Authorization = Bearer mxn-… (the same key as the gateway)

Filling the Blank form: in the Headers section the add button inserts a placeholder row named X-Tenant-ID — the name is editable: wipe it and type Authorization, with Bearer mxn-… as the value. Mixen does not need X-Tenant-ID itself. Do not enable the OAuth toggle below — Mixen uses a static key, not an OIDC flow.

Transport — Streamable HTTP. The main gain under a Claude-only picker: the agent in a session calls any catalog model via mixen_chat (the model is a per-call parameter) and generates images via mixen_generate_image — the “expensive lead + cheap workers” pattern is described in the MCP guide.

The full list of tools and billing — in the MCP guide.

The key needs the matching scopes (chat for text, images for pictures and so on) — MCP calls pass the same gates as regular API requests.

The gateway exposes the same Mixen surface Claude Code uses (the Anthropic Messages protocol):

Feature Status
Text, system, images (vision models) ✅
Tools / tool use ✅
Streaming SSE (stream: true) ✅
POST /v1/messages/count_tokens ✅ (an estimate without calling the model)
Prompt caching (cache_control) ✅
Extended thinking (thinking) ✅

The key and balance are checked with a minimal generating request:

curl https://api.mixen.ai/v1/chat/completions \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"model":"z-ai/glm-5.3-flash","messages":[{"role":"user","content":"ping"}],"max_tokens":5}'

200 — the key and balance work; 401 — the key was copied incompletely or it is not a Mixen API key; 402 — the balance is empty. If the app shows Gateway was unreachable at startup, it could not reach the base URL — check the address (no /v1) and the network.

The Desktop itself accepts Claude models only in its allowlist and picker — non-Claude IDs (openai/…, z-ai/…) are rejected by its form before any request, even though our /v1/messages proxies any text model in the catalog programmatically. So a “cheap model” in Desktop means a cheap Claude: anthropic/claude-haiku-5.5 at 10.30 ₽ per 1M input; for non-Claude models use Claude Code (ANTHROPIC_MODEL / CLAUDE_CODE_SUBAGENT_MODEL accept any catalog ID — see the guide), Codex CLI, OpenCode or DeepSeek Harness. Prices are per 1M tokens, input/output; full tables with cache columns — in the catalog.

Task Model Input / output
Quick questions, routine, drafts GLM 5.3 Flash (z-ai/glm-5.3-flash) $0.01 / $0.24
Edits in familiar code, long tasks GLM 5.3 (z-ai/glm-5.3) $0.88 / $2.75
Complex agentic sessions, unfamiliar codebase Claude Sonnet 5.5 (anthropic/claude-sonnet-5.5) $2.50 / $12.50

Prompt caching is always on at Mixen; the client needs no setup:

  • repeated context within 5 minutes is billed at ~10% of the input price ($0.25 per 1M for claude-sonnet-5.5 instead of $2.50), and every hit extends the window by another 5 minutes;
  • a pause longer than 5 minutes resets the cache — the next turn pays the full input price, then the discount builds up again;
  • don’t edit project rules (CLAUDE.md, AGENTS.md) mid-session — changing the prefix resets the cache;
  • the limit is 120 RPM per key.
  • Gateway was unreachable — the app could not reach the base URL at startup: make sure the address has no /v1 and your network doesn’t block api.mixen.ai.
  • Gateway rejected the configured credential (HTTP 403) — on save, Desktop verifies the key with a probe request to POST /v1/messages using the model anthropic/claude-haiku-4.5 (the probedModel field in the error). If the key has an allowed-models list and that model is not on it, Mixen returns 403 model_not_allowed and the app concludes the credential was rejected. Add anthropic/claude-haiku-4.5 to the key’s allowed models in the dashboard or use a key without model restrictions.
  • ANTHROPIC_BASE_URL / settings.json variables don’t work — that’s expected: Desktop only reads third-party inference configuration from the Developer form. For environment variables use the CLI (see the Claude Code page).
  • The picker shows the whole catalog, not just the models your key is allowed to use: GET /v1/models is public, and the key’s allow-list is enforced per generation request (a disallowed model yields 403 model_not_allowed). To narrow the picker, set a model allowlist in the same Inference menu — only your models.
  • The model picker is empty — auto-discovery only shows recognizably-Claude models; check that the key’s balance is positive, set an explicit list with full catalog IDs and restart the app fully (Quit).
  • No Continue with Gateway button — restart the app once more; if that doesn’t help, Developer → Clear Cache and Restart and update the app.
  • WebFetch and built-in tools block sites (Access blocked by network egress settings) — tool traffic is isolated behind an allow-list; add the hosts you need under Configure Third-Party Inference… → Workspace restrictions → Allowed egress hosts.
  • The configuration form is read-only — an administrator-distributed configuration (MDM) is already on the device; it takes precedence over the local one.