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

Related MCP Servers

  • -
    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 -
    130
    1,461
    MIT License
    • Apple
    • Linux
  • A
    security
    A
    license
    A
    quality
    Enables querying documents through a Langflow backend using natural language questions, providing an interface to interact with Langflow document Q\&A flows.
    Last updated -
    1
    14
    MIT License
    • Apple
  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol Server that enables LLMs to interact with and execute REST API calls through natural language prompts, supporting GET/PUT/POST/PATCH operations on configured APIs.
    Last updated -
    6
    Apache 2.0
  • -
    security
    F
    license
    -
    quality
    A simple application demonstrating Model Context Protocol (MCP) integration with FastAPI and Streamlit, allowing users to interact with LLMs through a clean interface.
    Last updated -
    3
    • Linux

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