MCP Hub
Back to servers

mcp-ollama

MCP server wrapping local Ollama models for offload from API-priced orchestrators. Nine stdio tools - generation, summarisation, analysis, drafting, code tasks (docstring/test/explain/review/types/refactor-suggest), diff-driven tasks (commit-message/pr-description/changelog/summary/impact), mechanical transforms, and model management (list/pull). Apache-2.0.

glama
Updated
Apr 15, 2026

mcp-ollama

MCP server wrapping local Ollama models for offload from API-priced orchestrators.

Exposes 9 tools that pass work to a local model (text generation, summarisation, code tasks, mechanical transforms, commit/PR/changelog drafting). The orchestrator decides what to route locally; this server does the routing.

  • Transport: stdio
  • Runtime: Node 18+
  • Default model: hermes3:8b (override via OLLAMA_MODEL)
  • Ollama host: http://localhost:11434 (override via OLLAMA_HOST)
  • License: Apache-2.0

Install

npm install
npm run build

You also need a running Ollama instance with at least one model pulled:

ollama pull hermes3:8b
ollama pull qwen2.5-coder:32b  # optional, for local_code

Run (stdio)

node dist/index.js

Configure Claude Code

claude mcp add --transport stdio ollama -- node /absolute/path/to/mcp-ollama/dist/index.js

Or in ~/.claude/settings.json:

{
  "mcpServers": {
    "ollama": {
      "transport": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/mcp-ollama/dist/index.js"],
      "env": {
        "OLLAMA_HOST": "http://localhost:11434",
        "OLLAMA_MODEL": "hermes3:8b"
      }
    }
  }
}

Tools

ToolPurpose
local_generateGeneral-purpose generation with system + user prompt
local_summarizeSummarise a blob of text
local_analyzeAnalyse text against a specific question
local_draftDraft content in a given style
local_codeCode tasks: docstring / test / explain / review / types / refactor-suggest
local_diffDiff-driven tasks: commit-message / pr-description / changelog / summary / impact
local_transformMechanical code transformations
local_modelsList models available on the local Ollama host
local_pullPull a model onto the local Ollama host

Full tool schemas are exposed over MCP introspection.

Environment variables

VariableDefaultPurpose
OLLAMA_HOSThttp://localhost:11434Ollama HTTP endpoint
OLLAMA_MODELhermes3:8bDefault model when a tool call omits model

Why

Orchestrators priced by the token (Claude Code, Cursor, the Anthropic API) pay for every classification, every docstring, every commit message. Most of that work doesn't need Opus or GPT-5. Routed to Ollama on the same machine, the same work is free and faster. mcp-ollama is the routing surface.

Part of ALTER

mcp-ollama is maintained by ALTER as part of the identity infrastructure for the AI economy. The ALTER identity MCP server is hosted at mcp.truealter.com.

Reviews

No reviews yet

Sign in to write a review