<RETURN_TO_BASE

Build Interactive Dashboards Fast with Vizro MCP — McKinsey's Open-Source Python Toolkit

'Quick walkthrough to install uv, configure Claude Desktop for Vizro MCP, and generate interactive dashboards using the tips dataset.'

Vizro is an open-source Python toolkit by McKinsey that makes it easy to build beautiful, production-ready data visualization apps. With a few lines of configuration you can create multi-page dashboards that would normally take thousands of lines of code.

How Vizro works

Built on top of Plotly, Dash, and Pydantic, Vizro combines the flexibility of open source with in-built best practices for design and scalability. It’s quick to learn, customizable for advanced users, and powerful enough to move from prototype to production seamlessly.

Setting up the dependencies

To run the Vizro MCP server you need the uv package manager. Install it with the following commands:

For Mac/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

For Windows:

powershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"

Once uv is downloaded, run the following command to get the location of uvx

For Mac/Linux:

which uvx

For Windows:

where uvx

Keep the location of uvx handy, we will need it for the config file for Claude.

Configuring Claude Desktop

Download Claude Desktop from https://claude.ai/download. Open or create the claude_desktop_config.json file in the Claude installation directory and add a Vizro MCP server entry. On Mac/Linux, add:

{
  "mcpServers": {
    "vizro-mcp": {
      "command": "/placeholder-path/uvx",
      "args": [
        "vizro-mcp"
      ]
    }
  }
}

On Windows, add:

{
  "mcpServers": {
    "vizro-mcp": {
      "command": "placeholder-path//uvx",
      "args": [
        "vizro-mcp"
      ]
    }
  }
}

Replace the placeholder-path with the path of uvx that you retrieved earlier.

Running the server

After saving the configuration, the Vizro MCP Server should appear in the list of MCP servers available to Claude Desktop. Start or select the server and Vizro will serve dashboards via its MCP integration.

Vizro ships with sample datasets to experiment with. For a quick test, use the following prompt:

“create a vizro dashboard using tips dataset”

Claude will use the vizro-mcp server to generate the dashboard and open it in your browser via PyCafe, producing interactive charts such as tip vs total bill, average tips by day, tip distribution by gender, and tips by party size. Built-in filters for day, gender, and smoker status enable seamless cross-filtering analysis.

🇷🇺

Сменить язык

Читать эту статью на русском

Переключить на Русский