← Back to directory
A

Ask Ollama MCP Server

Community
Bridge Claude with local Ollama models for private AI-to-AI collaboration — no API keys, fully local.
Category
Dev Tools #199 of 438
Stars
★ 18 Very popular
Transport
stdio (local process)
Runtime
Node.js 20+
Credentials
No credential needed
License
MIT
Last commit
Tools
3
54FMRS · D

Ask Ollama MCP Server targets developers who want a model second opinion in a fully local setup, wiring local Ollama into MCP clients over stdio with no API keys. Its strengths are privacy, zero cost, and offline operation, plus sessionId-based conversation replay; its limits are that local models are weaker than frontier cloud models and Ollama with the target model must already be installed. Best for privacy-sensitive users with local compute, not for environments lacking Ollama or needing multi-provider parallel orchestration.

Strongest · Documentation 12/20 Weakest · Reliability 8/20

Reliability
8/20
Security and permissions
11/20
Maintenance
12/20
Documentation
12/20
Setup experience
11/20
Why each score
Reliability 8/20
Static review: the repository-level README (not specific to this server) advertises CI badges and Node 20+, but the supplied material contains only the manifest (packages/ollama-mcp/server.json) plus the repo-wide README. No source, tests, or per-package CI workflow for packages/ollama-mcp were provided, so I cannot verify that this Ollama server completes the MCP init + tool-list handshake or that the declared tools (ask-ollama, plus shared get-usage-stats/ping statements) behave as described. Positive signal: the README claims Ollama never substitutes a model and returns an explicit `ollama pull` error when the model is absent, which suggests diagnosable failures — but that is untrusted documentation, not file-level execution evidence. Applying the static cap of 12 and deducting for missing tests/CI specific to this server, score 8.
Security and permissions 11/20
No red line observed: the only env vars are OLLAMA_HOST (defaults to local http://localhost:11434), GMCPT_TIMEOUT_MS and GMCPT_LOG_LEVEL, all isRequired false and isSecret false — no API keys, consistent with least privilege and a local data boundary. OLLAMA_HOST is user-overridable to a remote host, which is explicit configuration rather than covert exfiltration. Deductions: from the manifest and repo-level README alone I cannot confirm whether this server is read-only, whether it writes to the local workspace, whether tool calls require confirmation, or whether data-flow disclosure exists; no input-validation evidence for the timeout/log variables. Nothing indicates malware, credential theft, hidden exfiltration, or unconfirmed destructive defaults, so no red line; score 11.
Maintenance 12/20
MIT license is visible at the repository root, the npm package @ask-llm/ollama-mcp and version 0.2.0 are declared in the manifest, and the README shows CI/release workflow badges, published releases, a migration table, and contribution guidance — all signs of active maintenance. However these are repository-level and untrusted, and there is no per-server release history, commit cadence, issue-response record, or documented security-response channel for packages/ollama-mcp. Star count and open issues are discovery signals only and add nothing. Score 12.
Documentation 12/20
Documentation is layered: installation for Claude Code / Cursor / Codex CLI / Claude Desktop / Pi / generic STDIO, provider setup, a tool purpose table, migration table, troubleshooting links, llms.txt, and plugin notes; the Ollama entry states the default model qwen3.8:27b, no auto-fallback, and that the model must be pulled first. Deductions: it is repo-wide documentation spanning seven servers, with no complete per-parameter description for ask-ollama (its argument schema is never shown), sessionId semantics are explained mainly for other providers, and cost/timeout boundaries rest on a single GMCPT_TIMEOUT_MS line. Both README and manifest are untrusted evidence. Score 12.
Setup experience 11/20
The Ollama path is comparatively simple: install Ollama locally, pull a model, register the MCP server via npx or a global install; the manifest shows an npm package over stdio with all environment variables optional and defaulted, and no API key required. Deductions: Node 20+ on Linux/macOS only is stated (Windows unaddressed), no minimal per-server verification step or expected output sample is given, and nothing was executed, so successful package resolution and startup cannot be confirmed statically. Applying the static cap of 15, score 11.

Static review · not runReviewed 2026-09-25

Read the FMRS scoring method →

Fit and risk

What it can accessRuns commands or codeUses the network

Best for

  • Teams or individuals with strict data-privacy requirements whose code cannot leave the machine
  • Developers already running Ollama locally who want to reuse that compute
  • Claude Code, Cursor, or Codex CLI users who want a second opinion from a different model
  • Users who want to avoid per-token API costs

Not for

  • Environments without Ollama installed or running
  • Workflows needing large cloud-model capability or very large-context reads
  • Users wanting multi-provider parallel fan-out (multi-llm) or cross-provider orchestration — use the unified @ask-llm/mcp instead
  • Users seeking official vendor support or an official relationship

Required permissions

  • Local process communication with the MCP client over stdio
  • Access to the local Ollama HTTP service (default http://localhost:11434, configured via OLLAMA_HOST)
  • Reads prompt content passed by the MCP client (the code or text sent to local Ollama)

Risks and side effects

  • Prompt content is sent to the local Ollama service; if OLLAMA_HOST is misconfigured to a remote host, data could leave the machine
  • Local models are generally weaker than frontier cloud models, so reviews may be incomplete or produce false positives
  • If the requested model has not been pulled locally, the call fails with an ollama pull error
  • Third-party, unofficial project — not endorsed by Anthropic, Google, OpenAI, or xAI
  • Long local inference may exceed the default 5-minute timeout (GMCPT_TIMEOUT_MS) and be interrupted

Setup

Before you start

Runtime:Node.js 20+

Other optional settings (3)
OLLAMA_HOST optional Address of the Ollama server, default http://localhost:11434; no change needed after installing Ollama locally.
GMCPT_TIMEOUT_MS optional Timeout for Ollama execution in milliseconds, default 300000 (5 minutes).
GMCPT_LOG_LEVEL optional Log verbosity: debug, info, warn, or error; default warn.
  1. Make sure Node.js 20+ is installed (Linux or macOS).
  2. Install and start Ollama locally, then pull a model, e.g. ollama pull qwen3.8:27b.
  3. Install the MCP server: npx -y @ask-llm/ollama-mcp.
  4. Register the server with your client, e.g. for Claude Code: claude mcp add --scope user ollama -- npx -y @ask-llm/ollama-mcp.
  5. For Cursor (.cursor/mcp.json) or Claude Desktop (claude_desktop_config.json), add an mcpServers entry with command npx and args ["-y", "@ask-llm/ollama-mcp"].
  6. Optional environment variables: OLLAMA_HOST (default http://localhost:11434), GMCPT_TIMEOUT_MS (default 300000), GMCPT_LOG_LEVEL (default warn).
claude_desktop_config.json
{
  "mcpServers": {
    "ollama": {
      "command": "npx",
      "args": [
        "-y",
        "@ask-llm/ollama-mcp"
      ],
      "env": {
        "OLLAMA_HOST": "http://localhost:11434",
        "GMCPT_TIMEOUT_MS": "300000",
        "GMCPT_LOG_LEVEL": "warn"
      }
    }
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "ollama": {
      "command": "npx",
      "args": [
        "-y",
        "@ask-llm/ollama-mcp"
      ],
      "env": {
        "OLLAMA_HOST": "http://localhost:11434",
        "GMCPT_TIMEOUT_MS": "300000",
        "GMCPT_LOG_LEVEL": "warn"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add ollama -e OLLAMA_HOST=http://localhost:11434 -e GMCPT_TIMEOUT_MS=300000 -e GMCPT_LOG_LEVEL=warn -- npx -y @ask-llm/ollama-mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

The client's tool list should show ask-ollama, get-usage-stats, and ping; sending any prompt through ask-ollama and getting a reply from your local Ollama model confirms the connection works.

Troubleshooting

  1. Confirm Ollama is running: check whether http://localhost:11434 responds
  2. Confirm the target model is available locally: run ollama pull qwen3.8:27b
  3. If the server cannot connect, verify OLLAMA_HOST points to the correct address and port
  4. If calls time out, increase GMCPT_TIMEOUT_MS (default 300000 ms)
  5. Set GMCPT_LOG_LEVEL to debug for more detailed logs when diagnosing issues
  6. Use the ping tool to confirm the MCP server is registered and reachable
  7. Make sure Node.js 20+ is installed and npx is available

Things to try

Once connected, you can ask your AI assistant things like:

  • ask ollama to review src/auth.ts for security issues
  • ask ollama to explain src/config.ts
  • ask ollama to debate the plan in docs/design.md
  • ask ollama to compare these two implementation approaches

Tools 3

ask-ollama read-only
Send a prompt to a local Ollama model for private, offline, zero-cost code review or a second opinion; supports server-side conversation replay via sessionId.
get-usage-stats read-only
Return per-session token totals, fallback counts, and breakdowns by provider/model; stored in memory only.
ping read-only
Connection test tool to confirm the MCP server is reachable.

Use cases

Have a local Ollama model review a code diff and surface issues the primary model missed
Get an independent second opinion on code or an architecture plan from another model
Review sensitive codebases while keeping data on your own machine
Run AI-to-AI collaboration offline or with zero API cost
Continue multi-turn conversations through sessionId within the same MCP session

Supported clients

Claude Desktop
Claude Code
Cursor
Codex

Listed from the project's documentation, not tested by this site.

Overview

Ask Ollama MCP Server is the Ollama-only MCP server from the Ask LLM project (npm package @ask-llm/ollama-mcp), speaking stdio transport to MCP clients. It connects locally running Ollama models to clients such as Claude Code, Claude Desktop, Cursor, and Codex CLI so the primary model can call a local model for code review, plan debate, or a second opinion. Because inference happens on your machine, no API keys are required and prompts do not leave your computer. The server supports server-side conversation replay via sessionId and returns a structured AskResponse containing provider, response, model, sessionId, and usage. It also exposes get-usage-stats and ping. Ollama must be installed and running locally with the target model pulled (for example, ollama pull qwen3.8:27b); if the requested model is not present, the call returns a clear ollama pull error. This is an unofficial third-party tool, not affiliated with, endorsed, or sponsored by Anthropic, Google, OpenAI, or xAI.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 62.4k · Tools 2 Compare with this →

Data synced 2026-09-25 Read the FMRS scoring method