New Tool Radar

Local AI

How to Connect Claude Desktop to Ollama with an MCP Server

Connect Claude Desktop to your local Ollama models through the ollama-mcp server.

Schematic illustration with three step boxes for How to Connect Claude Desktop to Ollama with an MCP Server.

The ollama-mcp server exposes Ollama’s tools through the Model Context Protocol, so Claude Desktop can list, pull and chat with your local models. It is configured in Claude Desktop’s config file with npx. This guide adds it, restarts Claude Desktop, and asks Claude to list your local models.

Before you start

  • Ollama installed and running, with at least one model pulled.
  • Claude Desktop installed, and Node.js with npx on your PATH.
  • A terminal and a text editor.

Add ollama-mcp to the Claude Desktop config

Open the Claude Desktop config file: ~/Library/Application Support/Claude/claude_desktop_config.json on macOS. Add the server entry:

{
  "mcpServers": {
    "ollama": {
      "command": "npx",
      "args": ["-y", "ollama-mcp"]
    }
  }
}

Save the file and fully quit and restart Claude Desktop so it loads the server.

Check the server loaded

In Claude Desktop, open the MCP tools list and confirm an ollama entry appears with tools such as ollama_list and ollama_chat. If it does not, check that npx is on your PATH and that Ollama is running on http://localhost:11434.

Ask Claude to list your models

Ask Claude to list your local Ollama models. It should call the ollama_list tool and show the models you pulled, with their sizes.

Worked example

Sample prompt:

List my local Ollama models and tell me which one is smallest.

With only llama3.2:3b pulled, the expected answer lists that model and says it is the smallest. If Claude answers from memory or says it cannot see your models, the MCP server did not load: check the config file and restart Claude Desktop.

Expected result

UNTESTED in this guide: no MCP server was connected while writing it. The expected result is that Claude Desktop shows the ollama tools, calls ollama_list, and lists the models you pulled.

Limitations

The ollama-mcp server is a community package, not an Ollama product: check its source before running it. It can pull, delete and create models on your machine, so only use it with a local Ollama you control. Web search tools in it need an Ollama Cloud API key, which this guide does not set up.

Sources

See all