mcp-ollama-python
A Python MCP server that exposes local Ollama models as tools for AI assistants, enabling chat, generation, embeddings, and model management without cloud APIs.
README
š¦ Ollama MCP Server (Python)
Supercharge your AI assistant with local LLM access, run powerful AI models right on your own computer, no internet required.
A Python MCP server that exposes your local Ollama models as tools for AI assistants like Windsurf, VS Code, Claude Desktop, and more.
š Full Documentation
What It Does
Connect your local LLMs to any MCP-compatible AI assistant. No cloud APIs needed.
| Tool | What it does |
|---|---|
ollama_chat |
Chat with any local model (multi-turn, tool-calling) |
ollama_generate |
Generate text completions |
ollama_embed |
Create vector embeddings |
ollama_list |
List installed models |
ollama_show |
Inspect model details |
ollama_pull |
Download new models |
ollama_delete |
Remove models |
ollama_ps |
List running models |
Quick Start
Prerequisites: Python 3.10+, Ollama running locally
pip install mcp-ollama-python
Windsurf / VS Code
Add to your MCP config (mcp_config.json):
{
"mcpServers": {
"ollama": {
"command": "py",
"args": ["-m", "mcp_ollama_python"],
"disabled": false
}
}
}
Restart your editor ā done. Your AI assistant can now use local Ollama models.
Try It
Type in your AI assistant's chat:
MCP Tool: ollama / ollama_chat ā Use model llama3.1 and explain quantum computing
Key Features
- š§ 8 MCP tools ā Full Ollama SDK access
- š Hot-swap architecture ā Drop a file in
tools/, it's auto-discovered - šÆ Type-safe ā Pydantic models throughout
- š Lightweight ā Minimal dependencies, fast startup
- š Universal ā Works with any MCP client
Documentation
| Guide | Description |
|---|---|
| Installation | Setup and prerequisites |
| Available Tools | All tools with examples |
| Configuration | Environment variables, model config |
| Windsurf Integration | Complete Windsurf setup guide |
| VS Code Integration | VS Code setup |
| Architecture | How it works, adding tools |
| Server Control | Start/stop/manage the server |
| Interactive Manager | Menu-driven management UI |
| Development | Contributing, code quality |
License
<div align="center">
Made with ā¤ļø using Python, Poetry, and Ollama
</div>
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.