Skip to main content

Model Context Protocol server that proxies local Ollama to MCP clients like Windsurf and VS Code

Project description

🦙 Ollama MCP Server (Python)

Supercharge your AI assistant with local LLM access

Python Poetry MCP License: MIT

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

MIT


Made with ❤️ using Python, Poetry, and Ollama

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_ollama_python-1.0.4.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_ollama_python-1.0.4-py3-none-any.whl (33.0 kB view details)

Uploaded Python 3

File details

Details for the file mcp_ollama_python-1.0.4.tar.gz.

File metadata

  • Download URL: mcp_ollama_python-1.0.4.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for mcp_ollama_python-1.0.4.tar.gz
Algorithm Hash digest
SHA256 1cbb7974ade40e4cb3f0bf51b8e6e01fa4a5441a2007f25ac244ccbfa7757ae6
MD5 ef847f009d15d7487eed2d7ddca9481c
BLAKE2b-256 a9ce57417644279b71ed09269b556a12f802908036a9dff15e5e43c9b6572125

See more details on using hashes here.

File details

Details for the file mcp_ollama_python-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_ollama_python-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d7a546ec12ae582385a3218e413ebbdfaa486948a257c5861d4c9794aea9bced
MD5 10f626ceafd44acb0278b225135e6f5f
BLAKE2b-256 d7f7b361a3fe863aa2636ca6b973e1abc1514d108b6dc4bd74b3039a204305f8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page