Add Ollama MCP Tool (NanoClaw)
Installs an Ollama MCP server so the NanoClaw container agent can call — and optionally manage — local LLMs.
Dev & CodingAdvanced★ 30,471⑂ 12,865AI score 7/10Last updated: Aug 9, 2026
What it does
This skill wires a stdio MCP server for Ollama into a NanoClaw project so the container agent can treat local models as callable tools. Claude stays the orchestrator and offloads bulk or private inference to models served by the Ollama daemon on the host.
- Core tools:
ollama_list_models(installed models),ollama_generate(run a prompt) - Opt-in tools via
OLLAMA_ADMIN_TOOLS=true: pull, delete, show model details, list models loaded in memory - Copies the MCP server plus its tests into both the container (Bun) and host (Node) trees, registers the server in
index.ts, and forwardsOLLAMA_HOST/OLLAMA_ADMIN_TOOLSfromcontainer-runner.ts - Promotes
[OLLAMA]log lines to info level and appends config stubs to.env.example - Ships exact build, type-check and wiring-test commands, plus a substantial troubleshooting section
Who it's for
- Developers running NanoClaw who want to cut API cost with local models
- Teams that must keep sensitive prompts off third-party APIs
- Anyone looking for a real-world example of integrating an MCP stdio server
Caveat: it edits source files at NanoClaw-specific paths, so it does not transfer to other repos as-is.
Examples
- First smoke test — start the daemon,
ollama pull gemma3:1b, then tell the agent "use ollama to tell me the capital of France" and watch it list models then generate. - Model library management — set
OLLAMA_ADMIN_TOOLS=true, restart, then say "pull the qwen3-coder:30b model" or "which ollama models are loaded in memory?". - Remote Ollama box — point
OLLAMA_HOST=http://gpu-box:11434at a shared GPU machine so the container agent uses its models.
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .claude/skills/add-ollama-tool folder from the GitHub repo nanocoai/nanoclaw into my ~/.claude/skills/add-ollama-tool/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/nanocoai/nanoclaw.git && mkdir -p ~/.claude/skills && cp -r nanoclaw/.claude/skills/add-ollama-tool ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Install Ollama on the host and start it (
ollama serveor the desktop app). - Confirm the daemon answers:
curl -s http://127.0.0.1:11434/api/tags - If no models are installed, grab a small one:
ollama pull gemma3:1b - Get the NanoClaw project:
git clone https://github.com/nanocoai/nanoclaw.git && cd nanoclaw - The skill already lives at
.claude/skills/add-ollama-tool; to use it elsewhere runcp -r nanoclaw/.claude/skills/add-ollama-tool ~/.claude/skills/. - Open Claude Code in the project root and ask: "use the add-ollama-tool skill to wire up Ollama".
- Follow the phases: copy sources → register the server in
index.ts→ add the env-forwarding call incontainer-runner.ts. - Run the validation commands:
pnpm run build,pnpm exec vitest run src/ollama-wiring.test.ts,(cd container/agent-runner && bun test src/ollama-registration.test.ts),./container/build.sh - Optionally add
OLLAMA_ADMIN_TOOLS=trueand/orOLLAMA_HOST=...to.env, then restart the service (launchctl kickstart -kon macOS,systemctl --user restarton Linux). - Verify by asking the agent "use ollama to ...", and inspect
tail -f logs/nanoclaw.log | grep -i ollamaif something fails.
View source on GitHub ↗License: MIT