Ollama MCP Server
Exposes local Ollama instances as tools for Claude Code, allowing users to offload code generation, text drafting, and embedding tasks to local GPUs. It supports multi-turn conversations and model management through the Model Context Protocol.
README
ollama-mcp
An MCP (Model Context Protocol) server that exposes local Ollama instances as tools for Claude Code.
Lets Claude offload code generation, drafts, embeddings, and quick questions to your local GPUs.
Setup
-
Run the setup script:
bash setup.shThis creates a venv, installs dependencies, generates a machine-specific
config.json, and registers the MCP server with Claude Code.Note:
setup.shusescygpathand targets Windows (Git Bash / MSYS2). On Linux/macOS, replace thecygpath -wcalls with the paths directly, or register manually:claude mcp add ollama -s user -- /path/to/.venv/bin/python /path/to/src/ollama_mcp/server.py -
Restart Claude Code.
Tools
| Tool | Description |
|---|---|
ollama_generate |
Single-turn prompt → response |
ollama_chat |
Multi-turn conversation |
ollama_embed |
Generate embedding vectors |
ollama_list_models |
List models on your Ollama instances |
Configuration
Copy config.example.json to config.json and fill in your machine details, or let setup.sh generate it interactively.
Requirements
- Python 3.10+
- Ollama 0.4.0+ running on at least one machine
- Claude Code with MCP support
Development
pip install -e ".[dev]"
pytest tests/ -v
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
config.json not found |
Setup not run | Run bash setup.sh |
| 404 on embed calls | Ollama < 0.4.0 | Upgrade Ollama (ollama update) |
Cannot connect to... |
Ollama not running on target host | Start Ollama: ollama serve or check Docker |
Request timed out |
Large model / slow hardware | Increase timeout in config.json, or pass timeout parameter |
OFFLINE in list_models |
Host unreachable | Check network, firewall, Ollama port 11434 |
cygpath: command not found |
Running setup.sh on Linux/macOS | See setup note above |
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.