refusal rate
Subscribe

Ollama has no built-in MCP client. How Ollama MCP setups actually work, which hosts connect local models to MCP servers, a working config, and what breaks.

[ fig. 01 — how-to ]48×5
[ fig. 01 — how-to ]16×5

Short answer

Ollama does not speak MCP. As of October 2026 its feature request for MCP support (issue #7865) is still open, and no release through v0.40.12 adds it. To use MCP servers with a local model, run an MCP host such as ollmcp, Open WebUI, Continue or LM Studio. The host lists tools from each MCP server, passes them to Ollama's tool-calling API, and executes the calls the model returns.

Native MCP in Ollama
No (issue #7865 open)
Latest Ollama checked
v0.40.12, Oct 27, 2026
Open WebUI native MCP
v0.6.31+, HTTP only
LM Studio MCP host
Since 0.3.17

Key takeaways

  1. Ollama is an inference server with a tool-calling API. It is not an MCP client, and its MCP feature request has been open since November 2024.
  2. The MCP host does the work: it connects to each server, turns MCP tools into tool schemas, runs the model's tool calls and returns the results.
  3. ollmcp is the most direct Ollama MCP client; Open WebUI, Continue and LM Studio are MCP hosts that run local models.
  4. MCPHost, the most-cited Ollama bridge, is archived and points users to its successor, Kit.
  5. Developers report loops, ignored tools and long-context failures with small models, so keep the tool list short and confirm calls.

Does Ollama support MCP natively?

No. As of October 28, 2026, Ollama has no built-in MCP client, so ollama run cannot connect to an MCP server on its own. The feature request, issue #7865, has been open since November 27, 2024, has no linked pull request, and shows no stated plan from maintainers. The release notes for v0.40.3 through v0.40.12, the latest release (October 27, 2026), don’t mention MCP.

What Ollama does have is tool calling: you POST to /api/chat with a tools array of JSON Schema function definitions, and a tool-capable model can answer with tool_calls instead of text (Ollama docs). That is the hook every Ollama MCP setup uses. A Hacker News commenter summed up the split well: Ollama “can merely run models which output instructions back to a connected system”, and a host like MCPHost does the actual MCP connection (HN, Sep 2025).

So “ollama mcp support” in practice means: pick an MCP host that knows how to talk to Ollama.

How does MCP connect to a local model?

MCP connects to a local model through a host application that sits between the MCP servers and the model. The MCP architecture docs define three roles:

  • MCP host: the AI application (an editor, a chat UI, a CLI agent). It owns the conversation and the model connection.
  • MCP client: one per server, created by the host, holding a dedicated connection.
  • MCP server: the program that exposes tools, resources and prompts, over stdio (local process) or Streamable HTTP (remote).

The spec is explicit that MCP “does not dictate how AI applications use LLMs.” The host fetches each server’s tools with tools/list, merges them into one registry, hands them to the model, and when the model emits a tool call, routes it to the right server with tools/call and puts the result back into the conversation.

With Ollama, the host translates MCP tool definitions into the tools array of Ollama’s chat API. Ollama never sees MCP; it only sees function schemas and returns tool_calls.

[ fig. 01 — How an Ollama MCP setup works. After the MCP architecture docs and Ollama's tool-calling docs ]
Ollama never talks to MCP servers. An MCP host such as ollmcp, Open WebUI, Continue or LM Studio lists tools from each MCP server, sends them to Ollama's chat API as tool schemas, runs the tool calls the model returns, and feeds the results back.

This also explains a common confusion: “Ollama MCP server” usually means something different. Most projects with that name are MCP servers that expose Ollama to another host (for example, letting Claude Desktop hand subtasks to a local model). They don’t give Ollama the ability to use tools.

Which clients can use local models with MCP servers?

Four documented hosts cover most setups; pick by where you work (terminal, browser, editor, desktop app).

HostTalks toMCP transportsNotes (from docs, Oct 2026)
ollmcpOllama directly (default http://localhost:11434)stdio, SSE, Streamable HTTPTerminal UI; tool calls need your confirmation by default; toggle tools per server
Open WebUIOllama and OpenAI-compatible APIsStreamable HTTP only (native, v0.6.31+)Admin-only; stdio servers need the mcpo proxy
ContinueAny configured model, including Ollamastdio, SSE, Streamable HTTPMCP tools work in agent mode only
LM StudioIts own runtime, not OllamaLocal and remote serversMCP host since 0.3.17; Cursor-style mcp.json
MCPHostOllama (-m ollama/<model>)stdio, remoteArchived, read-only; README points to successor Kit

Two notes on the table. MCPHost still shows up in most tutorials, but the repository is archived, so don’t build on it. And LM Studio is a separate runtime: it is the easiest desktop MCP path, but if you’re committed to Ollama, it replaces Ollama rather than fronting it. For a code-editor workflow, Continue is the one to look at; our local LLM coding agent guide covers that side.

How do you set up Ollama with an MCP server?

The shortest documented path is ollmcp, because it is built for Ollama and reads the same mcpServers JSON format most MCP servers already document. The steps below come from the ollmcp README; it needs Python 3.11+ and a running Ollama.

  1. Pull a model with tool-calling support (Ollama tags these “tools” on its model library).
  2. Install ollmcp.
  3. Describe your servers in a JSON file.
  4. Start ollmcp with that file and the model.
bash
ollama pull qwen3
uv tool install --upgrade ollmcp   # or: pip install --upgrade ollmcp

A server file mixing a local stdio server and a remote HTTP server, in the format the README documents:

json
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest"]
    },
    "internal-api": {
      "type": "streamable_http",
      "url": "http://localhost:8000/mcp",
      "headers": { "X-API-Key": "your-api-key-here" }
    }
  }
}
bash
ollmcp -j servers.json -m qwen3

Useful flags from the README: -H points at a non-default Ollama URL (a GPU box on your LAN, say), and --claude-desktop loads the servers already configured for Claude Desktop. Inside the session, /tools lets you switch individual tools or whole servers off, which matters more with local models than with hosted ones (see below). If you’d rather call Ollama from your own code through its OpenAI-compatible API, the loop is the same: list MCP tools, pass them as tools, execute tool_calls, append results.

For Open WebUI, the setup is in the admin panel (Settings > Admin > Integrations, type “MCP (Streamable HTTP)”). Its docs warn that picking the OpenAPI type for an MCP server can freeze the UI, and that stdio servers need mcpo in front, for example uvx mcpo --port 8000 --api-key "top-secret" -- <your MCP server command>.

Which local models handle MCP tool calls well?

Models trained for tool calling, and the bigger the better; the protocol doesn’t help a model that can’t pick tools. Open WebUI’s docs say it bluntly: MCP “does not improve the model’s ability to use them.” Hard benchmarks for MCP specifically are thin, so the honest answer is a set of community reports:

ModelWhat was reportedSource
Qwen3 4B (2.6 GB in Ollama)Does tool calling “reasonably well” on a MacSimon Willison, HN, May 2025
Small IBM GraniteWorked well with a SearXNG search MCP in LM StudioHN, Nov 2025
gpt-oss-20bLooped searches with the same search MCPHN, Nov 2025
Gemma 3 12BStuck in a navigation loop with Playwright MCP; other models ignored toolsHN, Jun 2025
Nemotron-9B, Qwen3-8BUsed with Ollama, Continue and MCP servers on an 8 GB VRAM laptopAuthor’s write-up, HN, Nov 2025
Qwen 3.5, Gemma 4, gpt-oss-120b“Solid at reasonable quants” when given the right data; deciding when to call tools is the weak spotHN, May 2026

These are single reports, not controlled tests, and model generations move fast. What they agree on is more useful than any one row: tool-trained models from the Qwen line show up repeatedly as working, the failures reported are loops and ignored tools rather than broken output, and the host and context setup matter as much as the weights. For model-by-model tool-calling details in Ollama, see Ollama tool calling.

What do developers report in practice?

The recurring pattern is that it works on short tasks and degrades as context grows. One developer who connects local models to MCP servers through LM Studio said they were “blown away” by the results, but that problems “creep up when you hit longer context” (HN, Oct 2025). LM Studio’s own docs warn about the same thing: some MCP servers designed for hosted models use enough tokens to overflow a local model’s context.

Practical fixes that follow from those reports and the docs:

  • Expose fewer tools. Every tool’s name, description and JSON Schema is sent with each request. Turn off servers and tools you don’t need for the task (in ollmcp, the /tools menu).
  • Raise the context window deliberately. Ollama’s context length is a setting, not a given; check it before blaming the model. Our Ollama context length guide covers the settings.
  • Watch for loops. Two of the reports above are loops (repeated navigation, repeated searches). Cap tool-call rounds in your host if it supports it, and stay in the loop for the first runs.
  • Expect rough edges in the hosts. The Gemma 3 report started with simply finding the right panel in LM Studio, and Open WebUI’s docs warn of “occasional breaking changes” while the MCP ecosystem evolves.

What are the security risks of giving a local model MCP tools?

The same as with a hosted model: a local model doesn’t make tool use safer, it only keeps your data on your machine. LM Studio’s docs warn that MCP servers “can run arbitrary code, access your local files, and use your network connection” and say never to install them from untrusted sources. The bigger risk is indirect prompt injection: a web page, issue or file the model reads through one tool can carry instructions that steer its next tool call. Keep confirmations on (ollmcp enables them by default), give servers the narrowest file and network scope they need, and read our guide to prompt injection in coding agents before wiring a model to anything with write access.

FAQ

Does Ollama have an MCP client?

No. As of October 2026, Ollama has no built-in MCP client, and feature request #7865 is still open. Use a host such as ollmcp, Open WebUI or Continue, which connects to MCP servers and calls Ollama’s tool-calling API.

What is the difference between an Ollama MCP server and an Ollama MCP client?

An Ollama MCP client (such as ollmcp) lets an Ollama model use MCP tools. An “Ollama MCP server” exposes Ollama as a tool to another host, for example so Claude Desktop can hand work to a local model. Most people searching for one want the client.

Can a local LLM use MCP?

Yes, if it supports tool calling and runs behind an MCP host. The model never speaks MCP; the host translates MCP tools into function schemas and runs the calls. Small models work for short tasks but are reported to loop or ignore tools as context grows.

What is the best local LLM for MCP?

There is no MCP-specific benchmark to settle it. Community reports favor tool-trained models, with Qwen-family models mentioned most often as working well; failures cluster around small models in long contexts. Test your own tools with confirmations on.

Does Open WebUI support MCP with Ollama?

Yes, natively since v0.6.31, but only for MCP servers over Streamable HTTP and only when added by an admin. Local stdio servers need the mcpo proxy, which exposes them as OpenAPI endpoints Open WebUI can call.

Sources (10)
  1. Model Context Protocol (MCP) support, ollama/ollama issue #7865 (opened Nov 27, 2024; open as of Oct 28, 2026)
  2. Tool calling, Ollama documentation
  3. Architecture overview, Model Context Protocol documentation (protocol version 2026-07-28)
  4. mcp-client-for-ollama (ollmcp), GitHub README
  5. MCP support, Open WebUI documentation
  6. mcpo: MCP-to-OpenAPI proxy, GitHub README
  7. MCP, Continue documentation
  8. Use MCP servers, LM Studio documentation
  9. MCPHost (archived), mark3labs GitHub README
  10. Ollama releases, GitHub (v0.40.12, Oct 27, 2026)

Keep reading

[ fig. 02 — how-to ]18×8

How does tool calling work in Ollama, and which models support it?

Nov 2, 2026 · How-to

Ollama tool calling works through the tools field on /api/chat (or /v1/chat/completions). The model returns message.tool_calls instead of text, your code runs the function, appends a role: tool message, and calls the model again until no tool_calls come back. Only models tagged tools on ollama.com support it, and most failures trace to chat templates, small context windows or client parsing.

Read
[ fig. 03 — guide ]18×8

Can a local LLM power a coding agent?

Nov 2, 2026 · Guide

Yes. A local LLM can power a coding agent when it supports tool calling, holds at least 64,000 tokens of context and follows instructions across many steps. Open models such as Qwen3.8-27B, Qwen3-Coder-Next and Devstral Small 2 document agentic scores, and Aider, OpenCode, Cline and Goose all connect to local servers. Expect it to work on focused tasks and trail hosted models on large repositories.

Read
[ fig. 04 — explainer ]18×8

How does prompt injection threaten AI coding agents, and how do you defend against it?

Nov 2, 2026 · Explainer

Prompt injection in a coding agent happens when text the agent reads, such as a README, issue, dependency output or MCP tool result, is treated as an instruction. Because the model can't reliably separate data from commands, the defense is architectural: sandbox execution, keep secrets out of reach, limit network egress, and require human approval for consequential actions. Running a local model doesn't change this.

Read