Labsco
kkruglik logo

MLflow MCP

โ˜… 13

from kkruglik

MLflow MCP server for ML experiment tracking with advanced querying, run comparison, artifact access, and model registry.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeNeeds API keys

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 & Delete Actions: Tag, alias, register, promote, and delete runs/experiments/models
  • MCP Prompts: Built-in guided workflows for common tasks
  • Pagination: Offset-based pagination for browsing large result sets

Tools

Experiments

ToolDescription
get_experiments()List all experiments
search_experiments(filter_string, order_by, max_results)Filter and sort experiments
get_experiment_by_name(name)Get experiment by name
get_experiment_metrics(experiment_id)Discover all unique metric keys
get_experiment_params(experiment_id)Discover all unique parameter keys
get_experiment_tags(experiment_id)Discover all unique tag keys used across runs
set_experiment_tag(experiment_id, key, value)Tag an experiment
delete_experiment(experiment_id)Delete an experiment (moves to deleted stage)

Runs

ToolDescription
get_runs(experiment_id, limit, offset, order_by)List runs with full details, sorting and pagination
get_run(run_id)Get detailed run information including metrics, params, tags, artifact URI, and dataset inputs
get_parent_run(run_id)Get parent run for nested runs
query_runs(experiment_id, query, limit, offset, order_by)Filter runs, e.g. "metrics.accuracy > 0.9"
search_runs_by_tags(experiment_id, tags, limit, offset)Find runs by tag key/value
set_run_tag(run_id, key, value)Tag a run
delete_run(run_id)Delete a run (moves to deleted stage)

Metrics & Parameters

ToolDescription
get_run_metrics(run_id)Get all metrics for a run
get_run_metric(run_id, metric_name)Get full metric history with steps

Artifacts

ToolDescription
get_run_artifacts(run_id, path)List artifacts, supports browsing subdirectories
get_run_artifact(run_id, artifact_path)Download an artifact file
get_artifact_content(run_id, artifact_path)Read artifact content as text/JSON

Analysis & Comparison

ToolDescription
get_best_run(experiment_id, metric, ascending)Find best run by metric
compare_runs(experiment_id, run_ids)Side-by-side run comparison

Logged Models (MLflow 3)

ToolDescription
search_logged_models(experiment_ids, filter_string, order_by, max_results)Search logged models by metrics/params/tags
get_logged_model(model_id)Get full details of a logged model

Model Registry

ToolDescription
get_registered_models()List all registered models
get_registered_model(name)Full model details including versions and aliases
get_model_versions(model_name)Get all versions of a model
get_model_version(model_name, version)Get version details with metrics
get_model_version_by_alias(name, alias)Get version by alias, e.g. "champion"
get_latest_versions(name, stages)Get latest versions per stage
register_model(model_name, model_uri, tags)Register a model into the registry
update_model_version(name, version, description)Update version description
set_registered_model_tag(name, key, value)Tag a registered model
set_model_alias(name, alias, version)Assign an alias to a model version
delete_model_alias(name, alias)Remove an alias from a model
copy_model_version(src_model_name, src_version, dst_model_name)Promote version to another registered model
transition_model_version_stage(name, version, stage)Transition to Staging/Production/Archived (deprecated since MLflow 2.9, use aliases instead)
delete_model_version(name, version)Delete a model version
delete_registered_model(name)Delete a registered model and all its versions

Health

ToolDescription
health()Check server connectivity

Prompts

Built-in guided workflows available as slash commands in Claude:

PromptDescription
compare_runs_by_idsCompare specific runs side-by-side
find_best_runFind and analyze the best run in an experiment by metric
promote_best_modelEnd-to-end: find best model โ†’ register โ†’ tag โ†’ alias โ†’ promote
audit_mlflow_setupAudit the MLflow setup against industry best practices โ€” scores 7 categories 1โ€“10 and produces a prioritized improvement roadmap

Debugging

Use MCP Inspector to browse tools, call them with custom inputs, and inspect raw responses โ€” without involving an LLM.

Published package:

npx @modelcontextprotocol/inspector uvx mlflow-mcp

Local source:

npx @modelcontextprotocol/inspector uv run --project /path/to/mlflow-mcp mlflow-mcp

Set MLFLOW_TRACKING_URI in the Inspector's environment panel, or pass it inline:

MLFLOW_TRACKING_URI=http://127.0.0.1:5000 npx @modelcontextprotocol/inspector uvx mlflow-mcp