set-up-vizro-mcp-with-vscode.md•3.27 kB
# How to set up Vizro-MCP with Visual Studio Code
!!! notice "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](../explanation/disclaimers.md).
This page explains how to set up an installation of [Visual Studio Code](https://code.visualstudio.com/) to use Vizro-MCP.
## Set up uv or Docker
To access Vizro-MCP, you must first install **either [uv](https://docs.astral.sh/uv/getting-started/installation/) or [Docker](https://www.docker.com/get-started/)** 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:
[](https://insiders.vscode.dev/redirect/mcp/install?name=vizro-mcp&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22vizro-mcp%22%5D%7D)
!!! tip "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](https://github.com/mckinsey/vizro/tree/vizro-mcp-0.1.2), specify the configuration like this:
```json
{
"vizro-mcp": {
"command": "uvx vizro-mcp@0.1.2"
}
}
```
The `uv documentation` contains more information about the [syntax around the `uvx` command version](https://docs.astral.sh/uv/guides/tools/#requesting-specific-versions).
Click "Install" on the MCP configuration page:

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.

### Using Docker
Click the "Install" button below:
[](https://insiders.vscode.dev/redirect/mcp/install?name=vizro-mcp&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22mcp%2Fvizro%22%5D%7D)
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.
```json
{
"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"
]
}
}
}
```