Ollama can't use MCP servers on its own. It runs the model and speaks a tool-calling API, and that's where its job ends. Something else has to connect to each MCP server, list its tools, hand them to the model, run the calls the model asks for, and feed the results back. That something is the MCP host, and picking the right one is most of the work.
We run DialMCP, a remote MCP server that places phone calls and signs people in with OAuth. We wanted to know whether a local model could drive it, so we went through every common route. This guide covers what Ollama does and doesn't do, which hosts work with it, which of them can sign in to a remote OAuth server, and the limits you'll hit with a local model. We checked everything against Ollama's GitHub repository, its documentation and each host's README on November 16, 2026. We didn't benchmark models: the Ollama bundle for our test machine wouldn't fit on its disk, so the setups below come from the docs and our own server's live metadata, not from a full local run.
Does Ollama support MCP?
No. The latest stable release, v0.40.16 (November 9, 2026), has no MCP client and no MCP server. None of the last hundred release notes mentions MCP. The feature request, issue #7865, has been open since November 27, 2024, and has 222 reactions.
What Ollama does have is tool calling. You POST to /api/chat with a tools array of JSON Schema function definitions. A capable model can answer with tool_calls instead of text. Your code runs the function, appends the result as a message with the tool role, and calls the model again. Every Ollama MCP setup is built on that hook. MCP tools already come with a name, a description and a JSON Schema for their input, so turning them into Ollama tool definitions is mostly a copy.
The model has to support tools. Ollama marks those models with a tools tag, and you can filter the library for them at ollama.com/search?c=tools. On the day we checked, qwen3, gpt-oss and llama3.2 carried it, and gemma3 didn't. If you hand tools to a model without the capability, Ollama refuses the request with an error saying the model "does not support tools".
"Ollama MCP server" means two different things
Search results mix up two setups that point in opposite directions:
- Your local model uses MCP tools. Ollama is the brain, and a host connects it to servers for files, a browser, a database or a phone. That's what most people want, and it's the rest of this guide.
- Another assistant uses your local models. Claude Desktop or Cline calls an MCP server that wraps Ollama's API, so it can list, pull or chat with your models. The best-known one is rawveg/ollama-mcp, an AGPL-3.0 server with tools such as
ollama_chatandollama_pull. It doesn't give your local model any tools.
If the terms host, client and server blur together, our MCP client vs server explainer sorts them out. In short, Ollama is neither. It's the model the host talks to.
What the host does
Whichever host you pick, it runs the same loop:
- It starts each local server as a subprocess (stdio) or connects to a remote one by URL (Streamable HTTP), signing in first if the server needs it.
- It calls
tools/listand converts each MCP tool into an Ollama function definition. - It sends the conversation and those definitions to
/api/chat. - If the reply holds
tool_calls, it runs each one withtools/call, usually after asking you, and appends the results. - It calls the model again, and repeats until the model answers in plain text or a loop limit stops it.
Ollama never sees MCP. It only sees function schemas. That's why the choice of host decides which transports, which kinds of auth and which safety checks you get. The MCP tools explainer covers what a tool definition holds and how errors come back.
Which hosts work with Ollama
| Host | Interface | Server transports | Remote server with OAuth |
|---|---|---|---|
| ollmcp (MCP Client for Ollama) 0.35.1 | Terminal UI | stdio, SSE, Streamable HTTP | Not directly; static headers only. Works through a stdio bridge such as mcp-remote. |
| Open WebUI 0.13.3 | Browser, multi-user | Streamable HTTP only (stdio through the mcpo proxy) | Yes: OAuth 2.1 with dynamic registration, or static client credentials. Admins add servers. |
Claude Code via ollama launch claude | Terminal agent | stdio, HTTP, SSE, WebSocket | Yes, through the browser sign-in in /mcp. |
Codex via ollama launch codex | Terminal agent | stdio, Streamable HTTP | Yes, with codex mcp login. |
| MCPHost | Terminal | stdio, SSE, Streamable HTTP | Archived. Its authors moved to a successor, Kit, so don't start new setups on it. |
Older tutorials, including many that still rank, are built on MCPHost. Its repository is now archived and says it "is No Longer Actively Maintained". Its last release, v0.34.0, came out on February 25, 2026. Existing installs may keep running, but bugs and spec changes won't be fixed, so a tutorial built on mcphost -m ollama:qwen2.5 is a dead end.
How to choose: ollmcp is the fastest way to try a server in a terminal, and it was built for Ollama. Open WebUI suits a team, or anyone who wants a chat window. ollama launch fits if you already like Claude Code or Codex and want to swap in a local model. LM Studio has its own MCP client, and llama.cpp's llama-server has experimental MCP support, but both run models themselves rather than through Ollama.
Setup: ollmcp with a local server
ollmcp needs Python 3.11 or newer. Install it as a uv tool, pull a model with the tools tag, and point it at a JSON file in the same mcpServers shape Claude Desktop uses:
uv tool install --upgrade ollmcp
ollama pull qwen3
ollmcp --model qwen3 --servers-json servers.json
{
"mcpServers": {
"files": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/notes"]
}
}
}
If you already have servers in Claude Desktop, pass --claude-desktop to load that config as well. Three defaults are worth knowing. Human-in-the-loop confirmation is on, so ollmcp asks before it runs each tool. The agent loop stops after 7 iterations; change that with /loop-limit. And you can switch individual tools or whole servers off from the tool menu, which matters more with a local model than it sounds (see limits below).
Setup: a remote OAuth server from a local model
Local servers are the easy case. Remote servers that sign you in with OAuth, rather than taking an API key, are where hosts split. DialMCP is one of them: its endpoint is https://mcp.dialmcp.com/mcp, there's no API key, and the first connection opens a browser to sign in and verify your phone number. A request without a token gets a 401 that points to the server's protected resource metadata, and a host that can't follow that never gets a token. Here's how each host handles it.
ollmcp, through a stdio bridge
ollmcp can send a fixed Authorization header to a remote server, but it can't run an OAuth sign-in. The workaround is mcp-remote, which runs on your machine as a stdio server and does the OAuth on the HTTP side. For DialMCP, the dialmcp-connector package wraps it with the URL filled in:
{
"mcpServers": {
"dialmcp": {
"command": "npx",
"args": ["-y", "dialmcp-connector"]
}
}
}
On the first run, a browser window opens for sign-in. Tokens are stored in plain files under ~/.mcp-auth/. The stdio leg itself has no auth, exactly as the spec intends. Our stdio docs page walks through the bridge in detail, including how to hide place_call for a read-only setup.
Open WebUI
Open WebUI has supported MCP natively since v0.6.31. An admin adds the server under Settings, then Integrations, then External Tool Servers, with the type set to MCP (Streamable HTTP) and auth set to OAuth 2.1, then clicks Register Client and saves. That mode uses dynamic client registration, which DialMCP's authorization server supports. We haven't run this pairing end to end, so treat it as the documented path rather than a tested one. Each user then connects their own account the first time they turn the tool on in a chat, and Open WebUI's docs say the grant "is stored against their account alone". For a phone tool that matters: everyone calls from their own verified number, not the admin's. Set WEBUI_SECRET_KEY before you start. Without it, the docs warn that OAuth-connected tools break every time the container restarts.
Claude Code or Codex through ollama launch
ollama launch claude starts Claude Code against Ollama's Anthropic-compatible API, and ollama launch codex does the same for Codex. The MCP side doesn't change: Claude Code uses claude mcp add --transport http dialmcp https://mcp.dialmcp.com/mcp and the sign-in under /mcp, while Codex uses codex mcp add and codex mcp login. Run /mcp in the launched session to confirm the server loaded, because the Codex launcher uses its own profile. Both of Ollama's integration pages ask for a context window of at least 64k tokens with local models. Our Claude Code and Codex guides cover each client's MCP quirks.
The limits of local models with MCP
Getting the plumbing right is the easy half. Here's what usually goes wrong after that.
The context window is smaller than you think. Ollama sets the default context by VRAM: 4k tokens under 24 GiB, 32k from 24 to 48 GiB, and 256k above that. On most laptops (anything under 24 GiB of GPU memory), that's 4k, and a system prompt plus a few servers' tool definitions can fill it before you've typed anything. When that happens the model usually doesn't fail loudly: earlier turns get trimmed, and the model can lose track of its tools. Ollama's own docs say agent and coding tasks should get "at least 64000 tokens". Set it with OLLAMA_CONTEXT_LENGTH=64000 ollama serve, or with the slider in the app, and check the CONTEXT column of ollama ps. A bigger window needs more memory, so this is also where a small machine runs out.
Fewer tools work better. Every enabled tool costs context and gives a small model one more way to pick wrong. Turn on only the servers you need for the task, and switch off tools you won't use. DialMCP is light here, with four tools, but a browser or GitHub server can bring dozens.
Small models loop. Multi-step tool use is where model size shows. In one published test by MCP Rating, Llama 3.2 3B on CPU picked the right first two tools, then repeated a three-call cycle 2,872 times with malformed arguments and never answered. Host guardrails help here, within limits. A per-call approval prompt shows you the first malformed call so you can abort, and ollmcp's loop limit stops a model that keeps coming back for more rounds. But that run produced all 8,620 calls in a single response, which a round limit doesn't catch. Keep approvals on, and watch the first few calls.
Long-running tools need polling. Some tools return a handle rather than a result. DialMCP's place_call returns a call ID as soon as it dials, and the model has to follow up with get_call (which can hold for up to 50 seconds per request when the model passes wait_seconds) until the call finishes. Its response even tells the model to poll. Larger models often follow that unprompted; smaller ones can stop after the first call and report the dial as the result. If that happens, ask for the outcome in your next message, or raise the loop limit. The tool reference describes the full lifecycle.
Ollama's API has no login. It listens on 127.0.0.1:11434 by default. If you change OLLAMA_HOST so a host on another machine can reach it, put your own authentication in front, because anyone who can reach that port can use your models.
When a local model can act in the real world
Read-only tools are forgiving. If a small model calls a search tool wrong, you just get a bad answer. Tools with side effects are not: sending an email, merging a branch or placing a phone call. The first protection is approval. Leave confirmations on for anything that acts, and pre-approve only read tools. Our MCP security guide covers the rest of the checklist.
The second protection has to live on the server, because a server can't assume its client is careful. DialMCP enforces its limits on every call no matter which model sent it. The call says it's an AI assistant and that it's recorded before it asks anything. There's one call at a time per user, 3 per hour and 10 per day, at most 2 a day to the same number, and calls start only between 8am and 9pm in the destination's time zone. Every "don't call me again" is honored permanently. A confused 4B model can waste your time, but it can't run up a pile of calls to one business. The safety page lists every rule.
Further reading
- Ollama docs: Tool calling
- Ollama docs: Context length
- ollama/ollama issue #7865: Model Context Protocol (MCP) support
- MCP Client for Ollama (ollmcp) on GitHub
- Open WebUI docs: Model Context Protocol (MCP)
- Ollama docs: Claude Code integration
- MCP Rating: Local models are ready for MCP. The servers aren't.
Try a remote MCP server that does real work. DialMCP lets Claude, ChatGPT, Codex, Cursor or VS Code place real phone calls from your own verified number and hand back a transcript and a structured outcome. Add https://mcp.dialmcp.com/mcp as a connector and sign in. US and Canada, free during launch.
FAQ
Does Ollama support MCP natively?
No. As of v0.40.16 (November 9, 2026), Ollama has no built-in MCP client or server, and the feature request, issue #7865, has been open since November 2024. Ollama provides tool calling in its chat API. A separate MCP host, such as ollmcp, Open WebUI, or Claude Code or Codex started with ollama launch, connects to the MCP servers and passes their tools to the model.
What is the best MCP client for Ollama?
For a quick test in the terminal, ollmcp: it talks to Ollama directly, supports stdio, SSE and Streamable HTTP servers, and asks before each tool call by default. For a team or a chat interface, Open WebUI, which supports remote servers with OAuth. If you already use Claude Code or Codex, ollama launch runs them on a local model. MCPHost is archived, so avoid it for new setups.
Which Ollama models can use MCP tools?
Only models with the tools capability, which Ollama shows as a tools tag in its library. When we checked, qwen3, gpt-oss and llama3.2 had it and gemma3 did not. A model without it gets an error saying it does not support tools. Give it a large context window too: Ollama recommends at least 64,000 tokens for agent work.
Can a local Ollama model use a remote MCP server that requires OAuth?
Yes, if the host can run the sign-in. Open WebUI, Claude Code and Codex handle OAuth for remote servers themselves. ollmcp only sends static headers, so run the server through a stdio bridge such as mcp-remote, which signs in on the HTTP side and stores the tokens locally.
Why does my local model ignore MCP tools?
The usual causes: the model lacks the tools capability, the context window is too small for the tool definitions (Ollama defaults to 4k tokens on machines with less than 24 GiB of VRAM), or too many tools are enabled at once. Raise the context with OLLAMA_CONTEXT_LENGTH, switch off tools you don't need, or try a larger model.