Ollama MCP Server
@rawveg
About Ollama MCP Server
An MCP Server for Ollama
Basic information
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.
More AI & Agents MCP servers
Gemini MCP Server
aliargunMCP server implementation for Google's Gemini API
Sequential Thinking Multi-Agent System (MAS)
FradSerAn advanced sequential thinking process using a Multi-Agent System (MAS) built with the Agno framework and served via MCP.
MCP Client for Ollama (ollmcp)
joniglHarness the power of local LLMs with this TUI MCP Client for Ollama. Featuring all core MCP primitives (tools, prompts, resources), agent mode, multi-server, model switching, streaming responses, human-in-the-loop, thinking mode, model params config, system prompts, and saved pre
Mcp Agent
lastmile-aiBuild effective agents using Model Context Protocol and simple workflow patterns
MCP-LLM Bridge
patruffBridge between Ollama and MCP servers, enabling local LLMs to use Model Context Protocol tools
Comments