The MLflow MCP Server provides a natural language interface to MLflow using the Model Context Protocol (MCP). This tool allows you to query your MLflow tracking server with plain English commands, making it easier to manage and explore your machine learning experiments and models without memorizing specific MLflow commands.
Install MLflow MCP Server automatically via Smithery:
npx -y @smithery/cli install @iRahulPandey/mlflowMCPServer --client claude
git clone https://github.com/iRahulPandey/mlflowMCPServer.git
cd mlflowMCPServer
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install mcp[cli] langchain-mcp-adapters langchain-openai langgraph mlflow
export OPENAI_API_KEY=your_key_here
export MLFLOW_TRACKING_URI=http://localhost:8080
Start the MLflow MCP server:
python mlflow_server.py
This connects to your MLflow tracking server and exposes its functionality via MCP.
Once the server is running, use the client to make queries in plain English:
python mlflow_client.py "What models do I have registered in MLflow?"
Customize behavior using these environment variables:
MLFLOW_TRACKING_URI
: URI of your MLflow tracking server (default: http://localhost:8080
)OPENAI_API_KEY
: Your OpenAI API keyMODEL_NAME
: The OpenAI model to use (default: gpt-3.5-turbo-0125
)MLFLOW_SERVER_SCRIPT
: Path to the MLflow MCP server script (default: mlflow_server.py
)LOG_LEVEL
: Logging level (default: INFO
)The server exposes these MLflow functions:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "mlflow-mcp-server" '{"command":"python","args":["mlflow_server.py"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"mlflow-mcp-server": {
"command": "python",
"args": [
"mlflow_server.py"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"mlflow-mcp-server": {
"command": "python",
"args": [
"mlflow_server.py"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect