Skip to main content
Glama

ollama-mcp

An MCP (Model Context Protocol) server that exposes local Ollama instances as tools for Claude Code.

Lets Claude offload code generation, drafts, embeddings, and quick questions to your local GPUs.

Setup

  1. Run the setup script:

    bash setup.sh

    This creates a venv, installs dependencies, generates a machine-specific config.json, and registers the MCP server with Claude Code.

    Note: setup.sh uses cygpath and targets Windows (Git Bash / MSYS2). On Linux/macOS, replace the cygpath -w calls with the paths directly, or register manually:

    claude mcp add ollama -s user -- /path/to/.venv/bin/python /path/to/src/ollama_mcp/server.py
  2. Restart Claude Code.

Related MCP server: Ollama MCP Server

Tools

Tool

Description

ollama_generate

Single-turn prompt → response

ollama_chat

Multi-turn conversation

ollama_embed

Generate embedding vectors

ollama_list_models

List models on your Ollama instances

Configuration

Copy config.example.json to config.json and fill in your machine details, or let setup.sh generate it interactively.

Requirements

  • Python 3.10+

  • Ollama 0.4.0+ running on at least one machine

  • Claude Code with MCP support

Development

pip install -e ".[dev]"
pytest tests/ -v

About

Extracted from a private developer infrastructure repo and published as a standalone tool. This server runs daily as part of a multi-project AI development workflow spanning game engines, RAG pipelines, and task orchestration — see mcp-rag and orchestration-engine for projects that use it.

Troubleshooting

Problem

Cause

Fix

config.json not found

Setup not run

Run bash setup.sh

404 on embed calls

Ollama < 0.4.0

Upgrade Ollama (ollama update)

Cannot connect to...

Ollama not running on target host

Start Ollama: ollama serve or check Docker

Request timed out

Large model / slow hardware

Increase timeout in config.json, or pass timeout parameter

OFFLINE in list_models

Host unreachable

Check network, firewall, Ollama port 11434

cygpath: command not found

Running setup.sh on Linux/macOS

See setup note above

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    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.
    203
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
    203
    24
    AGPL 3.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    A bridge that enables Claude Code to interact with local Ollama instances for text generation, multi-turn chat, and vision-based analysis. It supports model management tasks such as listing, pulling, and showing details, alongside generating text embeddings.
    203
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JMRussas/ollama-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server