Skip to content

How to set up Vizro-MCP with Visual Studio Code

Use of large language models

You must connect to a large language model (LLM) to use Vizro-MCP.

Please review our guidelines on the use of LLMs.

This page explains how to set up an installation of Visual Studio Code to use Vizro-MCP.

Set up uv or Docker

To access Vizro-MCP, you must first install either uv or Docker by following the linked instructions.

Set up instructions

Once you have uv or Docker, and have installed Microsoft Visual Studio Code, you need to set up the Vizro-MCP server configuration.

Using uv

Click the "Install" button below:

Install with UVX in VS Code

To specify a version of Vizro-MCP

To use a specific version of Vizro-MCP, update the mcp.json configuration to instruct uv accordingly. For example, to use Vizro-MCP version 0.1.2, specify the configuration like this:

{
  "vizro-mcp": {
    "command": "uvx vizro-mcp@0.1.2"
  }
}

The uv documentation contains more information about the syntax around the uvx command version.

Click "Install" on the MCP configuration page:

Install Vizro-MCP with uv

If the process appears to "hang", you should restart VS Code. You can check that Vizro-MCP is installed by navigating to Code > Settings > Profiles > MCP Servers where you'll see the Vizro-MCP server settings.

Show where to find MCP settings in VS Code

Using Docker

Click the "Install" button below:

Install with Docker in VS Code

To use local data with Vizro-MCP, mount your data directory or directories into the container with the following extended configuration. Replace </absolute/path/to/allowed/dir> (syntax for folders) or </absolute/path/to/data.csv> (syntax for files) with the absolute path to your data on your machine. For consistency, it is recommended that the dst path matches the src path.

{
  "mcpServers": {
    "vizro-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--mount",
        "type=bind,src=</absolute/path/to/allowed/dir>,dst=</absolute/path/to/allowed/dir>",
        "--mount",
        "type=bind,src=</absolute/path/to/data.csv>,dst=</absolute/path/to/data.csv>",
        "mcp/vizro"
      ]
    }
  }
}