Ollama MCP (Model Context Protocol)
@mihirrd
About Ollama MCP (Model Context Protocol)
MCP client for local ollama models
Overview
What is Ollama MCP?
Ollama MCP is a tool for connecting Ollama-based language models with external tools and services using the Model Context Protocol (MCP). It runs locally on the command line and is designed for developers who want to enable LLMs to interact with systems like Git repositories, shell commands, and other tool-enabled services.
How to use Ollama MCP?
Install Python 3.13+, clone the repository, then create a virtual environment with uv and install dependencies with uv pip install -e .. Ensure Ollama is running and at least one model is pulled locally. At startup, the application lists all locally available Ollama models and prompts you to select one. After selection, run uv run main.py to start an interactive CLI where you can ask the assistant to perform Git operations. You can extend the system by creating new tool wrappers, registering them with OllamaToolManager, and connecting to different MCP servers.
Key features of Ollama MCP
- Seamless integration between Ollama language models and MCP servers
- Support for Git operations through the MCP Git server
- Extensible tool management system for custom tools
- Interactive command-line assistant interface
- Interactive model selection from locally available Ollama models at startup
Use cases of Ollama MCP
- Automate Git workflows (commits, branches, logs) by asking the assistant in natural language
- Connect Ollama LLMs to any MCP-compatible service (databases, APIs, file systems)
- Build custom toolchains by registering new tool wrappers and MCP servers
- Interactively run shell commands or other operations through the Ollama agent
FAQ from Ollama MCP
What models does Ollama MCP support?
It supports any Ollama model pulled locally, with particular emphasis on models that support tool usage (see Ollama’s tool‑capable models). You select from a list of all installed models at startup.
What are the system requirements?
Python 3.13 or higher, MCP 1.5.0 or higher, and Ollama 0.4.7 or higher. Ollama must be installed and running with at least one model pulled locally.
How do I extend Ollama MCP with custom tools?
Create a new tool wrapper that follows the MCP tool specification, register it with the OllamaToolManager, and then connect to the relevant MCP server (e.g., via StdioServerParameters).
Does Ollama MCP require a running Ollama instance?
Yes. The application depends on Ollama being installed and running locally, and you must have at least one model pulled before starting the assistant.
Is Ollama MCP free to use?
The README does not mention pricing or licensing terms. The source code is available in a public repository, implying it is open source. Running the tool requires only your own local Ollama and Python environment.
Basic information
More Agent Frameworks MCP clients
Unified MCP Client Library
pietrozullomcp-use is the easiest way to interact with mcp servers with custom agents
Open MCP Client
copilotkitSSE-based Server and Client for
sidharthrajaramA working pattern for SSE-based MCP clients and servers
n8n-nodes-mcp-client
nerding-ion8n custom node for MCP
Systemprompt Multimodal MCP Client
ejb503A Multi-modal MCP client for voice powered agentic workflows
Comments