claude-ollama-mcp
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)
Releasesページから最新の
Ollama.mcpbをダウンロードします。Claude Desktopにて:Settings → Extensions → Extension Developer → Install Extension →
.mcpbファイルを選択します。(オプション)拡張機能の設定で、デフォルト以外のホスト/ポートでOllamaを実行している場合は
Ollama server URLを設定します。http://localhost:11434の場合は空欄のままにしてください。
ツール
ツール | アノテーション | 目的 |
| 読み取り専用 | ヘルスチェック + サーバーバージョン |
| 読み取り専用 | サイズ、ダイジェスト、ファミリー、パラメータサイズ、量子化を含むローカルモデル |
| 読み取り専用 | 現在VRAMにロードされているモデル |
| 読み取り専用 | モデルの詳細:modelfile、パラメータ、テンプレート、機能 |
| オープンワールド | ワンショットのテキスト補完(非ストリーミング) |
| オープンワールド | メッセージ履歴を含むチャット補完(非ストリーミング) |
| オープンワールド | レジストリからモデルをダウンロード |
| 破壊的 | ローカルにインストールされたモデルを削除 |
プロンプト例
「インストールされているローカルモデルは何ですか?また、現在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 toolschatA
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_modelADestructive
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_modelsARead-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_runningARead-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_statusARead-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_modelARead-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
Scored across 8 tools
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.
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.
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.
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
Related MCP Connectors
Shared notes, logs, issues and secrets for Claude, ChatGPT and local models.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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
- AlicenseBqualityDmaintenanceEnables complete local Ollama management including listing models, chatting with local LLMs, starting/stopping the server, and getting intelligent model recommendations for specific tasks through natural language commands.94MIT
- AlicenseAqualityCmaintenanceA 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.61MIT
- 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