Skip to main content

Set up the MLflow MCP server

The MLflow MCP (Model Context Protocol) server gives your coding agent live access to your traces and experiments. Once configured, you can ask your agent to search for traces with errors, inspect a specific trace, or log feedback — all from your IDE, without opening the Databricks UI.

note

To also give your coding agent knowledge of MLflow's APIs so it generates accurate code, set up a coding agent with the MLflow skills.

Prerequisites

  • An MCP-compatible coding agent: Claude Code, Cursor, VS Code, or OpenCode

  • MLflow 3.5.1 or later with the databricks and mcp extras:

    Bash
    pip install 'mlflow[databricks,mcp]>=3.5.1'

Configure your MCP client

Add the MLflow MCP server to your client's configuration file. Replace <your-workspace-url> with your Databricks workspace URL (for example, https://your-workspace.cloud.databricks.com) and <your-token> with a personal access token.

Add to .mcp.json in your project root:

JSON
{
"mcpServers": {
"mlflow-mcp": {
"command": "uv",
"args": ["run", "--with", "mlflow[databricks,mcp]>=3.5.1", "mlflow", "mcp", "run"],
"env": {
"MLFLOW_TRACKING_URI": "databricks",
"DATABRICKS_HOST": "<your-workspace-url>",
"DATABRICKS_TOKEN": "<your-token>"
}
}
}
}

For details, see Claude Code MCP configuration.

What your coding agent can do

After configuration, ask your agent to:

  • "Search for traces with errors from the last hour"
  • "Show me the most recent traces from experiment 12345"
  • "Get details for trace ID tr-abc123"
  • "Add a rating of 5 to trace tr-abc123"

For the full list of available operations, see the MLflow MCP server documentation.

Next steps