# Atomic Chat Tool

Adds an MCP server so the container agent can call local Atomic Chat models.

- Repository: https://github.com/nanocoai/nanoclaw (31069 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add nanocoai/nanoclaw --skill add-atomic-chat-tool -g -a claude-code -y`
Codex: `npx skills add nanocoai/nanoclaw --skill add-atomic-chat-tool -g -a codex -y`
Cursor: `npx skills add nanocoai/nanoclaw --skill add-atomic-chat-tool -g -a cursor -y`
Gemini CLI: `npx skills add nanocoai/nanoclaw --skill add-atomic-chat-tool -g -a gemini-cli -y`

## Description

Add Atomic Chat MCP server so the container agent can call local models served by the Atomic Chat desktop app via its OpenAI-compatible API.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Add Atomic Chat Integration

This skill adds a stdio-based MCP server that exposes models running in the local [Atomic Chat](https://github.com/AtomicBot-ai/Atomic-Chat) desktop app as tools for the container agent. Claude remains the orchestrator but can offload work to local models served by Atomic Chat on `http://127.0.0.1:1337/v1` (OpenAI-compatible).

Tools exposed:
- `atomic_chat_list_models`, list models currently available in Atomic Chat (`GET /v1/models`)
- `atomic_chat_generate`, send a prompt to a specified model and return the response (`POST /v1/chat/completions`)

Model management (download, delete) is done through the **Atomic Chat desktop UI**, the app is a fork of Jan and manages its own model library.

The skill ships the MCP server source (and its test) in this folder and copies them into the agent-runner tree at install time, then registers the server in `index.ts` and forwards host env vars in `container-runner.ts`. Registering the server is enough to expose its tools, the agent's allow-pattern (`mcp__atomic_chat__*`) is derived from the registered server name.

## Phase 1: Pre-flight

### Check if already applied

Check if `container/agent-runner/src/atomic-chat-mcp-stdio.ts` exists. If it does, skip to Phase 3 (Configure).

### Check prerequisites

Verify Atomic Chat is installed and its local API server is running. On the host:

```bash
curl -s http://127.0.0.1:1337/v1/models | head
```

If the request fails:

1. Install Atomic Chat from the [latest release](https://github.com/AtomicBot-ai/Atomic-Chat/releases) (macOS only for now, `atomic-chat.dmg`).
2. Open the app.
3. Open **Settings → Local API Server** and make sure it's enabled on port `1337`.
4. Go to the **Hub** (or **Models**) tab and download at least one model (e.g. Llama 3.2 3B, Qwen 2.5 Coder 7B).
5. Load the model once by sending any message in Atomic Chat's UI to warm it up.

## Phase 2: Apply Code Changes

### Copy the skill's source and tests into both trees

The rest: https://github.com/nanocoai/nanoclaw/blob/HEAD/.claude/skills/add-atomic-chat-tool/SKILL.md
