MLflow MCP Server
The MLflow MCP Server exposes MLflow experiment tracking and model registry operations as tools for AI assistants via the Model Context Protocol (MCP). It connects to any MLflow tracking server via the MLFLOW_TRACKING_URI environment variable and is compatible with clients like Claude Desktop, Cursor, and OpenCode.
Experiment Management:
Retrieve experiment details by ID (
get_experiment) or name (get_experiment_by_name)Search/list experiments with optional name filtering and pagination (
search_experiments)
Run Management:
Fetch full details of a run (metrics, parameters, tags) by ID (
get_run)List all runs for a given experiment with pagination (
get_experiment_runs)
Model Registry:
Search and list registered models with optional filtering and pagination (
get_registered_models)Browse model versions with filtering and pagination (
get_model_versions)Create new registered models with optional description and tags (
create_registered_model)Create new model versions from a run's artifacts (
create_model_version)Rename an existing registered model (
rename_registered_model)Assign aliases (e.g.,
champion,challenger) to model versions (set_registered_model_alias)Delete a registered model and all its versions (
delete_registered_model)Delete a specific model version (
delete_model_version)
Provides tools for interacting with MLflow experiments, runs, and registered models, enabling browsing of experiments, retrieving run details with metrics and parameters, and querying the model registry with filtering and pagination support.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MLflow MCP Server show me all experiments containing 'recommendation' in the name"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MLflow MCP Server
A Model Context Protocol (MCP) server that exposes MLflow experiment tracking and model registry operations as tools for AI assistants.
Table of Contents
Related MCP server: metaflow-mcp-server
Quickstart
The fastest way to get started is to add the server to your MCP client config. No local clone required.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"mlflow": {
"command": "uvx",
"args": ["mlflow-mcp-server"],
"env": {
"MLFLOW_TRACKING_URI": "http://localhost:5000"
}
}
}
}Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"mlflow": {
"command": "uvx",
"args": ["mlflow-mcp-server"],
"env": {
"MLFLOW_TRACKING_URI": "http://localhost:5000"
}
}
}
}OpenCode
Add to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"mlflow": {
"type": "local",
"command": ["uvx", "mlflow-mcp-server"],
"environment": {
"MLFLOW_TRACKING_URI": "http://localhost:5000"
}
}
}
}Replace http://localhost:5000 with the URL of your MLflow tracking server.
Tools
Experiment Management
Tool | Description |
| Get experiment details by ID |
| Get experiment details by name |
| List and filter experiments with optional name matching and pagination |
Run Management
Tool | Description |
| Get full run details including metrics, parameters, tags, and run type (parent/child/standalone) |
| List runs for an experiment with pagination |
Model Registry
Tool | Description |
| Search and list registered models |
| Browse model versions with filtering |
| Create a new registered model with optional description and tags |
| Create a new model version from a run's artifacts |
| Rename an existing registered model |
| Assign an alias (e.g. |
| Delete a registered model and all its versions |
| Delete a specific model version |
Example Prompts
Once configured, you can ask your AI assistant things like:
Exploring experiments and runs:
"List all experiments related to recommendation models"
"Show me the runs for experiment 12 and compare their metrics"
"Get the parameters and metrics for run abc123"
"Which runs in the fraud-detection experiment have the highest accuracy?"
Managing the model registry:
"Show me all registered models"
"Register a new model called churn-classifier with description 'Binary classifier for customer churn'"
"Create a new version of churn-classifier from run abc123"
"Set the champion alias on version 3 of churn-classifier"
"Rename the model old-name to new-name"
"Delete version 1 of churn-classifier"
Analysis and comparison:
"Compare the last 5 runs of the search-ranking experiment by NDCG and latency"
"What hyperparameters were used in the best-performing run of experiment 7?"
"List all model versions for recommendation-model and their aliases"
Configuration
Environment Variable | Default | Description |
|
| URL of the MLflow tracking server |
Installation (Development)
Prerequisites
Python 3.11+
An MLflow tracking server
Setup
git clone https://github.com/yesid-lopez/mlflow-mcp-server.git
cd mlflow-mcp-server
uv syncRunning Locally
export MLFLOW_TRACKING_URI="http://localhost:5000"
uv run -m mlflow_mcp_serverThe server communicates over stdio, which is the standard MCP transport for local tool servers.
Project Structure
mlflow_mcp_server/
├── __main__.py # Entry point
├── server.py # MCP server setup and tool registration
├── tools/
│ ├── experiment_tools.py # Experiment search and retrieval
│ ├── run_tools.py # Run details and listing
│ └── registered_models.py # Model registry CRUD operations
└── utils/
└── mlflow_client.py # MLflow client singletonAdding New Tools
Create a function in the appropriate file under
tools/.Register it in
server.py:
from mlflow_mcp_server.tools.your_module import your_function
mcp.add_tool(your_function)Linting
uv run ruff check .
uv run ruff format --check .License
MIT
Available Tools
7 toolsget_experimentC
Get experiment details
Inputs: experiment_id (required).
get_experiment_by_nameC
Get experiment details by name
Inputs: experiment_name (required).
get_experiment_runsC
Get all runs for an experiment
Inputs: experiment_id, token.
get_model_versionsD
Inputs: model_name, token.
get_registered_modelsD
Inputs: model_name, token.
get_runC
Get a run by ID
Inputs: run_id (required).
search_experimentsC
List all experiments
Inputs: name, token.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools have distinct purposes targeting different MLflow entities (experiments, runs, models), but 'get_experiment' and 'get_experiment_by_name' could cause confusion as they serve the same ultimate purpose through different lookup methods. The other tools clearly target different resources.
All tools follow a consistent verb_noun pattern with 'get_' or 'search_' prefixes, using snake_case throughout. The naming is predictable and follows a clear convention across all seven tools.
Seven tools is well-scoped for an MLflow server, covering key entities like experiments, runs, and models. The count feels appropriate—neither too sparse nor bloated—for the apparent domain scope.
The toolset provides good read/search coverage for experiments, runs, and models, but lacks any write operations (create, update, delete) or lifecycle management tools. This is a notable gap that will limit agent workflows to read-only scenarios.
Maintenance
Related MCP Connectors
Experiment tracking for coding agents: read your team's ML runs, metrics and lineage. Read-only.
Your Databricks Lakehouse in natural language: run SQL on your SQL warehouses, track long-running qu
Query your team's drift, vulnerability, and upgrade data from any AI assistant. OAuth 2.1, 51 tools.
Connects AI assistants to TrackingTime for querying time entries, projects, tasks, customers, and team data using natural language.
Related MCP Servers
- AlicenseDqualityDmaintenanceEnables AI assistants to perform MLOps workflows such as experiment tracking, model registry, dataset management, pipeline orchestration, and data lineage by wrapping DVC, MLflow, and Git.1001MIT
- AlicenseAqualityDmaintenanceEnables coding agents to interact with Metaflow workflows, including querying flows, runs, tasks, logs, and artifacts across any Metaflow backend.24Apache 2.0
- FlicenseNot gradedqualityCmaintenanceEnables natural language management of the full ML lifecycle including experiments, model registration, deployment, and pipeline orchestration through a conversational agent.-
- AlicenseNot gradedqualityDmaintenanceEnables Claude to interact with ML experiment tracking, model registries, and deployment pipelines across popular MLOps platforms like MLflow.MIT