ollama
Modern MCP server for Ollama – rebooted and actively maintained.
claude mcp add --transport stdio hyzhak-ollama-mcp-server npx ollama-mcp-server \ --env OLLAMA_HOST="Optional: customize Ollama API endpoint, defaults to http://127.0.0.1:11434"
How to use
The Ollama MCP Server provides a bridge between a local Ollama installation and the MCP ecosystem. It exposes Ollama’s local LLM capabilities through MCP tools such as pull, run, chat_completion, and create, enabling you to manage models, execute prompts, and perform multimodal interactions from MCP-enabled clients. This server is designed to behave as a drop-in replacement for OpenAI-style chat completions while keeping all model execution local to your machine for privacy and control. The integration supports vision/multimodal models by passing images alongside prompts and includes an optional think parameter for advanced reasoning when supported by the model.
To use it, run the MCP server via npx ollama-mcp-server and point your MCP configuration at it. From there, you can pull models from registries, run models with prompts, or engage in chat-style completions using familiar MCP tool calls. If you want to customize the Ollama API endpoint, set the OLLAMA_HOST environment variable to your Ollama server URL (default is http://127.0.0.1:11434). The server also offers create for building custom models from Modelfiles and supports vision-enabled prompts by supplying image paths alongside prompts.
In your MCP-enabled application, you’ll typically use the mcp.use_mcp_tool interface with server_name: "ollama" and tool_name values such as pull, run, or chat_completion. This provides a seamless workflow for model management and interactive prompts without directly wiring Ollama calls into your app.
How to install
Prerequisites
- Ollama installed locally (https://ollama.ai)
- Node.js and npm
Installation steps
- Install dependencies and build (from repository root):
npm install
npm run build
- Run the MCP server (example):
# Starts the Ollama MCP server via npx
# Ensure Ollama is running locally or adjust OLLAMA_HOST as needed
npx ollama-mcp-server
- Verify configuration
- Add to your MCP config (example given in the repository README):
{
"mcpServers": {
"ollama": {
"command": "npx",
"args": ["ollama-mcp-server"],
"env": {
"OLLAMA_HOST": "http://127.0.0.1:11434"
}
}
}
}
- Optional: run with a different Ollama endpoint by exporting OLLAMA_HOST before starting:
export OLLAMA_HOST=http://127.0.0.1:11434
Additional notes
Tips and common considerations:
- Ensure Ollama is running and accessible at the configured endpoint (default http://127.0.0.1:11434).
- The server exposes an OpenAI-compatible chat interface; use the think flag where supported by the underlying model for deeper reasoning details.
- Vision/multimodal models can accept images via imagePath or images arrays in tool arguments.
- If you encounter timeouts, adjust timeout settings in your MCP client or in the Ollama model configuration.
- The MCP server supports pulling and listing models from registries, creating custom models from Modelfiles, and running models with configurable temperature and prompts.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.