Vizro-MCP

Plans, checks and generates Python code for Vizro dashboards and charts from your data

Official · Open Source by McKinsey Python Local · stdio Data and analyticsDeveloper tools

49 popularity score ★ 3.8k ⇣ 38k pulls

Connect your client

Local (PyPI)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add vizro -- uvx vizro-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "vizro": {
      "command": "uvx",
      "args": [
        "vizro-mcp"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "vizro": {
      "command": "uvx",
      "args": [
        "vizro-mcp"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "vizro": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "vizro-mcp"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.vizro]
command = "uvx"
args = ["vizro-mcp"]
Gemini CLITerminal
gemini mcp add --scope user vizro uvx -- vizro-mcp
Local (Docker)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add vizro -- docker run -i --rm mcp/vizro
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "vizro": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mcp/vizro"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "vizro": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mcp/vizro"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "vizro": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mcp/vizro"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.vizro]
command = "docker"
args = ["run", "-i", "--rm", "mcp/vizro"]
Gemini CLITerminal
gemini mcp add --scope user vizro docker -- run -i --rm mcp/vizro

What it does

Vizro-MCP is McKinsey's server for Vizro, their open-source Python framework for building data dashboards. The assistant does the writing. The server gives it Vizro's rules: build instructions, the JSON schema of any Vizro model, and a check that turns a finished dashboard config or chart into Python code you can run.

The usual flow starts with get_vizro_chart_or_dashboard_plan. Next, load_and_analyze_data reads a data file (CSV, JSON, HTML, Excel, ODS or Parquet) from an absolute local path or a URL and reports its columns and types. If you have no data, get_sample_data_info offers four built-in sample sets: iris, tips, stocks and gapminder. Last, validate_dashboard_config or validate_chart_code checks the result and returns the Python code. In version 0.1.4 the server also has three prompts: create_starter_dashboard, create_dashboard and create_vizro_chart.

The README doesn't mention one detail from server.py. A py.cafe preview link is made only when every data source is a URL, never for local files. By default the validate tools open that link in your default web browser. Set auto_open to false to stop this.

What it needs

RuntimePythonorDocker

Python with uv installed (the documented command is uvx vizro-mcp), or Docker for the mcp/vizro image. You also need an MCP client: the docs name Claude Desktop, Cursor and VS Code. No account or API key. With Docker, local data files must be bind-mounted into the container before the server can read them.

Limits

It builds Vizro apps only. It returns code but doesn't run or host the dashboard. In 0.1.4, a py.cafe preview is made only when all data comes from URLs. With local files you get code only (server.py). load_and_analyze_data needs absolute paths. The makers recommend a strong model such as claude-4-sonnet and warn that a client's auto model setting can give inconsistent results. get_model_json_schema refuses the deprecated names Layout and filter_interaction and points to Grid and set_control instead.

Who it suits

Suits Python users who want an assistant to draft Vizro dashboards or Plotly-based charts from a CSV, spreadsheet or Parquet file. They get validated code to drop into app.py. The server runs locally, needs no key and doesn't change files, so it's low effort to try. It isn't a fit if you want a hosted BI tool, a server that queries a live database, or charts in a framework other than Vizro.

Tools 6

get_vizro_chart_or_dashboard_plan
Returns step-by-step guidance for building a Vizro chart or dashboard, with an advanced mode for custom CSS, components and actions.
get_model_json_schema
Gives the JSON schema of a named Vizro model such as Dashboard, Page or Graph.
get_sample_data_info
Describes one of four built-in sample datasets (iris, tips, stocks, gapminder) for use when you have no data.
load_and_analyze_data
Opens a local file or remote URL of tabular data and reports its columns, types and how to load it.
validate_dashboard_config
Checks a dashboard config against Vizro's models and returns Python code, plus a py.cafe link when all data is remote.
validate_chart_code
Checks a chart plan and returns its Python code, plus a py.cafe link when the data is remote.

Similar servers