Skip to main content
Glama
claude-ollama-mcp

claude-ollama-mcp

by LukeLamb

Claude Ollama

Claude DesktopからローカルのOllamaサーバーをクエリおよび管理できるようにします。インストール済みモデルのリスト表示、詳細確認、任意のローカルモデルに対するワンショットのgenerate/chat補完の実行、またはレジストリからのモデルのプル/削除を、ターミナルを開くことなくすべて実行できます。

一般的な用途:同じプロンプトに対するClaudeの回答とローカルモデルの回答の比較、量子化モデルに対する安価な一括補完の実行、またはOllamaにインポートしたカスタムトレーニングチェックポイントモデルの確認など。

要件

  • 実行中のOllamaサーバー(ollama serveまたはOllamaアプリ)。

  • デフォルトのエンドポイントは http://localhost:11434 です。別のホストやポートでOllamaを実行している場合は、Claude Desktopの拡張機能設定にある ollama_url ユーザー設定で上書きしてください。

  • npm依存関係なし — HTTP API経由の純粋なNode.js。

Related MCP server: Ollama MCP Server

インストール (Claude Desktop)

  1. Releasesページから最新の Ollama.mcpb をダウンロードします。

  2. Claude Desktopにて:Settings → Extensions → Extension Developer → Install Extension → .mcpb ファイルを選択します。

  3. (オプション)拡張機能の設定で、デフォルト以外のホスト/ポートでOllamaを実行している場合は Ollama server URL を設定します。http://localhost:11434 の場合は空欄のままにしてください。

ツール

ツール

アノテーション

目的

ollama_status

読み取り専用

ヘルスチェック + サーバーバージョン

list_models

読み取り専用

サイズ、ダイジェスト、ファミリー、パラメータサイズ、量子化を含むローカルモデル

list_running

読み取り専用

現在VRAMにロードされているモデル

show_model

読み取り専用

モデルの詳細:modelfile、パラメータ、テンプレート、機能

generate

オープンワールド

ワンショットのテキスト補完(非ストリーミング)

chat

オープンワールド

メッセージ履歴を含むチャット補完(非ストリーミング)

pull_model

オープンワールド

レジストリからモデルをダウンロード

delete_model

破壊的

ローカルにインストールされたモデルを削除

プロンプト例

「インストールされているローカルモデルは何ですか?また、現在VRAMにロードされているのはどれですか?」

「このプロンプトに対して forge:b6c1 を実行してください:''。その出力をあなたの回答と比較してください。」

「forge:b7c1 のmodelfileを見せてください。温度設定を確認したいです。」

「llama3.1:70b をプルしてください。」(大きなモデルの場合は長時間待機します)

「forge:b5c3 モデルを削除してください。もうそのチェックポイントは必要ありません。」

プライバシーポリシー

この拡張機能は完全にローカルマシン上で実行され、HTTPリクエストはOllamaサーバー(デフォルト http://localhost:11434)にのみ送信されます。ollama_url をリモートのOllamaインスタンスに明示的に設定しない限り、データがマシンから外部へ送信されることはありません。設定した場合は、プロンプトと応答がそのサーバーへ送信されます。

Claudeから見える情報は以下の通りです:

  • generate および chat に渡すすべてのプロンプトとチャットメッセージ(これらはOllamaサーバーに送信され、設定によってはログに記録される場合があります)。

  • Ollamaから返される 補完の全文。

  • インストールされているすべてのモデルのメタデータ(名前、ダイジェスト、サイズ、量子化、modelfileの内容)。

  • 現在VRAMにロードされているモデルとそのサイズ。

独自のファインチューニングモデルや機密性の高いメタデータを含むmodelfileをインストールしている場合、show_model や list_models を呼び出すとClaudeがその情報を参照することに注意してください。

delete_model は破壊的な操作であり、この拡張機能から元に戻すことはできません。誤って削除した場合は、レジストリから再プル(またはソースブロブから再インポート)する必要があります。

トラブルシューティング

「cannot reach Ollama at http://localhost:11434 — is the server running?」 — ollama serve でOllamaを起動するか、Ollamaアプリを起動してください。curl http://localhost:11434/ で確認してください(「Ollama is running」と返されるはずです)。

pull_model が長時間停止する — stream: false を使用したOllamaのpull APIは、ダウンロードが完全に完了するまでブロックされます。数GBのモデルの場合、数分かかることがあります。巨大なモデルをプルする場合は、代わりにターミナルで ollama pull <name> を実行してください。そこではストリーミングの進捗状況が表示され、その後のMCP呼び出しではモデルがインストール済みとして認識されます。

カスタム/リモートのOllamaエンドポイント — 拡張機能の設定で ollama_url を設定してください(例:http://192.168.1.42:11434)。拡張機能の再起動が必要です。

使用を停止した後も list_running にモデルが表示される — Ollamaは設定可能なTTL(デフォルト5分)の間、モデルをVRAMに保持します。expires_at タイムスタンプでアンロードされる時間がわかります。これは拡張機能ではなくOllamaの動作です。

開発

約400行の単一Node.jsスクリプトで、npm依存関係はゼロです。.mcpb を再ビルドするには:

cd bundle-source
zip -j ../Ollama.mcpb manifest.json package.json server.js README.md LICENSE icon.png glama.json

ライセンス

MIT。 LICENSE を参照してください。

関連

  • claude-terminal-mcp — シェル、ファイルシステム、バックグラウンドジョブ。

  • claude-rocm-mcp — AMD GPUモニタリング。OllamaがロードしたモデルがVRAMを飽和させているか確認するのに適しています。

  • claude-sessions-mcp — 長時間実行ジョブのためのtmuxセッション管理。

  • claude-linux-mcp — X11デスクトップ制御。

Available Tools

8 tools
chatA

Run a chat completion against a local model with message history (non-streaming). Returns the assistant's reply plus timing.

Inputs: model (required), messages (required), options.

delete_modelA
Destructive

Delete a locally-installed model. Does not affect the remote registry copy. Free the disk space of a model you no longer need.

Inputs: name (required).

generateA

Run a one-shot text completion against a local model (non-streaming). Returns the full response text plus timing and tokens/second.

Inputs: model (required), prompt (required), system, options.

list_modelsA
Read-only

List locally-installed models: name, size in bytes, digest, modified timestamp, family (e.g. llama), parameter size (e.g. 8.0B), and quantization level (e.g. Q4_K_M).

Inputs: no named parameters.

list_runningA
Read-only

List models currently loaded into VRAM with their size, VRAM footprint, and expiry timestamp. Empty list means Ollama is idle.

Inputs: no named parameters.

ollama_statusA
Read-only

Health check: whether the Ollama server is reachable and its version. Use this as a precondition before other tools if you're unsure whether Ollama is running.

Inputs: no named parameters.

pull_modelA

Download a model from the Ollama registry. Blocks until complete — can take a long time for multi-GB models. For very large pulls, prefer ollama pull in a terminal where you can watch progress.

Inputs: name (required).

show_modelA
Read-only

Show detailed information for a specific model: modelfile excerpt, parameters, template, capabilities, architecture details, quantization level.

Inputs: name (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: chat vs generate differentiate by context (with/without history); model management tools (list, pull, delete, show, list_running) are non-overlapping; ollama_status is a standalone health check. No ambiguity in roles.

    Naming Consistency4/5

    Most names follow a verb_noun pattern (e.g., delete_model, list_models, pull_model). 'chat' and 'generate' are single verbs but still actions. 'ollama_status' deviates slightly (noun_noun) but is readable. Overall consistent with minor exceptions.

    Tool Count5/5

    8 tools cover the essential operations for a local Ollama server: model management (list, pull, delete, show, list_running), two inference modes (chat, generate), and a health check. Well-scoped without bloat or deficiency.

    Completeness4/5

    Core CRUD and inference are covered, but streaming support is absent (only non-streaming provided). No tool to adjust model parameters or embeddings. Minor gaps for advanced use, but sufficient for standard workflows.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    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.
      MIT
    • A
      license
      A
      quality
      C
      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.
      6
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Exposes 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