🔌

Ollama MCP

DevTools3,500

Interact with locally-running Ollama models for private AI inference and code generation.

Claude DesktopCursorWindsurfZed

Overview

Interact with locally-running Ollama models for private AI inference and code generation.

Setup

Run with npx:

npx -y @modelcontextprotocol/server-ollama

Configuration

OLLAMA_HOST environment variable (default: http://localhost:11434)

Documentation

Ollama MCP (Enhanced)

Overview

Ollama MCP provides access to locally-running Ollama models for private AI inference.

Features

  • Local model inference
  • Multiple model support
  • Streaming responses
  • Model management
  • GPU acceleration

Installation

npx -y @modelcontextprotocol/server-ollama

Configuration

Set up Ollama host:

export OLLAMA_HOST=http://localhost:11434

Pull models with: ollama pull llama3

Available Models

ModelDescription
llama3Meta Llama 3
mistralMistral 7B
gemmaGoogle Gemma
codellamaCode generation
phi3Microsoft Phi 3

Available Operations

OperationDescription
ChatSend chat messages
GenerateText generation
EmbedGenerate embeddings
List ModelsGet available models
Pull ModelDownload model

Usage Examples

Chat

{
  "action": "chat",
  "model": "llama3",
  "messages": [
    { "role": "user", "content": "Explain quantum computing" }
  ],
  "stream": true
}

Generate

{
  "action": "generate",
  "model": "llama3",
  "prompt": "Write a Python function to calculate factorial"
}

Embed

{
  "action": "embed",
  "model": "llama3",
  "input": ["Hello world", "AI is amazing"]
}

Pros

  • ✅ Fully local and private
  • ✅ No API costs
  • ✅ GPU acceleration
  • ✅ Model variety

Cons

  • ❌ Requires local Ollama
  • ❌ Hardware requirements
  • ❌ Model download time

Resources