Skip to main content
Glama

Ollama MCP Server

by NightTrek

Ollama MCP サーバー

🚀 Ollama とモデルコンテキストプロトコル (MCP) 間の強力なブリッジであり、Ollama のローカル LLM 機能を MCP 対応アプリケーションにシームレスに統合できます。

🌟 特徴

Ollamaとの完全な統合

  • 完全なAPIカバレッジ:クリーンなMCPインターフェースを通じてOllamaのすべての重要な機能にアクセスできます
  • OpenAI 互換チャット: OpenAI のチャット補完 API の代替
  • ローカルLLMパワー:完全な制御とプライバシーを確保しながらAIモデルをローカルで実行

コア機能

  • 🔄モデル管理
    • レジストリからモデルを取得する
    • モデルをレジストリにプッシュする
    • 利用可能なモデルの一覧
    • モデルファイルからカスタムモデルを作成する
    • モデルのコピーと削除
  • 🤖モデルの実行
    • カスタマイズ可能なプロンプトでモデルを実行する
    • システム/ユーザー/アシスタントの役割を持つチャット完了 API
    • 設定可能なパラメータ(温度、タイムアウト)
    • 直接応答のためのRawモードのサポート
  • 🛠サーバーコントロール
    • Ollama サーバーの起動と管理
    • 詳細なモデル情報を見る
    • エラー処理とタイムアウト管理

🚀 はじめに

前提条件

  • システムにOllamaがインストールされている
  • Node.js と npm/pnpm

インストール

  1. 依存関係をインストールします:
pnpm install
  1. サーバーを構築します。
pnpm run build

構成

サーバーを MCP 構成に追加します。

Claude Desktopの場合:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "ollama": { "command": "node", "args": ["/path/to/ollama-server/build/index.js"], "env": { "OLLAMA_HOST": "http://127.0.0.1:11434" // Optional: customize Ollama API endpoint } } } }

🛠 使用例

モデルをプルして実行する

// Pull a model await mcp.use_mcp_tool({ server_name: "ollama", tool_name: "pull", arguments: { name: "llama2" } }); // Run the model await mcp.use_mcp_tool({ server_name: "ollama", tool_name: "run", arguments: { name: "llama2", prompt: "Explain quantum computing in simple terms" } });

チャット補完(OpenAI対応)

await mcp.use_mcp_tool({ server_name: "ollama", tool_name: "chat_completion", arguments: { model: "llama2", messages: [ { role: "system", content: "You are a helpful assistant." }, { role: "user", content: "What is the meaning of life?" } ], temperature: 0.7 } });

カスタムモデルを作成する

await mcp.use_mcp_tool({ server_name: "ollama", tool_name: "create", arguments: { name: "custom-model", modelfile: "./path/to/Modelfile" } });

🔧 詳細設定

  • OLLAMA_HOST : カスタム Ollama API エンドポイントを設定します (デフォルト: http://127.0.0.1:11434 )
  • モデル実行のタイムアウト設定(デフォルト: 60秒)
  • 応答ランダム性の温度制御(0~2の範囲)

🤝 貢献する

貢献を歓迎します!お気軽にどうぞ:

  • バグを報告する
  • 新機能を提案する
  • プルリクエストを送信する

📝 ライセンス

MIT ライセンス - ご自身のプロジェクトで自由にご利用ください。


MCP エコシステムのために ❤️ を込めて構築

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

Ollama のローカル LLM 機能を MCP ベースのアプリケーションにシームレスに統合できるブリッジ。これにより、ユーザーは完全な API カバレッジを使用して AI モデルをローカルで管理および実行できます。

  1. 🌟 特徴
    1. Ollamaとの完全な統合
    2. コア機能
  2. 🚀 はじめに
    1. 前提条件
    2. インストール
    3. 構成
  3. 🛠 使用例
    1. モデルをプルして実行する
    2. チャット補完(OpenAI対応)
    3. カスタムモデルを作成する
  4. 🔧 詳細設定
    1. 🤝 貢献する
      1. 📝 ライセンス

        Related MCP Servers

        • -
          security
          A
          license
          -
          quality
          Enables seamless integration between Ollama's local LLM models and MCP-compatible applications, supporting model management and chat interactions.
          Last updated -
          165
          47
          TypeScript
          AGPL 3.0
        • -
          security
          F
          license
          -
          quality
          A generic Model Context Protocol framework for building AI-powered applications that provides standardized ways to create MCP servers and clients for integrating LLMs with support for Ollama and Supabase.
          Last updated -
          TypeScript
        • -
          security
          F
          license
          -
          quality
          A server that enables seamless integration between local Ollama LLM instances and MCP-compatible applications, providing advanced task decomposition, evaluation, and workflow management capabilities.
          Last updated -
          1
          Python
          • Apple
        • A
          security
          A
          license
          A
          quality
          A Model Context Protocol server that loads multiple OpenAPI specifications and exposes them to LLM-powered IDE integrations, enabling AI to understand and work with your APIs directly in development tools like Cursor.
          Last updated -
          7
          292
          7
          TypeScript
          MIT License

        View all related MCP servers

        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/NightTrek/Ollama-mcp'

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