Skills

Add Ollama Tool

Add Ollama MCP server so the container agent can call local models and optionally...

Install

npx skills add nanocoai/nanoclaw --skill add-ollama-tool -g -a claude-code -y
Repository
nanocoai/nanoclaw31.1k
Category
AI and agents
Updated
5d ago
License
MIT
Context cost
Mediumabout 2,956 tokens
Runs scripts
Yes, review before use

What it does

Add Ollama MCP server so the container agent can call local models and optionally manage the Ollama model library.

Add Ollama Integration

This skill adds a stdio-based MCP server that exposes local Ollama models as tools for the container agent. Claude remains the orchestrator but can offload work to local models served by the Ollama daemon on the host, and can optionally manage the model library directly. Ollama runs locally and is keyless, there are no credentials to thread; the only configuration is the daemon's base URL.

Core tools (always available):

  • ollama_list_models, list installed models with name, size, and family (GET /api/tags)
  • ollama_generate, send a prompt to a specified model and return the response (POST /api/generate)

Management tools (opt-in via OLLAMA_ADMIN_TOOLS=true):

  • ollama_pull_model, pull (download) a model from the Ollama registry (POST /api/pull)
  • ollama_delete_model, delete a locally installed model to free disk space (DELETE /api/delete)
  • ollama_show_model, show model details: modelfile, parameters, and architecture info (POST /api/show)
  • ollama_list_running, list models currently loaded in memory with memory usage and processor type (GET /api/ps)

The skill ships the MCP server source (and its tests) 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__ollama__*) is derived from the registered server name.

Phase 1: Pre-flight

Check if already applied

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

Check prerequisites

Verify Ollama is installed and its daemon is reachable. On the host:

curl -s http://127.0.0.1:11434/api/tags | head

If the request fails:

Read the whole SKILL.md on GitHub

More in AI and agents