Atomic Chat
Add the Atomic Chat desktop app as an MCP tool. The active agent provider can call local models through Atomic Chat's OpenAI-compatible API.
What it does
- The container agent can list and invoke local models running in Atomic Chat
- OpenAI-compatible API — works with any model Atomic Chat serves
- stdio MCP server, no extra service to manage
- Lazy model loading — Atomic Chat warms models on first call
- Optional API key for proxied / authenticated setups
What you'll need
- NanoClaw installed and running
- Atomic Chat installed (macOS — atomic-chat.dmg)
- Atomic Chat's Local API Server enabled on port 1337
- At least one model downloaded in Atomic Chat
Run the skill
Claude Code: /add-atomic-chat-toolCodex: $add-atomic-chat-toolOpenCode loads the same skill through its skill tool.
How it works
The /add-atomic-chat-tool skill adds a stdio-based MCP server that exposes models running in the local Atomic Chat desktop app as tools for the container agent. The selected agent provider remains the orchestrator and can offload work to local models when that fits.
Atomic Chat is a fork of Jan that serves an OpenAI-compatible API at http://127.0.0.1:1337/v1. The MCP server speaks to that API and exposes two tools to the container agent:
atomic_chat_list_models— list available models (GET /v1/models)atomic_chat_generate— run a prompt against a specified model (POST /v1/chat/completions)
Model management — downloads, deletes, library — is done in the Atomic Chat UI. The skill doesn’t try to wrap that.
Setup
- Install Atomic Chat from the latest release (macOS only for now).
- Open the app and download at least one model in the Hub tab. Send any message in the UI to warm it up.
- Confirm the Local API Server is enabled in Settings → Local API Server (port 1337).
- Run
/add-atomic-chat-tool. The skill copies the MCP server source intocontainer/agent-runner/src/, registers it in the agent-runner’smcpServersmap, forwards theATOMIC_CHAT_*env vars from host into the container, and surfaces[ATOMIC]log lines at info level. Registration is the only wiring needed on the container side — the agent’s allow-pattern (mcp__atomic_chat__*) is derived automatically from the registered server name.
By default, the MCP server connects to http://host.docker.internal:1337 with a fallback to localhost. Override via ATOMIC_CHAT_HOST if needed.
What you get
- Offload to local models — say “use atomic chat to summarize this log” and the agent picks a model from
list_models, callsgenerate, and uses the result. - Privacy — the prompt and response never leave your machine.
- Logs —
[ATOMIC] Listing models...,[ATOMIC] >>> Generating with <model>,[ATOMIC] <<< Done: <model> | Xs | N tokensshow up inlogs/nanoclaw.log.
Tips
- The first call is slow — Atomic Chat lazy-loads models. Subsequent calls against the same model are fast because the model stays in memory.
- The model ID passed to
atomic_chat_generatemust match exactly whatlist_modelsreturned. If the agent guesses, ask it to list first. - When the agent picks the wrong model, be explicit: “use the atomic_chat_generate tool with llama3.2-3b-instruct to…”
- No API key is needed for a local install — Atomic Chat doesn’t require auth. Only set
ATOMIC_CHAT_API_KEYif you’ve put it behind a reverse proxy. - For very large inputs, pass
max_tokensexplicitly when invokingatomic_chat_generateor pick a model with a bigger context window in the Atomic Chat UI.