MLflow MCP Server
Supports authentication with Databricks-hosted MLflow servers via token-based auth.
Provides tools for managing MLflow experiments, runs, metrics, parameters, artifacts, logged models, and the model registry, enabling LLMs to interact with MLflow tracking servers.
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 runs from experiment 'default' with accuracy > 0.9"
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 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
Related MCP server: MLflow MCP Server
Installation
Using uvx (Recommended)
# Run directly without installation
uvx mlflow-mcp
# Or install globally
pip install mlflow-mcpFrom Source
git clone https://github.com/kkruglik/mlflow-mcp.git
cd mlflow-mcp
uv sync
uv run mlflow-mcpConfiguration
Claude Desktop
Add to your Claude Desktop config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.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"
}
}
}
}Authenticated Server
For MLflow servers with authentication, add credentials to the env block:
{
"mcpServers": {
"mlflow": {
"command": "uvx",
"args": ["mlflow-mcp"],
"env": {
"MLFLOW_TRACKING_URI": "https://mlflow.company.com",
"MLFLOW_TRACKING_USERNAME": "your-username",
"MLFLOW_TRACKING_PASSWORD": "your-password"
}
}
}
}For Databricks or token-based auth, use MLFLOW_TRACKING_TOKEN instead:
{
"mcpServers": {
"mlflow": {
"command": "uvx",
"args": ["mlflow-mcp"],
"env": {
"MLFLOW_TRACKING_URI": "https://mlflow.company.com",
"MLFLOW_TRACKING_TOKEN": "your-token"
}
}
}
}Environment Variables
Variable | Required | Description |
| Yes | MLflow tracking server URL, e.g. |
| No | HTTP Basic Auth username (MLflow built-in auth) |
| No | HTTP Basic Auth password (MLflow built-in auth) |
| No | Bearer token (Databricks or token-based setups) |
Tools
Experiments
Tool | Description |
| List all experiments |
| Filter and sort experiments |
| Get experiment by name |
| Discover all unique metric keys |
| Discover all unique parameter keys |
| Discover all unique tag keys used across runs |
| Tag an experiment |
| Delete an experiment (moves to deleted stage) |
Runs
Tool | Description |
| List runs with full details, sorting and pagination |
| Get detailed run information including metrics, params, tags, artifact URI, and dataset inputs |
| Get parent run for nested runs |
| Filter runs, e.g. |
| Find runs by tag key/value |
| Tag a run |
| Delete a run (moves to deleted stage) |
Metrics & Parameters
Tool | Description |
| Get all metrics for a run |
| Get full metric history with steps |
Artifacts
Tool | Description |
| List artifacts, supports browsing subdirectories |
| Download an artifact file |
| Read artifact content as text/JSON |
Analysis & Comparison
Tool | Description |
| Find best run by metric |
| Side-by-side run comparison |
Logged Models (MLflow 3)
Tool | Description |
| Search logged models by metrics/params/tags |
| Get full details of a logged model |
Model Registry
Tool | Description |
| List all registered models |
| Full model details including versions and aliases |
| Get all versions of a model |
| Get version details with metrics |
| Get version by alias, e.g. |
| Get latest versions per stage |
| Register a model into the registry |
| Update version description |
| Tag a registered model |
| Assign an alias to a model version |
| Remove an alias from a model |
| Promote version to another registered model |
| Transition to Staging/Production/Archived (deprecated since MLflow 2.9, use aliases instead) |
| Delete a model version |
| Delete a registered model and all its versions |
Health
Tool | Description |
| Check server connectivity |
Prompts
Built-in guided workflows available as slash commands in Claude:
Prompt | Description |
| Compare specific runs side-by-side |
| Find and analyze the best run in an experiment by metric |
| End-to-end: find best model → register → tag → alias → promote |
| Audit the MLflow setup against industry best practices — scores 7 categories 1–10 and produces a prioritized improvement roadmap |
Usage Examples
Explore experiments and runs
"Show me all experiments. Which ones were updated recently?"
"What metrics and parameters are tracked in experiment 'fraud-detection'?"
"Get the top 10 runs in 'fraud-detection' sorted by test/f1. Show me the params that differ most between the top 3."
"Find all runs tagged with model_type=lightgbm and compare their recall scores."
Analyze a training run
"Show me the full details of run abc123 — metrics, params, and artifacts."
"Plot the training loss curve for run abc123." (Claude fetches metric history and renders a chart)
"This run has a parent — show me the parent run and compare their metrics."
Find and register the best model
"Find the best logged model in experiment 'fraud-detection' by test/recall. Register it as 'fraud-classifier' with a selection_metric tag."
"Which logged model in experiments 1 and 2 has the highest F1 score on the validation set?"
"Register the model from run abc123 artifact path 'model/' as 'my-classifier'."
Manage the model registry
"Show me all versions of 'fraud-classifier' with their aliases and stages."
"Set the champion alias on version 3 of fraud-classifier."
"Update the description of fraud-classifier v3 to explain what dataset it was trained on."
"Copy fraud-classifier v3 to a separate 'fraud-classifier-prod' model as the production entry."
Audit your MLflow setup
"Audit my MLflow setup"
(Triggers the audit_mlflow_setup built-in prompt — Claude explores experiments, runs, artifacts, and the model registry, then scores each area against Google/Databricks best practices)
| Category | Score | Top Issue |
|----------------------|--------|------------------------------------------------|
| Experiment Org | 5/10 | Flat namespace, no dot-notation hierarchy |
| Parameter Logging | 7/10 | No parent-child nesting for tuning sweeps |
| Metric Logging | 6/10 | Only final values logged, no training curves |
| Tagging Strategy | 5/10 | Params duplicated as tags; stale test_tag |
| Artifact Management | 2/10 | No log_model(); artifacts on local disk |
| Model Registry | 3/10 | Duplicate prod models instead of aliases |
| Reproducibility | 3/10 | No git SHA; no mlflow.log_input() datasets |
| Mean Score | 4.4/10| |
Top 3 improvements:
1. Call log_model() and move artifact store to S3/GCS
2. Add git SHA tag + mlflow.log_input() for dataset tracking
3. Consolidate registry to one model entry with @champion aliasEnd-to-end promotion workflow
"Find the best model in 'fraud-detection' by test/recall, register it as 'fraud-classifier', tag it with the framework and problem type, and set it as champion. Ask me before copying to prod."
(This maps directly to the promote_best_model built-in prompt)
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-mcpLocal source:
npx @modelcontextprotocol/inspector uv run --project /path/to/mlflow-mcp mlflow-mcpSet 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-mcpRequirements
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
Available Tools
40 toolscompare_runsARead-only
Compare runs side-by-side with full metrics and params. Runs can be large — keep the list short.
Inputs: run_ids (required), experiment_id (required).
copy_model_versionA
Promote a model version to another registered model (MLflow 3 promotion pattern). Creates the destination model if it doesn't exist.
Args: src_model_name: Source registered model name. src_version: Source model version number. dst_model_name: Destination registered model name, e.g. 'my-model-prod'.
Examples: copy_model_version("my-model-dev", "3", "my-model-prod")
Inputs: src_version (required), dst_model_name (required), src_model_name (required).
delete_experimentADestructive
Delete an experiment and all its runs. Moves to the 'deleted' lifecycle stage — not shown in UI or queries, but recoverable via the MLflow API.
Args: experiment_id: The experiment ID to delete.
Inputs: experiment_id (required).
delete_model_aliasADestructive
Remove an alias from a registered model (e.g. revoke 'champion'). The alias is permanently removed; the model version itself is not affected.
Args: name: Name of the registered model. alias: Alias to remove, e.g. 'champion', 'production'.
Inputs: name (required), alias (required).
delete_model_versionADestructive
Delete a specific model version from the registry. Irreversible — the version and its metadata cannot be recovered.
Args: name: Name of the registered model. version: Version number to delete.
Inputs: name (required), version (required).
delete_registered_modelADestructive
Delete an entire registered model and all its versions. Irreversible — all versions, aliases, and tags are permanently removed.
Args: name: Name of the registered model to delete.
Inputs: name (required).
delete_runADestructive
Delete a run. Moves it to the 'deleted' lifecycle stage — not shown in UI or queries, but recoverable via the MLflow API.
Args: run_id: The run ID to delete.
Inputs: run_id (required).
get_artifact_contentBRead-only
Read and return artifact content (for text/json files)
Inputs: run_id (required), artifact_path (required). Returns: result
get_best_runARead-only
Get the best run by a specific metric (e.g., highest accuracy, lowest loss). Works with metrics containing special characters like '/' (e.g., 'trading/total_profit')
Inputs: metric (required), experiment_id (required), ascending.
get_experiment_by_nameBRead-only
Get experiment details by name (more convenient than ID)
Inputs: name (required).
get_experiment_metricsARead-only
Get all unique metric names used across all runs in an experiment
Inputs: experiment_id (required). Returns: result
get_experiment_paramsARead-only
Get all unique parameter names used across all runs in an experiment
Inputs: experiment_id (required). Returns: result
get_experimentsBRead-only
Get all experiments
Inputs: no named parameters. Returns: result
get_experiment_tagsBRead-only
Get all unique tag keys used across all runs in an experiment
Inputs: experiment_id (required). Returns: result
get_latest_versionsARead-only
Get latest model versions for each stage (e.g. 'Staging', 'Production').
Args: name: Name of the registered model. stages: List of stages to filter by, e.g. ['Production', 'Staging']. If None, returns latest version for all stages.
Inputs: name (required), stages. Returns: result
get_logged_modelARead-only
Get detailed information about a specific logged model by its ID.
Args: model_id: The logged model ID (obtained from search_logged_models results).
Inputs: model_id (required).
get_model_versionARead-only
Get specific model version details (metrics, stage, run_id)
Inputs: version (required), model_name (required).
get_model_version_by_aliasARead-only
Get a model version by its alias (e.g. 'champion', 'production').
Args: name: Name of the registered model. alias: The alias assigned to the version, e.g. 'champion'.
Inputs: name (required), alias (required).
get_model_versionsCRead-only
Get all versions of a registered model
Inputs: model_name (required). Returns: result
get_parent_runARead-only
Get the parent run of a nested run. Returns None if the run has no parent.
Args: run_id: The child run ID to find the parent for.
Inputs: run_id (required). Returns: result
get_registered_modelARead-only
Get full details of a registered model including all versions and aliases. Can be large for models with many versions.
Args: name: Name of the registered model.
Inputs: name (required).
get_registered_modelsARead-only
List all registered models in the model registry
Inputs: no named parameters. Returns: result
get_runARead-only
Get detailed information about a specific run. Run data can be large — avoid fetching many runs at once.
Inputs: run_id (required).
get_run_artifactBRead-only
Download and return the local path to a specific artifact
Inputs: run_id (required), artifact_path (required).
get_run_artifactsARead-only
List artifacts for a specific run. Use 'path' to browse into directories (e.g., 'configs')
Inputs: run_id (required), path. Returns: result
get_run_metricBRead-only
Get the full history of a specific metric for a run
Inputs: run_id (required), metric_name (required). Returns: result
get_run_metricsBRead-only
Get all metrics for a specific run with their latest values
Inputs: run_id (required).
get_runsARead-only
Get runs for a specific experiment with full details.
Each run contains full metrics, params, and tags — keep limit small (3-10) to avoid flooding context. Use offset to paginate.
Args:
experiment_id: The experiment ID
limit: Maximum number of runs to return. Keep small — each run is large.
offset: Number of runs to skip
order_by: List of sort clauses, e.g. ['metrics.rmse DESC', 'params.lr ASC'].
Use backticks for special characters: ['metrics.trading/loss DESC']
Examples: get_runs("1", limit=5) get_runs("1", order_by=["metrics.accuracy DESC"])
Inputs: experiment_id (required), limit, offset, order_by. Returns: result
healthARead-only
Check MLflow server health and connectivity
Inputs: no named parameters.
query_runsARead-only
Query runs using MLflow's filter syntax with optional sorting.
Runs can be large. Use wise limits to avoid flooding context.
Args:
experiment_id: The experiment ID
query: MLflow filter string (e.g., 'metrics.accuracy > 0.9')
limit: Maximum number of runs to return
offset: Number of runs to skip
order_by: List of sort clauses, e.g. ['metrics.rmse DESC', 'params.lr ASC'].
Use backticks for special characters: ['metrics.trading/loss DESC']
Examples:
query_runs("1", "metrics.accuracy > 0", order_by=["metrics.accuracy DESC"])
query_runs("1", "", order_by=["metrics.f1/score DESC"])
Inputs: query (required), experiment_id (required), limit, offset, +1 more. Returns: result
register_modelA
Register a model into the model registry. Creates the registered model if it doesn't exist.
Args: model_name: Name for the registered model. model_uri: URI of the model to register. Supports: - LoggedModel: 'models:/m-abc123' - Run artifact: 'runs:/run_id/artifact_path' tags: Optional dict of tags to set on the model version.
Examples: register_model("btc-classifier", "models:/m-abc123") register_model("btc-classifier", "runs:/abc123/model", tags={"framework": "lightgbm"})
Inputs: model_uri (required), model_name (required), tags.
search_experimentsARead-only
Search experiments with optional filtering and sorting.
Args: filter_string: Filter query, e.g. "name LIKE 'btc%'" or "tags.team = 'ml'". Supports name, creation_time, last_update_time, tags.. order_by: List of sort clauses, e.g. ["last_update_time DESC", "name ASC"]. max_results: Maximum number of experiments to return (default 100).
Examples: search_experiments(filter_string="name LIKE 'btc%'") search_experiments(order_by=["last_update_time DESC"])
Inputs: order_by, max_results, filter_string. Returns: result
search_logged_modelsARead-only
Search for logged models across one or more experiments. Results can be large — use wise limits.
Args: experiment_ids: List of experiment IDs to search in (at least one required). filter_string: SQL-like filter, e.g. 'metrics.accuracy > 0.9' or "tags.release = 'v1.0'". Multiple conditions use AND only (OR not supported). max_results: Maximum number of models to return (default 5). datasets: Filter by datasets the model was evaluated on. Each dict must include 'name' (str) and 'digest' (str), e.g. [{'name': 'val', 'digest': 'abc123'}]. order_by: List of sort clauses, each a dict with 'field_name' (str) and 'ascending' (bool), e.g. [{'field_name': 'metrics.accuracy', 'ascending': False}].
Examples: search_logged_models(["1"], filter_string="metrics.accuracy > 0.9") search_logged_models(["1", "2"], order_by=[{"field_name": "metrics.f1", "ascending": False}])
Inputs: experiment_ids (required), datasets, order_by, max_results, +1 more. Returns: result
search_runs_by_tagsARead-only
Find runs with specific tags (e.g., {'team': 'nlp', 'production': 'true'}). Runs can be large — use wise limits.
Inputs: tags (required), experiment_id (required), limit, offset. Returns: result
set_experiment_tagCIdempotent
Set a tag on an experiment.
Args: experiment_id: The experiment ID to tag. key: Tag key, e.g. 'team', 'status'. value: Tag value.
Inputs: key (required), value (required), experiment_id (required).
set_model_aliasAIdempotent
Assign an alias to a specific model version (e.g. promote best model to 'champion').
Args: name: Name of the registered model. alias: Alias to assign, e.g. 'champion', 'production', 'baseline'. version: Model version number to assign the alias to.
Examples: set_model_alias("lightgbm", "champion", "3")
Inputs: name (required), alias (required), version (required).
set_registered_model_tagBIdempotent
Set a tag on a registered model (e.g. problem_type, team, framework).
Args: name: Name of the registered model. key: Tag key, e.g. 'problem_type', 'team', 'framework'. value: Tag value.
Inputs: key (required), name (required), value (required).
set_run_tagAIdempotent
Set a tag on a run (e.g. annotate best model, flag for review).
Args: run_id: The run ID to tag. key: Tag key, e.g. 'best_model', 'reviewed_by'. value: Tag value.
Inputs: key (required), value (required), run_id (required).
transition_model_version_stageADestructive
Transition a model version to a new stage (Staging, Production, Archived).
Deprecated since MLflow 2.9. Prefer aliases (set_model_alias) and copy_model_version for MLflow 3+ workflows. Use this only when working with legacy stage-based deployments.
Args: name: Name of the registered model. version: Model version number. stage: Target stage: 'Staging', 'Production', or 'Archived'. archive_existing: If True, archive existing versions in the target stage.
Inputs: name (required), stage (required), version (required), archive_existing.
update_model_versionAIdempotent
Update the description of a model version.
Args: name: Name of the registered model. version: Model version number. description: New description text.
Inputs: name (required), version (required), description (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 40 tools
Each tool targets a distinct MLflow resource or action, such as experiments, runs, models, artifacts, or tags. Despite a large number of tools, their descriptions clearly differentiate them (e.g., get_run vs get_runs vs query_runs). There is minimal overlap in functionality.
Tool names follow a consistent verb_noun pattern (e.g., get_experiment, set_model_alias, delete_run). Exceptions like 'health' are single-purpose and follow the pattern. Overall naming is predictable and clear.
40 tools is above the typical well-scoped range (3-15), but the domain (MLflow) has many entities and operations, making a larger surface reasonable. However, some tools could be merged or omitted to reduce cognitive load.
The tool surface covers CRUD for experiments, runs, model registry, tags, and artifacts, plus search and comparisons. Minor gaps exist, such as no direct create_run or update_experiment, but these are managed elsewhere in MLflow.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for building and testing AI agents with multi-model experimentation and insights.
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables LLMs to interact with Databricks workspaces through natural language, allowing SQL query execution and job management operations.50-
- FlicenseNot gradedqualityDmaintenanceA natural language interface for MLflow that allows users to query and manage their machine learning experiments and models using plain English through the Model Context Protocol.11-

MCP TapData Serverofficial
FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables Large Language Models to access and interact with database connections, including viewing schemas and performing CRUD operations on connected databases.-- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants to query Prometheus metrics, discover available data, and analyze system performance through natural language interactions.5236 npmMIT