Ollama MCP Server

MCP server for Ollama - exposes all Ollama SDK functionality through MCP tools

Remote serverstreamable-httpTypeScript

What is the Ollama MCP MCP server?

Ollama mcp mcp server connects Ollama MCP to AI assistants that speak the Model Context Protocol. MCP server for Ollama - exposes all Ollama SDK functionality through MCP tools.

What Ollama MCP does

An MCP (Model Context Protocol) server that exposes the complete Ollama SDK as MCP tools, enabling seamless integration between your local LLM models and MCP-compatible applications like Claude Desktop and Cline.

Tools it exposes

Once connected, the assistant can call these 4 tools directly:

  • ollama_web_search — Search the web with customizable result limits (requires OLLAMA_API_KEY)
  • ollama_web_fetch — Fetch and parse web page content (requires OLLAMA_API_KEY)
  • Prerequisites — The Prerequisites tool exposed by this server
  • Setup — The Setup tool exposed by this server

Installing the ollama mcp mcp server

The server is distributed via npm as ollama-mcp, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

Before the server will start you need to supply 2 environment variables: OLLAMA_HOST, OLLAMA_API_KEY. Keep credentials in your client's env block or a secrets manager rather than committing them.

Requirements

  • Node.js v16+ - npm or pnpm - Ollama running locally

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Ollama MCP sits in that group, and the shape of its toolset — ollama_web_search, ollama_web_fetch, Prerequisites among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This is a hosted server — you point your client at an endpoint rather than running a local process, so there is nothing to keep updated on your machine.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • Maintained by rawveg, written in TypeScript.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the ollama mcp mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
ollama_web_searchSearch the web with customizable result limits (requires OLLAMA_API_KEY)
ollama_web_fetchFetch and parse web page content (requires OLLAMA_API_KEY)
PrerequisitesThe Prerequisites tool exposed by this server.
SetupThe Setup tool exposed by this server.

How to install the Ollama MCP MCP server

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

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js v16+ - npm or pnpm - Ollama running locally
VariableDescriptionRequired
OLLAMA_HOSTEndpoint or connection string the server talks to.Optional
OLLAMA_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Ollama MCP to ollama web search.
  • Use Ollama MCP to ollama web fetch.
  • Use Ollama MCP to Prerequisites.

Frequently asked questions

It connects Ollama MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 4 tools (ollama_web_search, ollama_web_fetch, Prerequisites, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Ollama MCP directly.