Ollama
Run local LLMs via Ollama's HTTP API. No API keys needed, fully private, zero cost. Uses native fetch against Ollama's local server.
Installation
Run in your terminal:
bash
# Project scope (current project only)
claude mcp add ollama -- npx -y ask-ollama-mcp
# User scope (all projects)
claude mcp add --scope user ollama -- npx -y ask-ollama-mcpOr install globally:
bash
npm install -g ask-ollama-mcpPrerequisites
- Node.js v20.0.0 or higher
- Ollama installed and running locally
- A model pulled:
bash
ollama pull qwen2.5-coder:7bTools
| Tool | Purpose |
|---|---|
ask-ollama | Send prompts to local Ollama via HTTP. Defaults to qwen2.5-coder:7b |
ping | Lists locally available Ollama models via /api/tags |
Models
- Default:
qwen2.5-coder:7b(good balance of speed and capability) - Fallback:
qwen2.5-coder:1.5b(automatic on model-not-found)
Configuration
Set OLLAMA_HOST environment variable to customize the Ollama server address (defaults to http://localhost:11434).
Key Features
- No API keys required
- Fully local and private
- Zero cost per query
- Model auto-detection via
/api/tagsendpoint - Automatic model fallback from 7b to 1.5b
npm
- Package: ask-ollama-mcp
- Binary:
ask-ollama-mcp