jonigl/mcp-client-for-ollama
Terminal MCP client for Ollama with multi-server sessions and tool approvals
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
ollmcp is a Python 3.11+ terminal client that sits between a model endpoint and one or more MCP servers. Both installed commands, ollmcp and mcp-client-for-ollama, resolve to mcp_client_for_ollama.cli:run_cli. Typer handles the CLI, with prompt-toolkit and Rich in the terminal stack. The package depends on mcp~=2.3.0, httpx>=0.27,<1, and any-llm-sdk[ollama,openai,atlascloud]~=1.29.0.
Inference and tool execution are separate: the provider generates responses and requests tool calls, while the client controls whether those calls reach the MCP server and returns tool results to the model. Local STDIO entries launch configured commands; SSE and Streamable HTTP connect to existing endpoints. The same session can combine transports and browse server-provided prompts and resources without treating them as tool calls.
Key Capabilities & Differentiators
The interactive session combines multi-server connections and hot reload with streaming, model switching, system-prompt editing, and more than 15 model settings, including context-window and sampling controls. MCP prompts support argument collection, preview, and rollback; resources can be browsed and read. Operators can disable individual tools or entire servers during a session.
Agent mode handles successive rounds of tool calls with a configurable iteration limit. At the limit, the client pauses so the operator can extend the run, wrap up, or abort. Human-in-the-loop approval can gate individual calls before execution. Ollama is the default inference path, including support for Ollama Cloud; the any-llm integration adds providers such as OpenAI, Atlas Cloud, and OpenAI-compatible services. Non-Ollama support is experimental, so validate tool calls and streaming with the actual provider and model before relying on them.
Trade-offs & Limitations
Compared with using Ollama alone, ollmcp adds MCP discovery, execution controls, and per-server diagnostics, at the cost of configuring and maintaining separate tool servers. For teams already using Claude Code, project-scoped .mcp.json lets the clients share server definitions. Adopt ollmcp when local inference and interactive MCP inspection are the goals, not on the assumption that a compatible config file confers parity with an existing coding workflow.
Approval gates tool calls, not process startup or network access. Local STDIO commands and remote endpoints must therefore be trusted independently; prefer least-privilege access and keep credentials out of versioned .mcp.json files. Registered entries resolve as local > project > user, but an explicit source that duplicates a registered name can still open both connections even though only one remains active under that name. Local inference avoids sending model inputs to a hosted provider, but remote tools can still move data off the machine. Hosted inference trades local model compute for network dependency, provider terms, and possible usage charges.
Hardware & Deployment Guide
For local use, start Ollama (the default endpoint is http://localhost:11434), check available models with ollama list, and install into an isolated environment with uv tool install --upgrade ollmcp. uvx ollmcp is available for a trial run. Python 3.11+ is required, and STDIO servers need their own launch runtimes, such as Node.js for an npx-based server. A fully offline session requires the model and server dependencies to be present locally, and the selected tools must not rely on network services.
Use ollmcp mcp list to check registered entries, and pass --claude-desktop explicitly if you want to import that configuration. Prefer OLLMCP_API_KEY or a provider-native environment variable for hosted inference; --api-key persists the value. Server stderr and MCP log notifications go into per-run logs, with the last five runs retained. v0.34.0 introduced per-session server logging; v0.35.0 prevented a dropped capability listing from terminating the client and forwarded structuredContent from tool results with no text; v0.35.1 updated any-llm to 1.29.0.
Developers who want Ollama inference in an interactive terminal to test MCP servers, inspect prompts and resources, and approve tool calls.
You need centrally enforced tool isolation and authorization, an unattended service, or feature parity across hosted inference providers.
Quick Start & Installation
# Install ollmcp via uv uv tool install --upgrade ollmcp # or via pip pip install --upgrade ollmcp # Add an MCP server (example: playwright stdio server) ollmcp mcp add playwright -- npx @playwright/mcp@latest # Run the client (check optional flags with `ollmcp --help`) ollmcp # once running, use /help for interactive commands
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| mcp-client-for-ollama ★ | 842 | +2 | Python | MIT | Terminal MCP client for Ollama with multi-server sessions and tool approvals |
| cc-switch | 159.1k | +1.7k | Rust | MIT | Tauri desktop manager for AI coding providers, local routing, and MCP config |
| herdr | 54.1k | +871 | Rust | Apache-2.0 | Rust terminal multiplexer for persistent, multi-machine coding-agent workspaces |
| claude-code-router | 38.5k | +101 | TypeScript | MIT | Local model gateway for routing coding agents across providers |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/jonigl/mcp-client-for-ollama.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about mcp-client-for-ollama
What does ollmcp run itself, and how do I connect MCP servers?
Do I need a GPU, and what determines memory usage?
Can we self-host ollmcp for commercial use or redistribute it?
When should I choose ollmcp over Ollama alone or an existing Claude Code setup?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy