Skip to content

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