Skip to main content
Glama

MLflow MCP Server

by iRahulPandey

MLflow MCP サーバー: MLflow の自然言語インターフェース

このプロジェクトは、モデルコンテキストプロトコル(MCP)を介してMLflowへの自然言語インターフェースを提供します。これにより、平易な英語でMLflowトラッキングサーバーにクエリを実行できるようになり、機械学習の実験やモデルの管理と探索が容易になります。

概要

MLflow MCP エージェントは、次の 2 つの主要コンポーネントで構成されています。

  1. MLflow MCP サーバー( mlflow_server.py ): MLflow トラッキング サーバーに接続し、モデル コンテキスト プロトコル (MCP) を通じて MLflow 機能を公開します。
  2. MLflow MCP クライアント( mlflow_client.py ): 会話型 AI アシスタントを使用して MLflow MCP サーバーと対話するための自然言語インターフェースを提供します。

特徴

  • 自然言語クエリ: MLflowトラッキングサーバーについて、わかりやすい英語で質問できます。
  • モデルレジストリ探索: 登録したモデルに関する情報を取得します
  • 実験の追跡: 実験と実行の一覧と調査
  • システム情報: MLflow 環境のステータスとメタデータを取得します

前提条件

  • Python 3.8以上
  • MLflow サーバーが実行中 (デフォルト: http://localhost:8080 )
  • LLMのOpenAI APIキー

インストール

  1. このリポジトリをクローンします:
    git clone https://github.com/iRahulPandey/mlflowMCPServer.git cd mlflowMCPServer
  2. 仮想環境を作成します。
    python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
  3. 必要なパッケージをインストールします。
    pip install mcp[cli] langchain-mcp-adapters langchain-openai langgraph mlflow
  4. OpenAI API キーを設定します。
    export OPENAI_API_KEY=your_key_here
  5. (オプション) MLflow トラッキング サーバーの URI を構成します。
    export MLFLOW_TRACKING_URI=http://localhost:8080

使用法

MCPサーバーの起動

まず、MLflow MCP サーバーを起動します。

python mlflow_server.py

サーバーは MLflow トラッキング サーバーに接続し、MCP を介して MLflow 機能を公開します。

クエリの作成

サーバーが実行される場合は、クライアントを使用して自然言語クエリを実行できます。

python mlflow_client.py "What models do I have registered in MLflow?"

クエリの例:

  • 「MLflowに登録されているすべてのモデルを表示」
  • 「すべての実験を一覧表示する」
  • 「『iris-classifier』というモデルの詳細を取得する」
  • 「MLflow サーバーの状態はどうですか?」

構成

環境変数を使用して動作をカスタマイズできます。

  • MLFLOW_TRACKING_URI : MLflow トラッキング サーバーの URI (デフォルト: http://localhost:8080 )
  • OPENAI_API_KEY : OpenAI API キー
  • MODEL_NAME : 使用するOpenAIモデル(デフォルト: gpt-3.5-turbo-0125
  • MLFLOW_SERVER_SCRIPT : MLflow MCP サーバー スクリプトへのパス (デフォルト: mlflow_server.py )
  • LOG_LEVEL : ログレベル(デフォルト: INFO

MLflow MCP サーバー ( mlflow_server.py )

サーバーは MLflow トラッキング サーバーに接続し、MCP 経由で次のツールを公開します。

  • list_models : MLflowモデルレジストリに登録されているすべてのモデルを一覧表示します
  • list_experiments : MLflowトラッキングサーバー内のすべての実験を一覧表示します
  • get_model_details : 登録された特定のモデルに関する詳細情報を取得します
  • get_system_info : MLflowトラッキングサーバーとシステムに関する情報を取得します

制限事項

  • 現在、MLflow機能のサブセットのみをサポートしています
  • OpenAIモデルを使用するにはクライアントがインターネットにアクセスする必要がある
  • 複雑なMLflow操作ではエラー処理が制限される可能性があります

今後の改善

  • MLflowモデル予測のサポートを追加
  • より複雑なクエリに対する自然言語理解を向上させる
  • メトリックとパラメータの視覚化機能を追加する
  • 実行管理やアーティファクト処理などの MLflow 操作のサポート

謝辞

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

MLflow の自然言語インターフェース。これにより、ユーザーはモデル コンテキスト プロトコルを通じて平易な英語を使用して機械学習の実験とモデルを照会および管理できます。

  1. 概要
    1. 特徴
      1. 前提条件
        1. インストール
          1. 使用法
            1. MCPサーバーの起動
            2. クエリの作成
          2. 構成
            1. MLflow MCP サーバー ( mlflow_server.py )
              1. 制限事項
                1. 今後の改善
                  1. 謝辞

                    Related MCP Servers

                    • -
                      security
                      A
                      license
                      -
                      quality
                      A Model Context Protocol server that enables AI agents to query Erick Wendel's talks, blog posts, and videos across different platforms using natural language.
                      Last updated -
                      55
                      TypeScript
                      MIT License
                    • -
                      security
                      F
                      license
                      -
                      quality
                      A Model Context Protocol server that enables AI assistants to interact with Coolify instances through natural language, allowing management of servers, applications, databases, and deployments.
                      Last updated -
                      85
                      2
                      TypeScript
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A Model Context Protocol server that enables AI assistants to interact with n8n workflows through natural language, supporting actions like listing, creating, updating, executing and monitoring workflows.
                      Last updated -
                      388
                      464
                      TypeScript
                      MIT License
                      • Apple
                      • Linux
                    • -
                      security
                      F
                      license
                      -
                      quality
                      A Model Context Protocol server that allows AI assistants to interact with Prefect's workflow automation platform through natural language, enabling users to manage flows, deployments, tasks, and other Prefect resources via conversational commands.
                      Last updated -
                      4
                      Python

                    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/iRahulPandey/mlflowMCPServer'

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