- Home
- MCP servers
- MLflow
MLflow
- python
10
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"irahulpandey-mlflowmcpserver": {
"command": "python",
"args": [
"mlflow_server.py"
],
"env": {
"LOG_LEVEL": "INFO",
"MODEL_NAME": "gpt-3.5-turbo",
"OPENAI_API_KEY": "YOUR_API_KEY",
"MLFLOW_TRACKING_URI": "http://localhost:8080",
"MLFLOW_SERVER_SCRIPT": "mlflow_server.py"
}
}
}
}You can manage and explore your MLflow tracking server with natural language queries using an MCP server. This setup lets you ask in plain English about registered models, experiments, runs, and system status, then receive direct responses powered by an intelligent interface that connects to MLflow.
How to use
Use the MLflow MCP Server with an MCP client to ask questions in natural language. You can list models, explore experiments, fetch details about a specific model, and check server status. Start the server locally, then send conversational queries through the client. The server translates your plain-English requests into MLflow actions and returns concise results.
How to install
Prerequisites you need before starting are Python 3.8 or newer and an MLflow tracking server running (default URL is http://localhost:8080). You also need an API key for the language model you will use through the MCP client.
Step 1: Set up a Python virtual environment and activate it
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Step 2: Install the required Python packages
pip install mcp[cli] langchain-mcp-adapters langchain-openai langgraph mlflow
Step 3: Configure environment variables
export OPENAI_API_KEY=your_key_here
export MLFLOW_TRACKING_URI=http://localhost:8080
export MODEL_NAME=gpt-3.5-turbo
export MLFLOW_SERVER_SCRIPT=mlflow_server.py
export LOG_LEVEL=INFO
Step 4: Run the MCP server script
python mlflow_server.py
Additional configuration and usage notes
The server exposes MLflow functionality via MCP and relies on environment variables to configure the MLflow URI and the language model. You can adjust the MLflow URI, model, and logging level as needed.
Security and troubleshooting
Keep your OpenAI API key secure and avoid exposing it in public environments. If you encounter connection issues to MLflow, verify MLFLOW_TRACKING_URI is correct and the MLflow server is reachable from the host running the MCP server. If the language model raises rate limits or latency issues, consider adjusting the MODEL_NAME or using a different OpenAI model.
Configuration and runtime example
The following example shows a minimal MCP configuration that starts the MLflow MCP server locally and includes the necessary environment settings.
{
"mcpServers": {
"mlflow_mcp": {
"type": "stdio",
"name": "mlflow_mcp",
"command": "python",
"args": ["mlflow_server.py"],
"env": [
{"name": "OPENAI_API_KEY", "value": "YOUR_API_KEY"},
{"name": "MLFLOW_TRACKING_URI", "value": "http://localhost:8080"},
{"name": "MODEL_NAME", "value": "gpt-3.5-turbo"},
{"name": "MLFLOW_SERVER_SCRIPT", "value": "mlflow_server.py"},
{"name": "LOG_LEVEL", "value": "INFO"}
]
}
}
}
Available tools
list_models
Lists all registered models in the MLflow model registry.
list_experiments
Lists all experiments in the MLflow tracking server.
get_model_details
Retrieves detailed information about a specific registered model.
get_system_info
Provides information about the MLflow tracking server and current system status.