Agent skill

Atomic Chat MCP Tool for NanoClaw

by nanocoai in nanocoai/nanoclaw

Adds an MCP server to NanoClaw so its container agent can list and prompt local models served by the Atomic Chat desktop app.

MITAuto-check: notesAgent Workflows

Install Atomic Chat MCP Tool for NanoClaw

skills CLI
$ npx skills add nanocoai/nanoclaw --skill add-atomic-chat-tool -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nanocoai/nanoclaw add-atomic-chat-tool --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nanocoai/nanoclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-atomic-chat-tool .claude/skills/add-atomic-chat-tool && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-atomic-chat-tool
GitHub stars
31k
Token cost
~2.6k tokens
SKILL.md length
993 words
Files
6
Skills in repo
59
Repo updated
First seen
Licence
MIT

At a glance

Adds an MCP server to NanoClaw so its container agent can list and prompt local models served by the Atomic Chat desktop app.

  • Works in 4 steps: Pre-flight → Apply Code Changes → Configure → …
  • Letting a NanoClaw agent offload work to a local model
  • SKILL.md covers Phase 1: Pre-flight, Phase 2: Apply Code Changes, Phase 3: Configure and Phase 4: Verify, plus 1 more section
  • Runs TypeScript scripts from its folder; calls pnpm, curl and bun; needs ATOMIC_CHAT_API_KEY

What it does

The skill installs a stdio MCP server that exposes models running in the Atomic Chat desktop app as tools, so Claude stays the orchestrator but can hand work to local models over the app's OpenAI-compatible API on port 1337. Two tools result: `atomic_chat_list_models`, which lists the available models, and `atomic_chat_generate`, which sends a prompt to a chosen model and returns its answer. Downloading and deleting models is done in the Atomic Chat interface, not through the tools.

Installation first checks whether `atomic-chat-mcp-stdio.ts` is already present, then confirms the local API answers. If it does not, the steps say to install the macOS app, enable its Local API Server and download at least one model. The skill copies its source and tests into both the container and host trees, registers the server in `index.ts` and forwards host environment variables in `container-runner.ts`. A `REMOVE.md` file covers uninstalling.

When your agent uses it

  • Letting a NanoClaw agent offload work to a local model
  • Connecting the Atomic Chat desktop app to the container agent
  • Checking which local models are available from inside an agent session

Example prompts

  • “Add the Atomic Chat tool so my NanoClaw agent can use local models.”
  • “List the models currently loaded in Atomic Chat and ask the smallest one to summarize this note.”
  • “Remove the Atomic Chat integration from NanoClaw.”

Requirements

  • A NanoClaw installation
  • The Atomic Chat desktop app (macOS) with its Local API Server on port 1337
  • At least one model downloaded in Atomic Chat

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Pre-flight
  2. Apply Code Changes
  3. Configure
  4. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 66f0823. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (TypeScript), which the agent can run.

    Shell commands in SKILL.md call:

    • pnpm
    • curl
    • bun
    • docker

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • ATOMIC_CHAT_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Atomic Chat MCP Tool for NanoClaw loads about 2.6k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 993 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:179
    ocalhost`. To use a custom host, add to `.env`:
  • NoteMentions a .env fileSKILL.md:239
    ustom host, check `ATOMIC_CHAT_HOST` in `.env`

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from nanocoai/nanoclaw at commit 66f0823, republished under its MIT licence (© nanocoai). 993 words, ~2,599 tokens.

Download SKILL.mdSave it as .claude/skills/add-atomic-chat-tool/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
add-atomic-chat-tool
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.

Add Atomic Chat Integration

This skill adds a stdio-based MCP server that exposes models running in the local 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 (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

This skill reaches into both the container (Bun) tree and the host (Node) tree, so its files go into both, alongside the integration points they cover.

bash
S=.claude/skills/add-atomic-chat-tool
# Container (Bun) tree — the MCP server and the registration wiring test
cp $S/atomic-chat-mcp-stdio.ts        container/agent-runner/src/atomic-chat-mcp-stdio.ts
cp $S/atomic-chat-registration.test.ts container/agent-runner/src/atomic-chat-registration.test.ts
# Host (Node) tree — the env-forwarding helper and the wiring test
cp $S/atomic-chat-env.ts              src/atomic-chat-env.ts
cp $S/atomic-chat-wiring.test.ts      src/atomic-chat-wiring.test.ts
Register the MCP server in the agent-runner

Edit container/agent-runner/src/index.ts. Find the mcpServers object that currently looks like this:

ts
  const mcpServers: Record<string, { command: string; args: string[]; env: Record<string, string> }> = {
    nanoclaw: {
      command: 'bun',
      args: ['run', mcpServerPath],
      env: {},
    },
  };

Add an atomic_chat entry alongside nanoclaw:

ts
  const mcpServers: Record<string, { command: string; args: string[]; env: Record<string, string> }> = {
    nanoclaw: {
      command: 'bun',
      args: ['run', mcpServerPath],
      env: {},
    },
    atomic_chat: {
      command: 'bun',
      args: ['run', path.join(__dirname, 'atomic-chat-mcp-stdio.ts')],
      env: {
        ...(process.env.ATOMIC_CHAT_HOST ? { ATOMIC_CHAT_HOST: process.env.ATOMIC_CHAT_HOST } : {}),
        ...(process.env.ATOMIC_CHAT_API_KEY ? { ATOMIC_CHAT_API_KEY: process.env.ATOMIC_CHAT_API_KEY } : {}),
      },
    },
  };

atomic-chat-registration.test.ts asserts this entry is present and points at the server module — the tool only appears to the agent if it is registered here.

Forward host env vars into the container

The env-forwarding logic lives in the copied src/atomic-chat-env.ts (atomicChatEnv()), so the reach-in into composeSessionSpec is a single spread.

Import it in src/container-runner.ts (alongside the other local imports):

ts
import { atomicChatEnv } from './atomic-chat-env.js';

Then, in composeSessionSpec, find the contributedEnv literal and spread the helper at the end. The contributed lane — not the composed env literal — because ATOMIC_CHAT_API_KEY is credential-NAMED and the composed lane's key-name check would refuse the spawn; the contributed lane exempts the name and still refuses credential-shaped values:

ts
  const contributedEnv: Record<string, string> = {
    ...(contribution.env ?? {}),
    ...(gateway.env ?? {}),
    ...atomicChatEnv(),
  };

atomic-chat-wiring.test.ts asserts this ...atomicChatEnv() spread exists inside composeSessionSpec.

Surface [ATOMIC] log lines at info level

Shared block. This rewrites the driver's container-stderr logger, which other local-model tools (e.g. add-ollama-tool for [OLLAMA]) also edit to surface their own prefix. Touch only the [ATOMIC] branch and leave the rest of the block intact, so the edits coexist and removal restores it cleanly.

Container stderr now lands in the Docker driver: in src/drivers/docker-driver.ts, inside DockerHandle.start(), find the stderr handler:

ts
    proc.onStderr((line) => {
      log.debug(line, { container: this.name });
      this.#stderrTail.push(line);
      if (this.#stderrTail.length > 10) this.#stderrTail.shift();
    });

Replace the log.debug line with a prefix branch (leave the stderr-tail lines intact — they feed the non-zero-exit warning):

ts
    proc.onStderr((line) => {
      if (line.includes('[ATOMIC]')) {
        log.info(line, { container: this.name });
      } else {
        log.debug(line, { container: this.name });
      }
      this.#stderrTail.push(line);
      if (this.#stderrTail.length > 10) this.#stderrTail.shift();
    });
Add env-var stubs to .env.example

Append to .env.example:

bash
# Atomic Chat MCP tool (.claude/skills/add-atomic-chat-tool)
# Override the host where Atomic Chat exposes its OpenAI-compatible API.
# Default: http://host.docker.internal:1337 (with fallback to localhost)
# ATOMIC_CHAT_HOST=http://host.docker.internal:1337

# Optional API key. Leave unset for a local Atomic Chat install — it does not require auth.
# ATOMIC_CHAT_API_KEY=
Validate code changes
bash
pnpm run build
pnpm exec tsc -p container/agent-runner/tsconfig.json --noEmit
# Host tree: composeSessionSpec wiring
pnpm exec vitest run src/atomic-chat-wiring.test.ts
# Container tree: index.ts registration
(cd container/agent-runner && bun test src/atomic-chat-registration.test.ts)
./container/build.sh

All must be clean before proceeding. The wiring and registration tests confirm the two integration points — the composeSessionSpec spread and the index.ts registration — are actually in place; a failure means one drifted. (The MCP server's own request/response behavior against Atomic Chat is the author's build-time concern, not part of these tests — verify it manually in Phase 4.)

Phase 3: Configure

Show full SKILL.md (396 more words)Show less
Set Atomic Chat host (optional)

By default, the MCP server connects to http://host.docker.internal:1337 (Docker Desktop) with a fallback to localhost. To use a custom host, add to .env:

bash
ATOMIC_CHAT_HOST=http://your-atomic-chat-host:1337
Set API key (optional)

Atomic Chat does not require authentication when running locally — leave this unset. Only set it if you've put Atomic Chat behind a reverse proxy that enforces auth:

bash
ATOMIC_CHAT_API_KEY=sk-...
Restart the service

Run from your NanoClaw project root:

bash
source setup/lib/install-slug.sh
launchctl kickstart -k gui/$(id -u)/$(launchd_label)  # macOS
# Linux: systemctl --user restart $(systemd_unit)

Phase 4: Verify

Test inference

Tell the user:

Send a message like: "use atomic chat to tell me the capital of France"

The agent should use atomic_chat_list_models to find available models, then atomic_chat_generate to get a response.

Check logs if needed
bash
tail -f logs/nanoclaw.log | grep -i atomic

Look for:

  • [ATOMIC] Listing models... — list request started
  • [ATOMIC] Found N models — models discovered
  • [ATOMIC] >>> Generating with <model> — generation started
  • [ATOMIC] <<< Done: <model> | Xs | N tokens | M chars — generation completed

Troubleshooting

Agent says "Atomic Chat is not installed" or tries to run a CLI

The agent is looking for a CLI that doesn't exist instead of using the MCP tools. This means:

  1. The MCP server wasn't copied — check container/agent-runner/src/atomic-chat-mcp-stdio.ts exists
  2. The MCP server wasn't registered — check container/agent-runner/src/index.ts has the atomic_chat entry in mcpServers (the allow-pattern is derived from this, so registration is the only thing to check)
  3. The container wasn't rebuilt — run ./container/build.sh
"Failed to connect to Atomic Chat"
  1. Verify the host API is reachable: curl http://127.0.0.1:1337/v1/models
  2. Confirm the Local API Server is enabled in Atomic Chat's settings
  3. Check Docker can reach the host: docker run --rm curlimages/curl curl -s http://host.docker.internal:1337/v1/models
  4. If using a custom host, check ATOMIC_CHAT_HOST in .env
model not found / 404 on generate

The model ID passed to atomic_chat_generate must exactly match one of the IDs returned by atomic_chat_list_models. Ask the agent to list models first, then pick one from that list.

Slow first response

Atomic Chat lazy-loads models into memory on first use. The initial call may take longer while the model warms up. Subsequent calls against the same model are fast.

Agent doesn't use Atomic Chat tools

The agent may not know about the tools. Try being explicit: "use the atomic_chat_generate tool with llama3.2-3b-instruct to answer: ..."

Context window or output size issues

Atomic Chat respects each model's native context length. If you hit limits, pass max_tokens explicitly when calling atomic_chat_generate, or switch to a model with a larger context window in the Atomic Chat UI.

© nanocoai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files in .claude/skills/add-atomic-chat-tool of nanocoai/nanoclaw.

  • SKILL.md
  • REMOVE.md
  • atomic-chat-env.ts
  • atomic-chat-mcp-stdio.ts
  • atomic-chat-registration.test.ts
  • atomic-chat-wiring.test.ts

Open the folder on GitHubat commit 66f0823

Compare with similar skills

Atomic Chat MCP Tool for NanoClaw next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Atomic Chat MCP Tool for NanoClaw compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Atomic Chat MCP Tool for NanoClaw this skillnanocoai/nanoclaw31k—~2.6kAutomated safety check: NotesMIT
Auto Review Loop LLMAI4Scientist/nano-scientist1283 repos~1.8kAutomated safety check: WarnNone
Openai Knowledgeopenai/openai-agents-python30k—~408Automated safety check: PassMIT
Openai Docs Skillaiskillstore/marketplace4301 repos~517Automated safety check: PassNone
Openai Docsaafqaq/codex-lb-enhanced1032 repos~861Automated safety check: PassApache-2.0
Chatgpt AppsHaohao-end/openagent8081 repos~4.9kAutomated safety check: PassApache-2.0

Similar skills

  • Auto Review Loop LLM

    AI4Scientist/nano-scientist

    Autonomous research review loop using any OpenAI-compatible LLM API.

    128 GitHub starsUsed in 3 repos~1.8k tokens
    Agent WorkflowsAuto-check: warnings
  • Openai Knowledge

    openai/openai-agents-python

    Official

    Retrieve authoritative OpenAI API and platform documentation when an integration or claim needs current external evidence.

    30k GitHub stars~408 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Openai Docs Skill

    aiskillstore/marketplace

    Query the OpenAI developer documentation via the OpenAI Docs MCP server using CLI (curl/jq).

    430 GitHub starsUsed in 1 repo~517 tokens
    AI & LLM EngineeringAuto-check passed
  • Openai Docs

    aafqaq/codex-lb-enhanced

    A skill your agent uses when the user asks how to build with OpenAI products or APIs and needs up-to-date official documentation with citations (for example: Codex, Responses API, Chat Completions…

    103 GitHub starsUsed in 2 repos~861 tokens
    DevOps & CloudAuto-check passed
  • Chatgpt Apps

    Haohao-end/openagent

    Build, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI.

    808 GitHub starsUsed in 1 repo~4.9k tokens
    Agent WorkflowsAuto-check passed
  • Openai Docs

    Haohao-end/openagent

    A skill your agent uses when the user asks how to build with OpenAI products or APIs and needs up-to-date official documentation with citations, help choosing the latest model for a use case, or…

    808 GitHub stars~1.7k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed

More from nanocoai/nanoclaw

All 59 skills in this repo
  • Installs or refreshes Iron Proxy and its Iron Control web console for NanoClaw, with a local Docker setup, database, credentials and a human approval bridge.

    31k GitHub stars~4.6k tokensUpdated 3 days ago
    Auto-check: notes
  • Installs or refreshes OneCLI as the gateway provider for NanoClaw, copying the adapter files, registering the provider and running the setup script.

    31k GitHub stars~1.1k tokensUpdated 3 days ago
    Auto-check: notes
  • Agent Browser

    nanocoai/nanoclaw

    Drives a web browser from the shell with the agent-browser CLI: open pages, read an element snapshot, click and fill by reference, grab text and screenshots.

    31k GitHub starsUsed in 2 repos~1.6k tokens
    Auto-check passed
  • Guides a conversational migration from an OpenClaw install to NanoClaw v2, carrying over identity, channel credentials, scheduled tasks and workspace files.

    31k GitHub stars~6k tokensUpdated 3 days ago
    Auto-check: notes
  • Wires up an additional phone number onto an already-installed Dial channel, so one NanoClaw install answers SMS and AI voice calls on more than one line.

    31k GitHub stars~1.5k tokensUpdated 3 days ago
    Auto-check passed
  • Add Dial Tool

    nanocoai/nanoclaw

    Installs the `dial` CLI and a credential in NanoClaw agent containers so chosen agents can send SMS, place AI voice calls and receive verification codes.

    31k GitHub stars~4.4k tokensUpdated 3 days ago
    Auto-check passed

Questions about Atomic Chat MCP Tool for NanoClaw

What does Atomic Chat MCP Tool for NanoClaw do?

Adds an MCP server to NanoClaw so its container agent can list and prompt local models served by the Atomic Chat desktop app. The skill installs a stdio MCP server that exposes models running in the Atomic Chat desktop app as tools, so Claude stays the orchestrator but can hand work to local models over the app's OpenAI-compatible API on port 1337. Two tools result: `atomic_chat_list_models`, which lists the available models, and `atomic_chat_generate`, which sends a prompt to a chosen model and returns its answer.

When should I use Atomic Chat MCP Tool for NanoClaw?

Atomic Chat MCP Tool for NanoClaw fits situations like: letting a NanoClaw agent offload work to a local model; connecting the Atomic Chat desktop app to the container agent; checking which local models are available from inside an agent session.

How do I install Atomic Chat MCP Tool for NanoClaw in Claude Code?

Run `npx skills add nanocoai/nanoclaw --skill add-atomic-chat-tool -a claude-code`. Or copy the skill folder (.claude/skills/add-atomic-chat-tool in nanocoai/nanoclaw) into .claude/skills/add-atomic-chat-tool in your project. Claude Code loads it when a task matches its description.

How do I install Atomic Chat MCP Tool for NanoClaw in Codex?

Run `npx skills add nanocoai/nanoclaw --skill add-atomic-chat-tool -a codex`. Or copy the skill folder (.claude/skills/add-atomic-chat-tool in nanocoai/nanoclaw) into .agents/skills/add-atomic-chat-tool in your project. Codex loads it when a task matches its description.

Can I use Atomic Chat MCP Tool for NanoClaw in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nanocoai/nanoclaw --skill add-atomic-chat-tool -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-atomic-chat-tool, .gemini/skills/add-atomic-chat-tool, .github/skills/add-atomic-chat-tool and .opencode/skills/add-atomic-chat-tool in your project.

What does Atomic Chat MCP Tool for NanoClaw need to run?

Going by SKILL.md and its folder, Atomic Chat MCP Tool for NanoClaw needs TypeScript for the scripts in its folder, the command-line tools its instructions call (pnpm, curl, bun and docker) and credentials named ATOMIC_CHAT_API_KEY. Our summary lists: A NanoClaw installation; The Atomic Chat desktop app (macOS) with its Local API Server on port 1337; At least one model downloaded in Atomic Chat.

Does Atomic Chat MCP Tool for NanoClaw access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Atomic Chat MCP Tool for NanoClaw safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Atomic Chat MCP Tool for NanoClaw use?

Atomic Chat MCP Tool for NanoClaw is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Atomic Chat MCP Tool for NanoClaw use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Atomic Chat MCP Tool for NanoClaw?

Skills that share tags, products or a category with Atomic Chat MCP Tool for NanoClaw: Auto Review Loop LLM (AI4Scientist/nano-scientist, 128 stars), Openai Knowledge (openai/openai-agents-python, 30k stars), Openai Docs Skill (aiskillstore/marketplace, 430 stars) and Openai Docs (aafqaq/codex-lb-enhanced, 103 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Atomic Chat MCP Tool for NanoClaw?

nanocoai (a GitHub organization) maintains it in nanocoai/nanoclaw, which has 30,902 GitHub stars. The repository holds 59 skills in this directory. The repository was last updated on October 6, 2026.

Source: nanocoai/nanoclaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.