Ollama MCP Server (Python)
Supercharge your AI assistant with local LLM access
A Python implementation of the Model Context Protocol (MCP) server that exposes Ollama functionality as MCP tools for Windsurf, VS Code, Cursor, Claude Desktop, and other MCP clients.
| Resource | Link |
|---|---|
| GitHub | pblagoje/mcp-ollama-python |
| PyPI | mcp-ollama-python |
| Companion VS Code extension | mcp-ollama-extension · extension docs · Marketplace |
Ecosystem
VS Code extension (optional UI)
mcp-ollama-extension
│ stdio / MCP
▼
MCP server (this project)
mcp-ollama-python
│ HTTP :11434
▼
Ollama
- This project — the MCP server. Required for all clients.
- MCP Ollama Manager — optional VS Code extension to start/stop the server, browse models, and view logs. See VS Code Integration.
Features
- 8 MCP tools — chat, generate, embed, list, show, pull, delete, ps
- Hot-swap architecture — automatic tool discovery
- Type-safe — Pydantic models and type hints
- Minimal dependencies — lightweight and fast
- Drop-in integration — Windsurf, VS Code, and other MCP clients
Quick Example
In an MCP-compatible chat:
- MCP Tool: ollama / ollama_chat — Use model llava and tell me a bed time story
- MCP Tool: ollama / ollama_chat — Use model gpt-oss and tell me a bed time story
Next Steps
- Installation Guide — Get up and running in minutes
- Available Tools — See all MCP tools
- Security — Threat model and opt-in code execution
- Windsurf Integration — Set up with Windsurf IDE
- VS Code Integration — MCP JSON config or the companion extension
- Companion Extension — How this server relates to the VS Code UI
Related
- mcp-ollama-extension — VS Code manager for this server
- Ollama — Run large language models locally