- Home
- MCP servers
- MCP Server Ollama
MCP Server Ollama
- python
13
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"vincentf305-mcp-server-ollama": {
"command": "python",
"args": [
"-m",
"src.mcp_server.server"
],
"env": {
"PYTHONPATH": "path-to-mcp-server"
}
}
}
}This MCP Server lets Claude Desktop talk to an Ollama LLM server by speaking the Model Control Protocol. It runs locally and exposes a simple, well-defined interface that your MCP client can use to send requests and receive responses from Ollama through the MCP layer.
How to use
Start the MCP server locally so your MCP client can connect to it. Then configure your client to point at this local MCP endpoint and use the standard MCP workflow to send requests and receive responses from Ollama.
Run the MCP server using Python. The server is started as a module, and you must provide the runtime path to the server code via PYTHONPATH so Python can locate the MCP implementation.
{
"mcpServers": {
"ollama-server": {
"command": "python",
"args": ["-m", "src.mcp_server.server"],
"env": {
"PYTHONPATH": "path-to-mcp-server"
}
}
}
}
How to install
Prerequisites: you need Python installed on your system and a working network setup to communicate with Ollama if it runs remotely or locally.
Clone the MCP server repository and set up the environment. Then install the required Python packages.
git clone <repository-url>
cd <repository-name>
cp .env.example .env
pip install -r requirements.txt
Additional notes
The config snippet above shows how to integrate the MCP server with Claude Desktop. Replace path-to-mcp-server with the actual filesystem path to where you keep this MCP server code.
If you need to adjust environment variables or startup behavior, edit the .env file and/or the mcpServers configuration accordingly.
Security and maintenance
Keep the Python runtime and dependencies up to date by periodically running pip install -r requirements.txt in a controlled environment. Never expose the MCP server to untrusted networks without proper access controls.