mcp-ollama-python
Provides tools to interact with local Ollama models for chat, generation, embeddings, and model management.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-ollama-pythonChat with llama3.1 about quantum computing"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🦙 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.
What It Does
Connect your local LLMs to any MCP-compatible AI assistant. No cloud APIs needed.
Tool | What it does |
| Chat with any local model (multi-turn, tool-calling) |
| Generate text completions |
| Create vector embeddings |
| List installed models |
| Inspect model details |
| Download new models |
| Remove models |
| List running models |
Quick Start
Prerequisites: Python 3.10+, Ollama running locally
pip install mcp-ollama-pythonWindsurf / 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 |
Setup and prerequisites | |
All tools with examples | |
Environment variables, model config | |
Complete Windsurf setup guide | |
VS Code setup | |
How it works, adding tools | |
Start/stop/manage the server | |
Menu-driven management UI | |
Contributing, code quality |
License
Made with ❤️ using Python, Poetry, and Ollama
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pblagoje/mcp-ollama-python'
If you have feedback or need assistance with the MCP directory API, please join our Discord server