← Back to Ollama MCP

Install Ollama MCP

Pick your client, copy the command, done.

Manual setup required. The maintainer's config contains paths only you know - edit the placeholders below before adding it to Claude Code.
1

Prepare the server locally

Run this once before adding it to Claude Code.

git clone https://github.com/JMRussas/ollama-mcp
cd ollama-mcp

Then follow the repository README for any remaining dependency or build steps.

2

Register it in Claude Code

claude mcp add ollama-mcp -- python /path/to/src/ollama_mcp/server.py

Replace any placeholder paths in the command with the real path on your machine.

Available Tools (4)

Once configured, Ollama MCP gives your AI agent access to:

ollama_generatePerforms a single-turn prompt to response generation.
promptmodel
ollama_chatFacilitates a multi-turn conversation with the model.
messagesmodel
ollama_embedGenerates embedding vectors for provided text.
textmodel
ollama_list_modelsLists all models currently available on your Ollama instances.

Try It Out

After setup, try these prompts with your AI agent:

List all the models I currently have installed in my local Ollama instance.
Generate a draft for a README file for my new project using the llama3 model.
Create an embedding vector for the following text snippet to use in my RAG pipeline.
Continue our conversation about this code snippet using the mistral model.
Prerequisites & system requirements
  • An MCP-compatible client (Claude Code, Cursor, Windsurf, Claude Desktop, or Codex)
  • Python 3.8+ with pip installed
Alternative installation methods

Setup Script

bash setup.sh
Conare · memory for coding agents

Keep this setup from going cold

Save the docs, env vars, and workflow around Ollama MCP in Conare so Claude Code, Codex, and Cursor remember it next time.

Remember this setup$npx conare@latest