Skip to content

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-mcp

Or install globally:

bash
npm install -g ask-ollama-mcp

Prerequisites

  1. Node.js v20.0.0 or higher
  2. Ollama installed and running locally
  3. A model pulled:
bash
ollama pull qwen2.5-coder:7b

Tools

ToolPurpose
ask-ollamaSend prompts to local Ollama via HTTP. Defaults to qwen2.5-coder:7b
pingLists 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/tags endpoint
  • Automatic model fallback from 7b to 1.5b

npm

Released under the MIT License.