# ask-ollama

Connect Claude Code to local Ollama models for another review of code or a plan. Useful when you want feedback from a model running on your machine.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 18
- Author: Lykhoyda
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Lykhoyda/ask-llm
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/mcp/ask-ollama

## What it does

The server connects Claude Code with Ollama models running locally. Ask one to inspect code changes or challenge a plan; you decide whether to make any suggested edits.

The setup uses `OLLAMA_HOST`, `GMCPT_TIMEOUT_MS`, and `GMCPT_LOG_LEVEL`. Add the server to Claude Code with `claude mcp add`. If Ollama cannot be reached at the configured host, the connection will fail. The server uses stdio transport.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `OLLAMA_HOST`, `GMCPT_TIMEOUT_MS`, `GMCPT_LOG_LEVEL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env OLLAMA_HOST=<OLLAMA_HOST> --env GMCPT_TIMEOUT_MS=<GMCPT_TIMEOUT_MS> --env GMCPT_LOG_LEVEL=<GMCPT_LOG_LEVEL> --transport stdio ask-ollama -- npx -y @ask-llm/ollama-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add ask-ollama --env OLLAMA_HOST=<OLLAMA_HOST> --env GMCPT_TIMEOUT_MS=<GMCPT_TIMEOUT_MS> --env GMCPT_LOG_LEVEL=<GMCPT_LOG_LEVEL> -- npx -y @ask-llm/ollama-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "ask-ollama": {
            "command": "npx",
            "args": [
                "-y",
                "@ask-llm/ollama-mcp"
            ],
            "env": {
                "OLLAMA_HOST": "<OLLAMA_HOST>",
                "GMCPT_TIMEOUT_MS": "<GMCPT_TIMEOUT_MS>",
                "GMCPT_LOG_LEVEL": "<GMCPT_LOG_LEVEL>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "ask-ollama": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@ask-llm/ollama-mcp"
            ],
            "env": {
                "OLLAMA_HOST": "<OLLAMA_HOST>",
                "GMCPT_TIMEOUT_MS": "<GMCPT_TIMEOUT_MS>",
                "GMCPT_LOG_LEVEL": "<GMCPT_LOG_LEVEL>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e OLLAMA_HOST=<OLLAMA_HOST> -e GMCPT_TIMEOUT_MS=<GMCPT_TIMEOUT_MS> -e GMCPT_LOG_LEVEL=<GMCPT_LOG_LEVEL> ask-ollama npx -y @ask-llm/ollama-mcp
```
Replace <…> with your own values

## When to use it
- get another review of a code change
- check staged work before committing
- surface assumptions that could undermine a plan

## Example prompts
- Ask a local Ollama model to inspect the changes in `src/auth.ts` for bugs.
- Review this implementation plan against the project constraints and flag risky assumptions.
- Check my staged changes and point out anything I should verify.

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [labelhead-artist-momentum](https://affpapa.org/en/nevibecode/mcp/labelhead-artist-momentum.md) — MCP server · ★ 107423
- [Agent Skills Search Server](https://affpapa.org/en/nevibecode/mcp/agent-skills-search-server.md) — MCP server · ★ 26559
- [Skyvern](https://affpapa.org/en/nevibecode/mcp/skyvern.md) — MCP server · ★ 23263
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [PraisonAI](https://affpapa.org/en/nevibecode/mcp/praisonai.md) — MCP server · ★ 9289

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
