Ollama MCP Server
@rawveg
About Ollama MCP Server
An MCP Server for Ollama
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"ollama": {
"command": "npx",
"args": [
"-y",
"ollama-mcp"
]
}
}
}Tools
13Chat with a model using conversation messages. Supports system messages, multi-turn conversations, tool calling, and generation options.
Copy a model. Creates a duplicate of an existing model with a new name.
Create a new model with structured parameters. Allows customization of model behavior, system prompts, and templates.
Delete a model from local storage. Removes the model and frees up disk space.
Generate embeddings for text input. Returns numerical vector representations.
Generate completion from a prompt. Simpler than chat, useful for single-turn completions.
List all available Ollama models installed locally. Returns model names, sizes, and modification dates.
List running models. Shows which models are currently loaded in memory.
Pull a model from the Ollama registry. Downloads the model to make it available locally.
Push a model to the Ollama registry. Uploads a local model to make it available remotely.
Show detailed information about a specific model including modelfile, parameters, and architecture details.
Fetch a web page by URL using Ollama's web fetch API. Returns the page title, content, and links. Requires OLLAMA_API_KEY environment variable.
Perform a web search using Ollama's web search API. Augments models with latest information to reduce hallucinations. Requires OLLAMA_API_KEY environment variable.
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.
Frequently asked questions
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](https://ollama.com) 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.
Basic information
More AI & Agents MCP servers

bsv.cx
Andy RoweTimestamp and verify evidence on-chain. Let your agent prove what it saw and when. bsv.cx gives an AI agent verifiable memory. Timestamp a hash of any output, archive a web page as it looked, or fetch a URL with a recei
Solon Ai
opensolonJava AI application development framework (supports LLM-tool,skill; RAG; MCP; Agent-ReAct,Team-Agent). Compatible with java8 ~ java25. It can also be embedded in SpringBoot, jFinal, Vert.x, Quarkus, and other frameworks.
🔎 GPT Researcher
assafelovicAn autonomous agent that conducts deep research on any data using any LLM providers
欢迎来到 智言平台
Shy2593666979AgentChat 是一个基于 LLM 的智能体交流平台,内置默认 Agent 并支持用户自定义 Agent。通过多轮对话和任务协作,Agent 可以理解并协助完成复杂任务。项目集成 LangChain、Function Call、MCP 协议、RAG、Memory、HITL、Skill、Milvus 和 ElasticSearch 等技术,实现高效的知识检索与工具调用,使用 FastAPI 构建高性能后端服务。

Agentery
ntlgncFree MCP for live and historical pricing for 13,000+ agents and MCPs. Never knowingly pay too much... or charge too little. Know the going rate. https://agentery.com.
Comments