Provides tools for interacting with locally running Ollama models, including listing available models, chatting with conversation history, generating responses from prompts, pulling new models from the registry, and deleting models from local installation.
Ollama MCP Server
An MCP (Model Context Protocol) server that provides tools to interact with Ollama models running on your local machine.
Features
List Models: Get all available Ollama models
Chat: Interactive chat with conversation history
Generate: Single prompt generation
Pull Models: Download new models from Ollama registry
Delete Models: Remove models from local installation
Prerequisites
Ollama installed and running locally
Node.js 18+ and npm
Installation
Clone or download this repository
Install dependencies:
Build the project:
Usage
Development Mode
Production Mode
Using with Claude Desktop
Add this server to your Claude Desktop configuration:
Using with Cursor
If you're using Cursor, add the server to your MCP configuration file at ~/.cursor/mcp/config.json
:
Alternatively, you can copy the ready-made config shipped with this repo:
Available Tools
ollama_list_models
Lists all available Ollama models on your system.
ollama_chat
Chat with a model using conversation history.
model
: Name of the Ollama modelmessages
: Array of message objects withrole
('system', 'user', 'assistant') andcontent
ollama_generate
Generate a response from a single prompt.
model
: Name of the Ollama modelprompt
: The input prompt
ollama_pull_model
Download a model from the Ollama registry.
model
: Name of the model to download
ollama_delete_model
Remove a model from your local installation.
model
: Name of the model to delete
Configuration
Set the OLLAMA_BASE_URL
environment variable to change the Ollama server URL (default: http://localhost:11434
).
License
MIT
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Enables interaction with locally running Ollama models through chat, generation, and model management operations. Supports listing, downloading, and deleting models while maintaining conversation history for interactive sessions.