A Model Context Protocol (MCP) server for MLflow - enables LLMs to interact with MLflow experiments, runs, metrics, and models
Project description
MLflow MCP Server
A Model Context Protocol (MCP) server that enables LLMs to interact with MLflow tracking servers. Query experiments, analyze runs, compare metrics, manage the model registry, and promote models to production — all through natural language.
Features
- Experiment Management: List, search, and filter experiments
- Run Analysis: Query runs, compare metrics, find best performing models
- Metrics & Parameters: Get metric histories, compare parameters across runs
- Artifacts: Browse and download run artifacts
- LoggedModel Support: Search and retrieve MLflow 3 LoggedModel entities
- Model Registry: Full registry management — register, tag, alias, stage, and promote models
- Write Actions: Tag runs/experiments, assign aliases, register and promote models
- MCP Prompts: Built-in guided workflows for common tasks
- Pagination: Offset-based pagination for browsing large result sets
Installation
Using uvx (Recommended)
# Run directly without installation
uvx mlflow-mcp
# Or install globally
pip install mlflow-mcp
From Source
git clone https://github.com/kkruglik/mlflow-mcp.git
cd mlflow-mcp
uv sync
uv run mlflow-mcp
Configuration
Claude Desktop
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
{
"mcpServers": {
"mlflow": {
"command": "uvx",
"args": ["mlflow-mcp"],
"env": {
"MLFLOW_TRACKING_URI": "http://localhost:5000"
}
}
}
}
Claude Code (project-scoped)
Add .mcp.json to your project root:
{
"mcpServers": {
"mlflow": {
"command": "uvx",
"args": ["mlflow-mcp"],
"env": {
"MLFLOW_TRACKING_URI": "http://localhost:5000"
}
}
}
}
Environment Variables
MLFLOW_TRACKING_URI(required): Your MLflow tracking server URL- Examples:
http://127.0.0.1:5000,https://mlflow.company.com
- Examples:
Available Tools
Experiments
get_experiments()- List all experimentssearch_experiments(filter_string, order_by, max_results)- Filter and sort experimentsget_experiment_by_name(name)- Get experiment by nameget_experiment_metrics(experiment_id)- Discover all unique metricsget_experiment_params(experiment_id)- Discover all unique parametersset_experiment_tag(experiment_id, key, value)- Tag an experiment
Runs
get_runs(experiment_id, limit=3, offset=0, order_by=None)- Get runs with full detailsget_run(run_id)- Get detailed run informationget_parent_run(run_id)- Get parent run for nested runsquery_runs(experiment_id, query, limit=3, offset=0, order_by=None)- Filter and sort runssearch_runs_by_tags(experiment_id, tags, limit=3, offset=0)- Find runs by tagsset_run_tag(run_id, key, value)- Tag a run
Metrics & Parameters
get_run_metrics(run_id)- Get all metrics for a runget_run_metric(run_id, metric_name)- Get full metric history with steps
Artifacts
get_run_artifacts(run_id, path="")- List artifacts (supports browsing directories)get_run_artifact(run_id, artifact_path)- Download artifactget_artifact_content(run_id, artifact_path)- Read artifact content (text/json)
Analysis & Comparison
get_best_run(experiment_id, metric, ascending=False)- Find best run by metriccompare_runs(experiment_id, run_ids)- Side-by-side run comparison
Logged Models (MLflow 3)
search_logged_models(experiment_ids, filter_string, order_by, max_results)- Search logged models by metrics/params/tagsget_logged_model(model_id)- Get full details of a logged model
Model Registry
get_registered_models()- List all registered modelsget_registered_model(name)- Full model details including versions and aliasesget_model_versions(model_name)- Get all versions of a modelget_model_version(model_name, version)- Get version details with metricsget_model_version_by_alias(name, alias)- Get version by alias (e.g. "champion")get_latest_versions(name, stages)- Get latest versions per stageregister_model(model_name, model_uri, tags)- Register a model into the registryupdate_model_version(name, version, description)- Update version descriptionset_registered_model_tag(name, key, value)- Tag a registered modelset_model_alias(name, alias, version)- Assign an alias to a model versiontransition_model_version_stage(name, version, stage)- Transition to Staging/Production/Archivedcopy_model_version(src_model_name, src_version, dst_model_name)- Promote version to another registered model
Health
health()- Check server connectivity
Prompts
Built-in guided workflows available as slash commands:
compare_runs_by_ids- Compare specific runs side-by-sidefind_best_run- Find and analyze the best run in an experiment by metricpromote_best_model- End-to-end: find best model → register → tag → alias → promote
Usage Examples
Ask Claude
"Show me all experiments in MLflow"
"What are the top 5 runs by accuracy in experiment 'my-experiment'?"
"Compare runs abc123 and def456"
"Find the best model by test/recall and register it as 'my-classifier'"
"Which logged model has the highest F1 score?"
"Set the champion alias on version 3 of my-model"
"Promote my-classifier v2 to production"
Requirements
- Python >=3.10
- MLflow >=3.4.0
- Access to an MLflow tracking server
License
MIT License - see LICENSE file for details.
Contributing
Contributions welcome! Please open an issue or submit a pull request.
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mlflow_mcp-0.2.0.tar.gz.
File metadata
- Download URL: mlflow_mcp-0.2.0.tar.gz
- Upload date:
- Size: 177.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fcac3b5da983e87938e8f4b5cc71474b35da1646c0f4e9149ffd34be3b009ae
|
|
| MD5 |
4afe381dc046065c3f931d72fe54a891
|
|
| BLAKE2b-256 |
609cf753b8e0c2ca7546503b87efbcc3bbbc7843f5578001fb5e8dea952f1e21
|
Provenance
The following attestation bundles were made for mlflow_mcp-0.2.0.tar.gz:
Publisher:
python-publish.yml on kkruglik/mlflow-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlflow_mcp-0.2.0.tar.gz -
Subject digest:
1fcac3b5da983e87938e8f4b5cc71474b35da1646c0f4e9149ffd34be3b009ae - Sigstore transparency entry: 1328686947
- Sigstore integration time:
-
Permalink:
kkruglik/mlflow-mcp@570e2f18c7749d423fc7fd9666d93fd29bd7e477 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/kkruglik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@570e2f18c7749d423fc7fd9666d93fd29bd7e477 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mlflow_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mlflow_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f22cc3a362992e6ecf46f32a1e4988b96fa2f93c15356bdd93cba25fb639ab2
|
|
| MD5 |
c8c3e5be839007e792886aebc68d1d4c
|
|
| BLAKE2b-256 |
c64c14fa5d077751b1188c41feb117258e2917efbd209a6f40aac556c064062c
|
Provenance
The following attestation bundles were made for mlflow_mcp-0.2.0-py3-none-any.whl:
Publisher:
python-publish.yml on kkruglik/mlflow-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlflow_mcp-0.2.0-py3-none-any.whl -
Subject digest:
0f22cc3a362992e6ecf46f32a1e4988b96fa2f93c15356bdd93cba25fb639ab2 - Sigstore transparency entry: 1328686975
- Sigstore integration time:
-
Permalink:
kkruglik/mlflow-mcp@570e2f18c7749d423fc7fd9666d93fd29bd7e477 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/kkruglik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@570e2f18c7749d423fc7fd9666d93fd29bd7e477 -
Trigger Event:
release
-
Statement type: