Ollama MCP Server
Provides tools for interacting with a local Ollama instance, enabling text generation, multi-turn chat, vision-based image analysis, model management (listing, showing details, pulling), and text embedding generation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Ollama MCP Serverlist my available local models"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Ollama MCP Server
A bridge to use Ollama as an MCP server from Claude Code.
Features
ollama_generate: Single-turn text generation (supports vision models with image input)
ollama_chat: Multi-turn chat conversations (supports vision models with image input)
ollama_list: List available models
ollama_show: Show model details
ollama_pull: Download models
ollama_embeddings: Generate text embeddings
Supported Vision Models
llava- General-purpose vision modelllama3.2-vision- Meta's multimodal modeldeepseek-ocr- OCR-specialized vision model
Related MCP server: Ollama MCP Server
Prerequisites
Ollama installed and running
# Install Ollama (macOS) brew install ollama # Start Ollama server ollama serveAt least one model downloaded
ollama pull llama3.2
Installation
cd ollama-mcp-server
npm install
npm run buildClaude Code Configuration
Method 1: Using CLI (Recommended)
# Add to local scope (current project)
claude mcp add --transport stdio ollama -- node /path/to/ollama-mcp-server/dist/index.js
# Add to user scope (all projects)
claude mcp add --transport stdio ollama --scope user -- node /path/to/ollama-mcp-server/dist/index.jsTo add environment variables:
claude mcp add --transport stdio ollama \
--env OLLAMA_BASE_URL=http://localhost:11434 \
-- node /path/to/ollama-mcp-server/dist/index.jsMethod 2: Manual Configuration
Project scope (.mcp.json in project root):
{
"mcpServers": {
"ollama": {
"command": "node",
"args": ["/path/to/ollama-mcp-server/dist/index.js"],
"env": {
"OLLAMA_BASE_URL": "http://localhost:11434"
}
}
}
}User scope (~/.claude.json):
{
"mcpServers": {
"ollama": {
"command": "node",
"args": ["/path/to/ollama-mcp-server/dist/index.js"],
"env": {
"OLLAMA_BASE_URL": "http://localhost:11434"
}
}
}
}Verify Installation
# List configured MCP servers
claude mcp list
# Inside Claude Code
/mcpAuto-approve Tool Calls (Optional)
By default, Claude Code asks for confirmation each time an Ollama tool is called. To skip confirmations, add the following to ~/.claude/settings.json:
{
"permissions": {
"allow": [
"mcp__ollama__ollama_generate",
"mcp__ollama__ollama_chat",
"mcp__ollama__ollama_list",
"mcp__ollama__ollama_show",
"mcp__ollama__ollama_pull",
"mcp__ollama__ollama_embeddings"
]
}
}Environment Variables
Variable | Default | Description |
|
| Ollama server URL |
Usage Examples
From Claude Code:
List Models
List available Ollama modelsText Generation
Generate "3 features of Rust" using Ollama's llama3.2 modelChat
I'd like to have Ollama do a code reviewVision / Image Analysis
Analyze this image using llava: /path/to/image.jpgUse deepseek-ocr to extract text from this document: /path/to/document.pngTroubleshooting
Cannot connect to Ollama
# Check if Ollama is running
curl http://localhost:11434/api/tags
# If not running
ollama serveNo models available
ollama pull llama3.2MCP server not showing up
# Verify server is registered
claude mcp list
# Check server health
claude mcp get ollamaLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA bridge that allows Claude to communicate with locally running LLM models via LM Studio, enabling users to leverage their private models through Claude's interface.169MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to delegate coding tasks to local Ollama models, reducing API token usage by up to 98.75% while leveraging local compute resources. Supports code generation, review, refactoring, and file analysis with Claude providing oversight and quality assurance.358 npm25AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceExposes local Ollama instances as tools for Claude Code, allowing users to offload code generation, text drafting, and embedding tasks to local GPUs. It supports multi-turn conversations and model management through the Model Context Protocol.MIT
- AlicenseAqualityCmaintenanceLets Claude query and manage a local Ollama server — list models, inspect them, run generate/chat completions, pull or delete models.8MIT