←back to Blog

Creating Dashboards Using Vizro MCP: Vizro is an Open-Source Python Toolkit by McKinsey

«`html

Creating Dashboards Using Vizro MCP: An Open-Source Python Toolkit by McKinsey

Vizro is an open-source Python toolkit developed by McKinsey that simplifies the process of building production-ready data visualization applications. With minimal configuration using JSON, YAML, or Python dictionaries, users can create multi-page dashboards that would typically require extensive coding.

Built on top of Plotly, Dash, and Pydantic, Vizro merges the flexibility of open-source software with established best practices for design and scalability. It is user-friendly for beginners, customizable for advanced users, and powerful enough to transition seamlessly from prototype to production.

Target Audience Analysis

The primary audience for this tutorial includes data analysts, business intelligence professionals, and software developers who are interested in leveraging data visualization tools to enhance decision-making processes. Their pain points often include:

  • Difficulty in creating visually appealing and interactive dashboards.
  • Time constraints due to the complexity of traditional coding methods.
  • Need for scalable solutions that can evolve with business requirements.

These professionals aim to:

  • Streamline the dashboard creation process.
  • Improve data presentation for better insights.
  • Utilize open-source tools to reduce costs while maintaining flexibility.

They prefer clear, concise communication with technical details that facilitate understanding and implementation.

Setting Up the Dependencies

To run the Vizro server, you will need the uv package manager. Install it using 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"

After downloading uv, run the following command to locate uvx:

For Mac/Linux:

which uvx

For Windows:

where uvx

Keep the location of uvx handy, as it will be necessary for the configuration file for Claude.

Claude Desktop Configuration

You can download Claude Desktop from Claude AI. Open the claude_desktop_config.json file located in the Claude installation directory using any text editor. If the file does not exist, create it manually. Enter the following code:

For Mac/Linux:

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

For Windows:

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

Replace placeholder-path with the actual path of uvx.

Running the Server

Once the configuration file is set up, the Vizro MCP Server should appear in the list of servers. Vizro includes sample datasets for testing. You can initiate the following prompt to create your first dashboard:

“create a vizro dashboard using tips dataset”

Claude will utilize the vizro-mcp to generate the dashboard and display it in your browser via PyCafe. This dashboard will feature interactive charts such as:

  • Tip vs Total Bill
  • Average Tips by Day
  • Tip Distribution by Gender
  • Tips by Party Size

Additionally, it will include filters for day, gender, and smoker status, enabling seamless cross-filtering analysis.

The post Creating Dashboards Using Vizro MCP: Vizro is an Open-Source Python Toolkit by McKinsey appeared first on MarkTechPost.

«`