Client For Ollama

Data and AIAgent frameworks and SDKs

Harness the power of local LLMs with this TUI MCP Client for Ollama. Featuring all core MCP primitives (tools, prompts, resources), agent mode, multi-server, model switching, streaming responses, human-in-the-loop, thinking mode, model params config, system prompts, and saved preferences.

Your AI app calls the Client For Ollama MCP server, which does the data and AI and agent frameworks and SDKs work and sends the result back to the chat.

About Client For Ollama

Client For Ollama is a community MCP server from jonigl, filed in our directory under data and ai and agent frameworks and sdks. Harness the power of local LLMs with this TUI MCP Client for Ollama. Featuring all core MCP primitives (tools, prompts, resources), agent mode, multi-server, model switching, streaming responses, human-in-the-loop, thinking mode, model params config, system prompts, and saved preferences.

Client For Ollama runs on your own machine: your AI app starts it with the command npx -y @playwright/mcp and talks to it over standard input and output.

At a glance

Publisher
jonigl (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @playwright/mcp
Written in
Python
License
MIT
GitHub stars
842

How to set up Client For Ollama

  1. Install Node.js on the machine that runs your AI app, because Client For Ollama starts with npx and downloads its package on first run.
  2. Check the Client For Ollama README for keys or settings; the registry lists none that Client For Ollama requires.
  3. Add Client For Ollama to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Client For Ollama tools to confirm the connection.
  5. Run one read-only task with Client For Ollama first, and keep your app asking before each tool call until the results look right.

Client For Ollama compared with similar servers

  • Wax by christopherkarani has fewer GitHub stars than Client For Ollama (816 against 842); both are community servers, and both run locally.
  • Agenticos by vstorm-co has more GitHub stars than Client For Ollama (961 against 842); both are community servers, and both run locally.
  • Context Portal by GreatScottyMac has fewer GitHub stars than Client For Ollama (767 against 842); both are community servers, and both run locally.

Before you connect Client For Ollama

  • Give Client For Ollama its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Client For Ollama tool call until you trust what it does with them.
  • Treat text that Client For Ollama fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Client For Ollama on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Client For Ollama

How marketing and sales teams put Client For Ollama to work, by company size. Pick the size closest to yours and start Client For Ollama on one use case.

Small business

  • A small team can use Client For Ollama to clean and enrich a lead list or a spreadsheet in one pass, instead of hours of copy and paste.
  • Owners can ask Client For Ollama to sort feedback, reviews or survey answers into themes and see what customers mention most.
  • A small business with a developer can use Client For Ollama to build one focused agent, such as lead follow-up, without a big platform.
  • Client For Ollama runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing ops can connect Client For Ollama to enrich and score inbound leads, so sales sees fit and intent before the first call.
  • Content and research teams can use Client For Ollama to analyze transcripts and surveys at scale and pull the quotes worth using.
  • Growth engineering teams can use Client For Ollama to build agents that combine CRM, analytics and content tools behind one workflow.
  • Start Client For Ollama on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can run Client For Ollama inside their own cloud and data boundary, so models and data stay where governance requires.
  • Large teams can use Client For Ollama in batch pipelines with evaluation and logging, so AI output is measured before it reaches customers.
  • Enterprises can build on Client For Ollama with their own identity, policy and evaluation layers, so agents meet the same bar as other software.
  • Client For Ollama is a community server, so have security review the code and pin a version before Client For Ollama touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Client For Ollama README

From jonigl/mcp-client-for-ollama on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

A simple yet powerful Python client for interacting with Model Context Protocol (MCP) servers using Ollama, allowing you to harness local LLMs for advanced tool execution.

English | 简体中文 | Español

MCP Client for Ollama (ollmcp)

Sponsored by

Learn how to use Atlas Cloud with ollmcp in the Sponsors section

🎥 Watch this demo as an Asciinema recording

Table of Contents

  • Overview
  • Features
  • Requirements
  • Quick Start
  • Installation Options
  • Troubleshooting
  • ✨NEW Managing MCP Servers via CLI
    • mcp add options
    • Scopes
    • Command-line Arguments
      • MCP Server Configuration
      • ✨NEW Inference Provider Configuration
      • General Options
    • ✨NEW Supported Inference Providers
      • API key resolution order
    • Usage Examples
    • How Tool Calls Work
    • Agent Mode
  • Interactive Commands
    • MCP Tools
    • MCP Prompts
    • MCP Resources
    • ✨NEW Answer Display Modes
    • Input Mode
    • Model Selection
    • Advanced Model Configuration
    • ✨NEW Thinking Mode and Reasoning Effort
    • Server Reloading for Development
    • Human-in-the-Loop (HIL) Tool Execution
      • Human-in-the-Loop (HIL) Configuration
    • Performance Metrics
    • History Management
  • Autocomplete and Prompt Features
    • Typer Shell Autocompletion
    • FZF-style Autocomplete
    • MCP Prompts Autocomplete
    • Contextual Prompt
  • Configuration Management
    • ✨NEW Per-provider profiles
  • Server Configuration Format
    • Tips: Where to Put MCP Server Configs and a Working Example
  • Compatible Models
    • Ollama Cloud Models
  • ✨NEW Sponsors
    • Atlas Cloud
    • Become a sponsor
  • Where Can I Find More MCP Servers?
  • Related Projects
  • Security
  • License
  • Acknowledgments

Overview

MCP Client for Ollama (ollmcp) is a modern, interactive terminal application (TUI) built for harness engineering, connecting local Ollama LLMs to one or more Model Context Protocol (MCP) servers. By fully supporting the core MCP primitives (tools, prompts, and resources), it provides a controlled terminal space where you steer, and the agent executes. With a rich, user-friendly interface, it lets you safely manage your setup in real time with no coding required. Whether you're building, testing, or exploring, this client streamlines your workflow with features like fuzzy autocomplete, advanced model configuration, MCP server hot-reloading for rapid development, and strict Human-in-the-Loop safety controls.

Features

  • 🤖 Agent Mode: Iterative tool execution when models request multiple tool calls, with a configurable loop limit and interactive choices when the limit is reached (continue, wrap up, or abort)
  • 🌐 Multi-Server Support: Connect to multiple MCP servers simultaneously
  • 🚀 Multiple Transport Types: Supports STDIO, SSE, and Streamable HTTP server connections
  • 📋 MCP Prompts Support: Browse, invoke, and manage prompts from MCP servers with argument collection, preview, and safe rollback
  • 📦 MCP Resources Support: Browse and read contextual data from MCP servers including files, documents, and structured data
  • ☁️ Ollama Cloud Support: Works seamlessly with Ollama Cloud models for tool calling, enabling access to powerful cloud-hosted models while using local MCP tools
  • 🌍 Multiple LLM Providers: Use Ollama (default) or OpenAI-compatible providers (OpenAI, OpenRouter, DeepSeek, etc.), with connection settings remembered per provider
  • 🎨 Rich Terminal Interface: Interactive console UI with modern styling
  • 🌊 Streaming Responses: View model outputs in real-time as they're generated
  • 📝 Answer Display Modes: Switch between Plain, Markdown, Both, or Markdown (blocks) response views while streaming
  • 🛠️ Tool Management: Enable/disable specific tools or entire servers during chat sessions
  • 🧑‍💻 Human-in-the-Loop (HIL): Review and approve tool executions before they run for enhanced control and safety
  • 🎮 Advanced Model Configuration: Fine-tune 15+ model parameters including context window size, temperature, sampling, repetition control, and more
  • 💬 System Prompt Customization: Define and edit the system prompt to control model behavior and persona
  • 🧠 Context Window Control: Adjust the context window size (num_ctx) to handle longer conversations and complex tasks
  • 🎨 Enhanced Tool Display: Beautiful, structured visualization of tool executions with JSON syntax highlighting
  • 🧠 Context Management: Control conversation memory with configurable retention settings
  • 🤔 Thinking Mode: Advanced reasoning capabilities with visible thought processes for supported models (e.g., gpt-oss, deepseek-r1, qwen3, etc.)
  • 💪 Reasoning Effort Levels: Set reasoning effort to auto, minimal, low, medium, high, or xhigh for supported models
  • 🖼️ Vision Tool Support: Images returned by tools are automatically forwarded to vision-capable models
  • 🗣️ Cross-Language Support: Seamlessly work with both Python and JavaScript MCP servers
  • 📜 History Management: View full conversation history, export to JSON for backup/analysis, and import previous sessions for continuity
  • 🔍 Auto-Discovery: Automatically find and use Claude's existing MCP server configurations
  • 🔁 Dynamic Model Switching: Switch between any installed Ollama model without restarting
  • 💾 Configuration Persistence: Save and load tool preferences and model settings between sessions
  • 🔄 Server Reloading: Hot-reload MCP servers during development without restarting the client
  • ✨ Fuzzy Autocomplete: Interactive, arrow-key command autocomplete with descriptions
  • 🏷️ Dynamic Prompt: Shows current model, thinking mode, and enabled tools
  • 📊 Performance Metrics: Detailed model performance data after each query, including duration timings and token counts
  • 🔌 Plug-and-Play: Works immediately with standard MCP-compliant tool servers
  • 🔔 Update Notifications: Automatically detects when a new version is available
  • 🖥️ Modern CLI with Typer: Grouped options, shell autocompletion, and improved help output
  • ⏹️ Abort Generation: You can abort model generation at any time by pressing 'a' during response streaming

Requirements

  • Python 3.11+ (Installation guide)
  • Ollama running locally (Installation guide)
    • After installation, run ollama list to see available models. If no models are installed, you can pull one using ollama pull <model_name>. For example, ollama pull gemma4:latest.
  • UV package manager (Installation guide)

Quick Start

Install ollmcp via pip, add an MCP server, and run the client:

# 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

Installation Options

Option 1: Install with uv and run (recommended)

uv tool install --upgrade ollmcp
ollmcp

Option 2: Install with pip and run

pip install --upgrade ollmcp
ollmcp

Option 3: Only run without installing (requires uv package manager)

uvx ollmcp

Option 4: Install from source and run using virtual environment

git clone https://github.com/jonigl/mcp-client-for-ollama.git
cd mcp-client-for-ollama
uv run -m mcp_client_for_ollama

Troubleshooting

Could not find a version that satisfies the requirement ollmcp (from versions: none)

This almost always means the Python you are using is older than the required 3.11+. This is common on macOS, where the system Python (/usr/bin/python3) or the Xcode-bundled Python can be 3.9 or older. When no release matches requires-python >= 3.11, pip filters out every version and reports the misleading "from versions: none".

First check your version:

python3 --version   # must be 3.11 or newer

Then install with a modern Python. The simplest option is uv, which fetches a suitable Python for you automatically:

uv tool install --upgrade ollmcp   # recommended, installs the CLI in an isolated environment
# or, if you prefer pip, make sure to use a Python 3.11+ interpreter:
python3.11 -m pip install --upgrade ollmcp
# Then run the client:
ollmcp

Take a look at the Installation Options.

error: externally-managed-environment (PEP 668)

On recent Debian/Ubuntu (Python 3.12+), the system pip is intentionally locked to protect OS-managed packages, so pip install ollmcp is blocked. This is a system policy (PEP 668), not an issue with ollmcp. Install it into an isolated environment instead:

uv tool install --upgrade ollmcp   # recommended, installs the CLI in an isolated environment
# or, if you prefer pip, use a virtual environment:
python3.11 -m venv ollmcp-env
source ollmcp-env/bin/activate
python3.11 -m pip install --upgrade ollmcp
# Then run the client:
ollmcp

Take a look at the Installation Options.

[!WARNING] Avoid pip install --break-system-packages ollmcp. It works, but it installs into the system Python and can break packages your OS depends on.

Managing MCP Servers via CLI

ollmcp can manage its own MCP server configurations directly from the command line, similar to claude mcp:

# Remote servers (Streamable HTTP or SSE)
ollmcp mcp add --transport http <name> <url>
ollmcp mcp add --transport sse <name> <url>

# Local stdio servers - everything after `--` is the command to run
ollmcp mcp add [options] <name> -- <command> [args...]

# List configured servers
ollmcp mcp list

# Remove a server
ollmcp mcp remove <name>

# For more details on options and usage, run:
ollmcp mcp --help
ollmcp mcp add --help

Examples:

[!TIP] Once you have added some servers, simply running ollmcp will connect to them automatically.

ollmcp mcp add --transport http github https://api.githubcopilot.com/mcp/ --header "Authorization: Bearer $YOUR_GITHUB_PAT"
ollmcp mcp add --transport stdio playwright npx @playwright/mcp@latest
ollmcp mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /allowed-dir1 ~/allowed-dir2 # stdio transport by default
ollmcp mcp add --env API_KEY=YOUR_KEY --transport sse my-sse-server http://localhost:8000/sse
mcp add options
  • --transport, -t: stdio (default), sse, or http.
  • --header, -H: HTTP header as "Name: Value" for sse/http servers. Repeatable.
  • --env, -e: Environment variable as KEY=value for stdio servers. Repeatable.
  • --scope, -s: Where to store the server (see scopes below). Default: local.
Scopes
Scope Loads in Shared with team Stored in
local Current project only No ~/.config/ollmcp/mcp.local.json (keyed by project path)
project Current project only Yes (via VCS) .mcp.json in the project root
user All your projects No ~/.config/ollmcp/mcp.json

The project scope writes a standard .mcp.json file at your project root, compatible with Claude Code and other MCP-aware tools. If the same server name exists in multiple scopes, precedence is local > project > user.

[!NOTE] Servers added via ollmcp mcp add are always loaded as the base layer. Any flags (--mcp-server, --mcp-server-url, --servers-json, --claude-desktop) add on top. To include servers from Claude Desktop, pass --claude-desktop explicitly.

If a server with the same name is also provided via one of those flags, both connections are currently opened, but only one is kept active under that name. Avoid reusing a registry server's name in --mcp-server/--mcp-server-url/--servers-json/--claude-desktop.

Command-line Arguments

[!TIP] The CLI now uses Typer for a modern experience: grouped options, rich help, and built-in shell autocompletion. Advanced users can use short flags for faster commands. To enable autocompletion, run:

ollmcp --install-completion

Then restart your shell or follow the printed instructions.

MCP Server Configuration:
  • --mcp-server, -s: Path to one or more MCP server scripts (.py or .js). Can be specified multiple times.
  • --mcp-server-url, -u: URL to one or more SSE or Streamable HTTP MCP servers. Can be specified multiple times. See Common MCP endpoint paths for typical endpoints.
  • --servers-json, -j: Path to a JSON file with server configurations. See Server Configuration Format for details.
  • --claude-desktop: Load servers from Claude Desktop's config file (~/Library/Application Support/Claude/claude_desktop_config.json). Merged with servers added via ollmcp mcp add and any other flags.

[!IMPORTANT] Breaking change: --auto-discovery / -a has been replaced by --claude-desktop. Additionally, servers added via ollmcp mcp add are now always loaded automatically, they are no longer a fallback that disappears when other flags are used. Claude Desktop servers are never loaded automatically; use --claude-desktop to include them.

Inference Provider Configuration:
  • --model, -m MODEL: Model to use. Default: your saved configuration's model if set, otherwise the first model available in Ollama
  • --provider, -p PROVIDER: LLM provider to use (e.g. ollama, openai, atlascloud, openrouter, deepseek). Default: ollama
  • --host, -H HOST: LLM host / API base URL. Defaults to Ollama's http://localhost:11434 for the ollama provider, or the provider's own default endpoint otherwise.
  • --api-key, -k KEY: API key for the LLM provider. Also read from the $OLLMCP_API_KEY environment variable, which is provider-agnostic (it applies to whichever provider you select with --provider). Keys passed via $OLLMCP_API_KEY are never written to the config file; only keys passed with --api-key are saved. Not needed for ollama.

[!NOTE] Currently supported providers: ollama, openai, atlascloud, and any OpenAI-compatible provider (openrouter, deepseek, perplexity, etc.). More providers coming soon.

General Options:
  • --version, -v: Show version and exit
  • --help, -h: Show help message and exit
  • --install-completion: Install shell autocompletion scripts for the client
  • --show-completion: Show available shell completion options
MCP Server Logging:

Whatever an MCP server reports is written to ~/.config/ollmcp/logs/<session>/<server>.log, one directory per run, keeping the last 5. Nothing a server prints reaches the screen unless you ask for it, otherwise it would draw over the answer being streamed.

Servers report through two channels: their stderr (only stdio servers, since a remote one runs elsewhere) and MCP log notifications (any server). Both flags only change what you see on screen, the log file gets everything either way:

written to the log file shown on screen
(no flag) everything the server sends nothing from the server
--debug everything the server sends all of it, as it arrives
--log-level LEVEL everything the server sends only notifications of LEVEL or higher
--debug --log-level LEVEL everything the server sends stderr in full + notifications of LEVEL or higher

LEVEL is one of debug, info, notice, warning, error, critical, alert, emergency.

With no flag, no level is requested at all: the server decides what it emits and all of it is recorded. --log-level filters what you see, and is also sent to the server (logging/setLevel) when it advertises the logging capability, such a server may then stop emitting the lower levels, which are missing from the file too. Servers without that capability keep sending everything and the filtering happens here.

When a server fails to connect, the error points at its log file: whatever the server printed on its way out is in there, and that is usually the real reason.

[!NOTE] What ollmcp itself reports goes to ~/.config/ollmcp/logs/<session>/ollmcp.log, next to the server files. It is written on every run, no --debug needed, and it is the file the on-screen warning points at when a response stream ends early. Work in progress: for now it records mostly provider and streaming errors, and more will be logged there over time.

Supported Inference Providers

[!WARNING] Non-Ollama providers are experimental. Support for providers other than Ollama was added recently and is still being stabilized, not everything may work correctly yet.

ollmcp works with Ollama plus any OpenAI-compatible provider that any-llm exposes. Select one with --provider. Provide the key with --api-key or $OLLMCP_API_KEY (both work for any selected provider) or via the provider's own environment variable shown below. $OLLMCP_API_KEY and the provider-native env vars are never written to disk; only a key passed with --api-key is saved to the config.

Provider (--provider) API key env var
ollama (default) - (local)
atlascloud ATLASCLOUD_API_KEY
azureopenai AZURE_OPENAI_API_KEY
dashscope DASHSCOPE_API_KEY
databricks DATABRICKS_TOKEN
deepinfra DEEPINFRA_API_KEY
deepseek DEEPSEEK_API_KEY
fireworks FIREWORKS_API_KEY
gateway GATEWAY_API_KEY
inception INCEPTION_API_KEY
llama LLAMA_API_KEY
llamacpp - (local)
llamafile - (local)
lmstudio LM_STUDIO_API_KEY
minimax MINIMAX_API_KEY
moonshot MOONSHOT_API_KEY
mzai ANY_LLM_KEY
nebius NEBIUS_API_KEY
openai OPENAI_API_KEY
openrouter OPENROUTER_API_KEY
perplexity PERPLEXITY_API_KEY
portkey PORTKEY_API_KEY
qiniu QINIU_API_KEY
sambanova SAMBANOVA_API_KEY
vllm VLLM_API_KEY
zai ZAI_API_KEY

[!NOTE] Local OpenAI-compatible servers (ollama, llamacpp, llamafile, lmstudio, vllm) typically run without an API key, point ollmcp at them with --host. Providers any-llm offers that are not OpenAI-compatible (e.g. anthropic, gemini, mistral, groq, cohere) are not supported yet.

[!WARNING] Capability detection limitation: ollmcp only reads real per-model capabilities (tools, vision, thinking) from Ollama. For every non-Ollama provider, all three capabilities are currently assumed available and shown as such in the model list and badges, so a model may be reported as supporting tools, vision, or thinking even when it doesn't. If a model lacks a capability, the provider's API will return an error when you try to use it.

API key resolution order

For the selected provider, ollmcp resolves the API key in this order, from highest to lowest precedence:

  1. The --api-key / -k flag.
  2. The $OLLMCP_API_KEY environment variable (provider-agnostic, applies to whichever provider you selected with --provider).
  3. The per-provider key saved in ~/.config/ollmcp/config.json (present only if it was once passed via --api-key).
  4. The provider's own native environment variable, detected by any-llm (e.g. OPENAI_API_KEY, OPENROUTER_API_KEY).

[!WARNING] A saved per-provider key (3) takes precedence over the provider's native environment variable (4). So if you previously saved a wrong or expired key, setting OPENAI_API_KEY (or the equivalent) alone will not override it. To fix it, either pass the correct key with --api-key, or remove the stale apiKey from that provider's profile in ~/.config/ollmcp/config.json.

Usage Examples

Simplest way to run the client:

ollmcp

[!TIP] This connects to all servers registered via ollmcp mcp add and uses the model from your saved configuration file, or the first available model in Ollama if none is saved. Pass --claude-desktop to also include servers from Claude Desktop's config.

Connect to a single server:

ollmcp --mcp-server /path/to/weather.py --model llama3.2:3b
# Or using short flags:
ollmcp -s /path/to/weather.py -m llama3.2:3b

Connect to multiple servers:

ollmcp --mcp-server /path/to/weather.py --mcp-server /path/to/filesystem.js
# Or using short flags:
ollmcp -s /path/to/weather.py -s /path/to/filesystem.js

[!TIP] If --model is not specified, the model from your saved configuration file is used; otherwise the first available model in Ollama is selected automatically (you'll be told how to pull one if none are installed).

Use a JSON configuration file:

ollmcp --servers-json /path/to/servers.json --model llama3.2:1b
# Or using short flags:
ollmcp -j /path/to/servers.json -m llama3.2:1b

[!TIP] See the Server Configuration Format section for details on how to structure the JSON file.

Use a custom Ollama host:

ollmcp --host http://localhost:22545 --servers-json /path/to/servers.json
# Or using short flags:
ollmcp -H http://localhost:22545 -j /path/to/servers.json

Use a different LLM provider (OpenAI or any OpenAI-compatible API):

ollmcp --provider openai --api-key $OPENAI_API_KEY --model gpt-5.5
# OpenAI-compatible providers (e.g. OpenRouter, DeepSeek); override the endpoint with --host if needed:
ollmcp --provider openrouter --api-key $OPENROUTER_API_KEY -m openrouter/free

[!TIP] Provider settings (model, host, API key) are remembered per provider. Once saved with /save-config, plain ollmcp resumes your last-used provider. See Configuration Management for details.

Connect to SSE or Streamable HTTP servers by URL:

ollmcp --mcp-server-url http://localhost:8000/sse --model qwen2.5:latest
# Or using short flags:
ollmcp -u http://localhost:8000/sse -m qwen2.5:latest

Connect to multiple URL servers:

ollmcp --mcp-server-url http://localhost:8000/sse --mcp-server-url http://localhost:9000/mcp
# Or using short flags:
ollmcp -u http://localhost:8000/sse -u http://localhost:9000/mcp

Mix local scripts and URL servers:

ollmcp --mcp-server /path/to/weather.py --mcp-server-url http://localhost:8000/mcp --model qwen3:1.7b
# Or using short flags:
ollmcp -s /path/to/weather.py -u http://localhost:8000/mcp -m qwen3:1.7b

Include Claude Desktop servers alongside other sources:

ollmcp --mcp-server /path/to/weather.py --mcp-server-url http://localhost:8000/mcp --claude-desktop
# Or using short flags:
ollmcp -s /path/to/weather.py -u http://localhost:8000/mcp --claude-desktop
How Tool Calls Work
  1. The client sends your query to Ollama with a list of available tools
  2. If Ollama decides to use a tool, the client:
    • Displays the tool execution with formatted arguments and syntax highlighting
    • Shows a Human-in-the-Loop confirmation prompt (if enabled) allowing you to review and approve the tool call
    • Extracts the tool name and arguments from the model response
    • Calls the appropriate MCP server with these arguments (only if approved or HIL is disabled)
    • Shows the tool response in a structured, easy-to-read format (including image and unsupported-media summaries)
    • If the tool returned images and the current model supports vision, attaches the images to the next LLM message; otherwise displays a warning
    • Sends the tool result back to Ollama
    • If in Agent Mode, repeats the process if the model requests more tool calls
  3. Finally, the client:
    • Displays the model's final response incorporating the tool results
Agent Mode

Some models may request multiple tool calls in a single conversation. The client supports an Agent Mode that allows for iterative tool execution:

  • When the model requests a tool call, the client executes it and sends the result back to the model
  • This process repeats until the model provides a final answer or reaches the configured loop limit
  • You can set the maximum number of iterations using the /loop-limit (/ll) command
  • The default loop limit is 7 to prevent infinite loops
When the loop limit is reached

Instead of silently stopping, the client pauses and asks you how to proceed:

Choice Key Description
Continue c (default) Grant another batch of iterations (same size as the current limit)
Number n Choose exactly how many more iterations to allow
Unlimited u Remove the cap and run until the model stops requesting tools
Wrap up w Ask the model to summarise what it gathered so far and produce a final answer, preserves all tool results collected before the limit
Abort a Discard the turn entirely (nothing saved to history)

[!NOTE] If you want to prevent using Agent Mode, simply set the loop limit to 1.

Agent Mode Quick Demo:

Interactive Commands

During chat, use these commands:

[!IMPORTANT] NEW: Built-in interactive commands now require a leading /.

  • Use /help, /model, /tools, /prompts, etc.
  • Bare command names like help or model are no longer executed as commands.
  • Prompt invocations also use /, with /server:prompt_name recommended to avoid collisions.
Command Shortcut Description
abort a While model is generating, abort the current response generation
/clear, /new /cc Clear conversation history and context
/cls /clear-screen Clear the terminal screen
/context /c Toggle context retention
/context-info /ci Display context statistics
/export-history /eh Export chat history to a JSON file
/full-history /fh Display all conversation history
/help /h Display help and available commands
/import-history /ih Import chat history from a JSON file
/human-in-the-loop /hil Toggle Human-in-the-Loop confirmations for tool execution
/load-config /lc Load tool and model configuration from a file
/loop-limit /ll Set maximum iterative tool-loop iterations (Agent Mode). Default: 7
/model /m List and select a different Ollama model
/model-config /mc Configure advanced model parameters and system prompt
/display-mode /dm Choose Plain, Markdown, Both, or Markdown (blocks) answer display modes
/input-mode /im Choose Single-line or Multiline chat input mode
/prompts /pr Browse and view all available MCP prompts
/server:prompt_name /prompt_name Invoke a prompt (qualified is recommended)
/resources /res Browse and view all available MCP resources
@uri - Read a specific resource by URI (e.g., @server://info)
/quit, /exit, /bye /q, Ctrl+C, or Ctrl+D Exit the client
/reload-servers /rs Reload all MCP servers with current configuration
/reset-config /rc Reset configuration to defaults (all tools enabled)
/save-config /sc Save current tool and model configuration to a file
/show-metrics /sm Toggle performance metrics display
/show-thinking /st Toggle thinking text visibility (visible by default)
/thinking-mode /tm Toggle thinking mode on supported models
/reasoning-effort /re Set reasoning effort level (auto/minimal/low/medium/high/xhigh) when thinking mode is on. Default: medium
/show-tool-execution /ste Toggle tool execution display visibility
/tools /t Open the tool selection interface
MCP Tools

The tool and server selection interface allows you to enable or disable specific tools:

  • Enter numbers separated by commas (e.g. 1,3,5) to toggle specific tools
  • Enter ranges of numbers (e.g. 5-8) to toggle multiple consecutive tools
  • Enter S + number (e.g. S1) to toggle all tools in a specific server
  • a or all - Enable all tools
  • n or none - Disable all tools
  • d or desc - Show/hide tool descriptions
  • j or json - Show detailed tool JSON schemas on enabled tools for debugging purposes
  • s or save - Save changes and return to chat
  • q or quit - Cancel changes and return to chat
MCP Prompts

MCP Prompts provide reusable, server-defined conversation starters and context templates. Servers can expose prompts with descriptions, required arguments, and pre-formatted messages that help you quickly start specific types of conversations or inject structured context into your chat.

Features
  • 📋 Browse Prompts: View all available prompts from connected servers with descriptions and argument requirements
  • ⚡️ Quick Invocation: Use slash syntax to invoke prompts (/server:prompt_name recommended)
  • 🔤 Autocomplete: Type / to see prompt suggestions with fuzzy matching
  • 📝 Argument Collection: Interactive prompts guide you through required parameters
  • 👁️ Preview: Review prompt content before injection to ensure it fits your needs
  • 🎯 Flexible Injection: Choose to execute immediately or inject-only (add to history without triggering model)
  • 🧠 Context-Aware: Automatically adapts behavior based on whether prompt ends with user or assistant message
  • 🔄 Safe Rollback: Automatic history cleanup if you abort or encounter errors
  • 💬 Text Content: Supports text-based prompt messages (image/audio/resource support coming soon)

Read the rest of the Client For Ollama README on GitHub

Questions about Client For Ollama

What is the Client For Ollama MCP server?

Harness the power of local LLMs with this TUI MCP Client for Ollama. Featuring all core MCP primitives (tools, prompts, resources), agent mode, multi-server, model switching, streaming responses, human-in-the-loop, thinking mode, model params config, system prompts, and saved preferences. Client For Ollama is maintained by jonigl on GitHub at jonigl/mcp-client-for-ollama, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Client For Ollama MCP server?

Add Client For Ollama to your AI app's MCP config with the command npx -y @playwright/mcp. In Claude Code, run claude mcp add --transport stdio client-for-ollama -- npx -y @playwright/mcp. To run Client For Ollama this way you need Node.js installed.

Does Client For Ollama need an API key?

The registry lists no required keys for Client For Ollama. Check the Client For Ollama README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Client For Ollama an official MCP server?

No. Client For Ollama is a community server maintained by jonigl. Community servers can be excellent; read the code and the open issues before you give Client For Ollama access to company data.

What license is Client For Ollama under?

Client For Ollama is released under the MIT license, according to its GitHub repository. The license covers the code of Client For Ollama; the service it connects to has its own terms.