MCP.so
Sign In

Ollama MCP Server

@rawveg

About Ollama MCP Server

An MCP Server for Ollama

Basic information

Category

AI & Agents

License

AGPL-3.0

Runtime

node

Transports

stdio

Publisher

rawveg

Config

Add this server to your MCP-compatible client using the configuration below.

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

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is Ollama MCP Server?

An MCP (Model Context Protocol) server that exposes the complete Ollama SDK as MCP tools, enabling seamless integration between local LLM models and MCP-compatible applications like Claude Desktop and Cline. It's for developers and AI users who want to control Ollama from any MCP client.

How to use Ollama MCP Server?

Install via npm (npm install -g ollama-mcp or npx -y ollama-mcp), then add it to your MCP client's configuration (e.g., Claude Desktop's claude_desktop_config.json or Cline's cline_mcp_settings.json). Set environment variables OLLAMA_HOST (default http://127.0.0.1:11434) and optionally OLLAMA_API_KEY for cloud features. Run the server via the configured command; tools are automatically discovered.

Key features of Ollama MCP Server

  • 14 tools covering model management, operations, and web utilities
  • Hot-swap architecture for automatic tool discovery
  • Zero external dependencies – minimal footprint
  • Hybrid mode: use local and cloud models simultaneously
  • Web search and fetch tools via Ollama Cloud (requires API key)
  • Type-safe implementation with TypeScript and Zod validation

Use cases of Ollama MCP Server

  • Chat with local or cloud models directly from your MCP client
  • Generate embeddings for text with ollama_embed
  • Search the web and fetch page content using Ollama Cloud
  • Manage Ollama models: list, pull, push, copy, delete, and create custom models
  • Integrate LLM capabilities into AI assistant workflows in VS Code (Cline) or desktop apps

FAQ from Ollama MCP Server

What is the difference between this MCP server and the Ollama SDK?

The Ollama SDK is a programmatic library. This MCP server wraps that SDK as reusable tools that any MCP-compatible application (e.g., Claude Desktop, Cline) can invoke without writing custom integration code.

What are the runtime requirements?

Node.js v16+, npm or pnpm, and a running Ollama instance (either locally at http://127.0.0.1:11434 or via Ollama Cloud with an API key). No other dependencies are needed.

Where does my data go?

All local model operations stay on your machine. If you configure OLLAMA_HOST to https://ollama.com and provide an API key, web search and fetch requests are sent to Ollama's cloud servers. No local model data is uploaded unless you explicitly push a model.

How do I configure it for cloud vs local?

Set OLLAMA_HOST to your local Ollama URL (default http://127.0.0.1:11434) for local use, or to https://ollama.com for cloud. The OLLAMA_API_KEY is required for cloud features. A hybrid configuration (local host + cloud API key) enables both local models and cloud web tools.

Does the server handle retries and errors?

Yes. Web tools (ollama_web_search, ollama_web_fetch) automatically retry up to 3 times on HTTP 429, 500, 502, 503, and 504 errors. It respects the Retry-After header and falls back to exponential backoff with jitter. Each request times out after 30 seconds.

Comments

More AI & Agents MCP servers