Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mlflowMCPServer

MCP.Pizza Chef: iRahulPandey

The mlflowMCPServer is an MCP server that connects to MLflow tracking servers and exposes their functionality through the Model Context Protocol. It enables users to query MLflow experiments, runs, and model registries using natural language, simplifying machine learning experiment management and exploration. This server facilitates conversational AI interactions with MLflow data, making it accessible and easier to navigate for developers and data scientists.

Use This MCP server To

Query MLflow experiments and runs using natural language Explore registered MLflow models via conversational AI Retrieve system and tracking server status information Integrate MLflow data into AI workflows through MCP Simplify ML experiment management with natural language queries

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

  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)
  • OPENAI_API_KEY: Your OpenAI API key
  • MODEL_NAME: The OpenAI model to use (default: gpt-3.5-turbo-0125)
  • MLFLOW_SERVER_SCRIPT: Path to the MLflow MCP server script (default: mlflow_server.py)
  • LOG_LEVEL: Logging level (default: INFO)

MLflow MCP Server (mlflow_server.py)

The server connects to your MLflow tracking server and exposes the following tools via MCP:

  • list_models: Lists all registered models in the MLflow model registry
  • list_experiments: Lists all experiments in the MLflow tracking server
  • get_model_details: Gets detailed information about a specific registered model
  • get_system_info: Gets information about the MLflow tracking server and system

Limitations

  • Currently only supports a subset of MLflow functionality
  • The client requires internet access to use OpenAI models
  • Error handling may be limited for complex MLflow operations

Future Improvements

  • Add support for MLflow model predictions
  • Improve the natural language understanding for more complex queries
  • Add visualization capabilities for metrics and parameters
  • Support for more MLflow operations like run management and artifact handling

Acknowledgments

mlflowMCPServer FAQ

How does mlflowMCPServer connect to MLflow?
It connects directly to your MLflow tracking server and exposes its data via MCP.
Can I query MLflow models using natural language?
Yes, the server supports natural language queries for model registry exploration.
Is this server compatible with multiple LLM providers?
Yes, it works with OpenAI, Claude, Gemini, and other MCP-compatible LLMs.
What kind of MLflow data can I access?
You can access experiments, runs, model registries, and system status information.
Does mlflowMCPServer require additional client software?
It pairs with an MCP client for natural language interaction but can be accessed by any MCP client.
How secure is the connection to MLflow?
Security depends on your MLflow server setup; MCP ensures scoped and observable interactions.
Can I extend mlflowMCPServer for custom MLflow APIs?
Yes, it can be extended to expose additional MLflow functionalities via MCP.