mcp-ollama
@true-alter
About mcp-ollama
MCP server wrapping local Ollama models for Claude Code delegation
Basic information
Category
AI & Agents
License
Apache-2.0
Runtime
node
Transports
stdio
Publisher
true-alter
Submitted by
maxchop
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"ollama": {
"command": "node",
"args": [
"/absolute/path/to/mcp-ollama/dist/index.js"
],
"env": {
"OLLAMA_HOST": "http://localhost:11434",
"OLLAMA_MODEL": "hermes3:8b"
}
}
}
}Tools
9General-purpose generation with system + user prompt
Summarise a blob of text
Analyse text against a specific question
Draft content in a given style
Code tasks: docstring / test / explain / review / types / refactor-suggest
Diff-driven tasks: commit-message / pr-description / changelog / summary / impact
Mechanical code transformations
List models available on the local Ollama host
Pull a model onto the local Ollama host
Overview
What is mcp-ollama?
mcp-ollama is an MCP server that wraps local Ollama models, allowing orchestrators like Claude Code or Cursor to offload simple tasks to a locally‑running model instead of paying per token. It is plumbing: the orchestrator decides what to route locally, and the server exposes nine tools that pass the work straight to a local model.
How to use mcp-ollama?
Install via npm install -g @truealter/mcp-ollama or run with npx @truealter/mcp-ollama. You need a running Ollama instance with at least one model pulled (default hermes3:8b). Configure the server in your MCP client (e.g., Claude Code) using stdio transport and optionally set OLLAMA_HOST and OLLAMA_MODEL environment variables. Tools are exposed automatically via MCP introspection.
Key features of mcp-ollama
- Nine tools for generation, summarisation, code, diffs, and more
- Runs entirely over stdio – no network call‑outs by the server
- Override model per tool call or via
OLLAMA_MODELenvironment variable - Ships no model weights, no telemetry, no analytics
- Stateless between calls; every request stays on the host running Ollama
- Supports Docker deployment with automatic host‑network routing
Use cases of mcp-ollama
- Route classification, one‑liners, and tags to a fast 8B model instead of a frontier API
- Generate commit messages, PR descriptions, and changelogs locally from diffs
- Write docstrings, tests, or code reviews using a code‑specialised Ollama model
- Summarise long documents or analyse text against a specific question without API costs
- Draft content in a given style, then refine it later with an external model
FAQ from mcp-ollama
What dependencies does mcp-ollama require?
Node 18+, a running Ollama instance (default http://localhost:11434), and at least one model pulled into Ollama.
Does mcp-ollama send my data anywhere?
No. The server makes no network calls beyond the configured OLLAMA_HOST endpoint, and ships no telemetry, analytics, or auto‑update pinger. Data stays on the host where Ollama runs.
What transport does mcp-ollama use?
It uses stdio transport and is designed to be launched by MCP‑aware clients (Claude Code, Cursor, etc.). Running the binary directly is only useful for debugging.
Why are my tool outputs truncated?
Each tool has a default max_tokens of 2048. For longer generations, pass max_tokens explicitly in the tool call.
I get a 404 error when calling a tool.
The model you requested is not available on Ollama. Run ollama pull <name> or use the local_pull tool from your MCP client to pull it.
More AI & Agents MCP servers
Mcp Agent
lastmile-aiBuild effective agents using Model Context Protocol and simple workflow patterns
MCP Manager for Claude Desktop
zueaisimple web ui to manage mcp (model context protocol) servers in the claude app
LinkedIn MCP Server
stickerdanielOpen-source MCP server for LinkedIn. Give Claude and any MCP-compatible AI agent access to profiles, companies, jobs, and messages.
MCP-NixOS - Because Your AI Assistant Shouldn't Hallucinate About Packages
utensilsMCP-NixOS - Model Context Protocol Server for NixOS resources
MCP-LLM Bridge
patruffBridge between Ollama and MCP servers, enabling local LLMs to use Model Context Protocol tools
Comments