IM

irahulpandey/mlflowmcpserver

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

11 stars 7 forks 质量 45 趋势 18

mcp server for mlflow

概览

This project provides a natural language interface to MLflow via the Model Context Protocol (MCP). It allows you to query your MLflow tracking server using plain English, making it easier to manage and explore your machine learning experiments and models. MLflow MCP Agent consists of two main components: 1. (mlflow_server.py): Connects to your MLflow tracking server and exposes MLflow functionality through the Model Context Protocol (MCP). 2. (mlflow_client.py): Provides a natural language interface to interact with the MLflow MCP Server using a conversational AI assistant. - : Ask questions about your MLflow tracking server in plain English - : Get information about your registered models - : List and explore your experiments and runs - : Get status and metadata about your MLflow environment - Python 3.

README

以下为原文 README 节选,完整内容请查看原文。

MLflow MCP Server: Natural Language Interface for MLflow

This project provides a natural language interface to MLflow via the Model Context Protocol (MCP). It allows you to query your MLflow tracking server using plain English, making it easier to manage and explore your machine learning experiments and models.

Overview

MLflow MCP Agent consists of two main components:

  1. MLflow MCP Server (mlflow_server.py): Connects to your MLflow tracking server and exposes MLflow functionality through the Model Context Protocol (MCP).

  2. MLflow MCP Client (mlflow_client.py): Provides a natural language interface to interact with the MLflow MCP Server using a conversational AI assistant.

Features

  • Natural Language Queries: Ask questions about your MLflow tracking server in plain English
  • Model Registry Exploration: Get information about your registered models
  • Experiment Tracking: List and explore your experiments and runs
  • System Information: Get status and metadata about your MLflow environment

Prerequisites

  • Python 3.8+
  • MLflow server running (default: http://localhost:8080)
  • OpenAI API key for the LLM

Installation

Installing via Smithery

To install MLflow Natural Language Interface Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @iRahulPandey/mlflowMCPServer --client claude

Manual Installation

  1. Clone this repository:

    git clone https://github.com/iRahulPandey/mlflowMCPServer.git
    cd mlflowMCPServer
    
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install the required packages:

    pip install mcp[cli] langchain-mcp-adapters langchain-openai langgraph mlflow
    
  4. Set your OpenAI API key:

    export OPENAI_API_KEY=your_key_here
    
  5. (Optional) Configure the MLflow tracking server URI:

    export MLFLOW_TRACKING_URI=http://localhost:8080
    

Usage

Starting the MCP Server

First, start the MLflow MCP server:

python mlflow_server.py

The server connects to your MLflow tracking server and exposes MLflow functionality via MCP.

Making Queries

Once the server is running, you can make natural language queries using the client:

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

Example Queries:

  • “Show me all registered models in MLflow”
  • “List all my experiments”
  • “Get details for the model named ‘iris-classifier’”
  • “What’s the status of my MLflow server?”

Configuration

You can customize the behavior using environment variables:

  • MLFLOW_TRACKING_URI: URI of your MLflow tracking server (default: http://localhost:8080)
在 GitHub 查看完整 README

安装

npx -y @smithery/cli install @iRahulPandey/mlflowMCPServer --client claude
新手?先看 mcpskill.org 教程 →