Home / MCP / Ollama MCP Server
Provides tools to manage Ollama models, run inferences, and access Ollama Cloud features from MCP clients.
Configuration
View docs{
"mcpServers": {
"ollama": {
"command": "npx",
"args": [
"-y",
"ollama-mcp"
],
"env": {
"OLLAMA_HOST": "http://127.0.0.1:11434",
"OLLAMA_API_KEY": "YOUR_API_KEY"
}
}
}
}This MCP server exposes Ollamaβs SDK as MCP tools so your local LLM models can be controlled by MCP-compatible apps like Claude Desktop and Cline. It automates tool discovery, supports cloud and local models, and lets you combine fast local inference with cloud capabilities in a single, easy-to-use endpoint.
You connect from an MCP client to the Ollama MCP Server to access a full set of tools for managing models, running inferences, and performing web-enabled operations through Ollama Cloud. Use the tools to list, inspect, pull, push, copy, and delete models; run text generation, chat, and embeddings; and perform web searches and fetches when you enable Ollama Cloud access. You can mix local and cloud models in a single server to balance privacy and connectivity, and you can integrate with Claude Desktop, Cline, and other MCP clients without writing custom adapters.
Prerequisites: you need Node.js v16 or newer and a working Ollama installation (local or cloud access). You also need npm or pnpm to install dependencies and manage packages.
Install the MCP server globally so you can run it from any project location.
npm install -g ollama-mcpList all available local models in Ollama.
Get detailed information about a specific model.
Download models from the Ollama library.
Push models to the Ollama library.
Create a copy of an existing model.
Remove models from local storage.
Create custom models from a Modelfile.
List models currently running in Ollama.
Generate text completions from a model.
Interactive chat with models, with support for tools and functions.
Generate embeddings for provided text.
Search the web via Ollama Cloud with configurable results (requires API key).
Fetch and parse web page content via Ollama Cloud (requires API key).