Add your description here
Project description
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
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": ["--from", "git+https://github.com/yesid-lopez/mlflow-mcp-server", "mlflow_mcp_server"],
"env": {
"MLFLOW_TRACKING_URI": "http://localhost:5000"
}
}
}
}
Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"mlflow": {
"command": "uvx",
"args": ["--from", "git+https://github.com/yesid-lopez/mlflow-mcp-server", "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", "--from", "git+https://github.com/yesid-lopez/mlflow-mcp-server", "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 |
Get experiment details by ID |
get_experiment_by_name |
Get experiment details by name |
search_experiments |
List and filter experiments with optional name matching and pagination |
Run Management
| Tool | Description |
|---|---|
get_run |
Get full run details including metrics, parameters, tags, and run type (parent/child/standalone) |
get_experiment_runs |
List runs for an experiment with pagination |
Model Registry
| Tool | Description |
|---|---|
get_registered_models |
Search and list registered models |
get_model_versions |
Browse model versions with filtering |
create_registered_model |
Create a new registered model with optional description and tags |
create_model_version |
Create a new model version from a run's artifacts |
rename_registered_model |
Rename an existing registered model |
set_registered_model_alias |
Assign an alias (e.g. champion, challenger) to a model version |
delete_registered_model |
Delete a registered model and all its versions |
delete_model_version |
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 |
|---|---|---|
MLFLOW_TRACKING_URI |
http://localhost:5000 |
URL of the MLflow tracking server |
Installation (Development)
Prerequisites
- Python 3.11+
- uv
- An MLflow tracking server
Setup
git clone https://github.com/yesid-lopez/mlflow-mcp-server.git
cd mlflow-mcp-server
uv sync
Running Locally
export MLFLOW_TRACKING_URI="http://localhost:5000"
uv run -m mlflow_mcp_server
The 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 singleton
Adding 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
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_server-0.1.0.tar.gz.
File metadata
- Download URL: mlflow_mcp_server-0.1.0.tar.gz
- Upload date:
- Size: 80.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59d6021b2778bde9c36d2d531ad495fb2b88e9a76488a53c80954c17d2f3d922
|
|
| MD5 |
5dc22e4e50f9dcdc4a0e86b64ea6b8b5
|
|
| BLAKE2b-256 |
1b2c120e15b50753e79939c90be0557a7788d26cc881111200fe96b655fa0c04
|
Provenance
The following attestation bundles were made for mlflow_mcp_server-0.1.0.tar.gz:
Publisher:
publish.yml on yesid-lopez/mlflow-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlflow_mcp_server-0.1.0.tar.gz -
Subject digest:
59d6021b2778bde9c36d2d531ad495fb2b88e9a76488a53c80954c17d2f3d922 - Sigstore transparency entry: 1077482884
- Sigstore integration time:
-
Permalink:
yesid-lopez/mlflow-mcp-server@54213313bf45c3954b0d992ab99afa0abfe1ab48 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/yesid-lopez
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54213313bf45c3954b0d992ab99afa0abfe1ab48 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mlflow_mcp_server-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mlflow_mcp_server-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00fab92bca8e8e015579d9790ac0a47451d39d0cb74a497bd6edfac3f852afb5
|
|
| MD5 |
6c03935ee4ce85bc0ef2cda33866ee72
|
|
| BLAKE2b-256 |
5ad3bdad112bdc0cea4597be28f454e554f88eb2a0daba16da16f57617993ed8
|
Provenance
The following attestation bundles were made for mlflow_mcp_server-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on yesid-lopez/mlflow-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlflow_mcp_server-0.1.0-py3-none-any.whl -
Subject digest:
00fab92bca8e8e015579d9790ac0a47451d39d0cb74a497bd6edfac3f852afb5 - Sigstore transparency entry: 1077482912
- Sigstore integration time:
-
Permalink:
yesid-lopez/mlflow-mcp-server@54213313bf45c3954b0d992ab99afa0abfe1ab48 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/yesid-lopez
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54213313bf45c3954b0d992ab99afa0abfe1ab48 -
Trigger Event:
release
-
Statement type: