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.
Описание
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
Supercharge your AI assistant with local LLM access, run powerful AI models right on your own computer, no internet required.
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.
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 |
| Security | Threat model, host validation, opt-in execute |
Security (v1.0.8)
ollama_executeis opt-in — setOLLAMA_EXECUTE_ENABLED=1; shell/bash removedOLLAMA_HOSTvalidation — loopback by default; setOLLAMA_ALLOW_REMOTE_HOST=1for LAN/remote Ollama- No HTTP redirects — reduces SSRF risk toward internal endpoints
Details: docs/SECURITY.md
Changelog
1.0.8
- Security hardening: host validation, execute tool gating, env allowlist, input limits
- Fixed
__version__mismatch with package version - Added
tests/test_security.pyanddocs/SECURITY.md
License
Made with ❤️ using Python, Poetry, and Ollama
Установка Ollama Python
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/pblagoje/mcp-ollama-pythonFAQ
Ollama Python MCP бесплатный?
Да, Ollama Python MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Ollama Python?
Нет, Ollama Python работает без API-ключей и переменных окружения.
Ollama Python — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Ollama Python в Claude Desktop, Claude Code или Cursor?
Открой Ollama Python на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Gmail
Read, send and search emails from Claude
автор: GoogleSlack
Send, search and summarize Slack messages
автор: SlackRunbear
No-code MCP client for team chat platforms, such as Slack, Microsoft Teams, and Discord.
Discord Server
A community discord server dedicated to MCP by [Frank Fiegel](https://github.com/punkpeye)
Compare Ollama Python with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории communication
