vizro-mcp 0.0.1.dev0__tar.gz → 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. vizro_mcp-0.1.1/CHANGELOG.md +18 -0
  2. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/PKG-INFO +110 -22
  3. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/README.md +109 -21
  4. vizro_mcp-0.1.1/assets/vizro-mcp.gif +0 -0
  5. vizro_mcp-0.0.1.dev0/changelog.d/20250417_141843_maximilian_schulz_mcp.md → vizro_mcp-0.1.1/changelog.d/20250515_115815_lingyi_zhang_0_1_1.md +7 -2
  6. vizro_mcp-0.1.1/glama.json +4 -0
  7. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/hatch.toml +5 -0
  8. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/pyproject.toml +1 -1
  9. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/src/vizro_mcp/__init__.py +1 -1
  10. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/src/vizro_mcp/server.py +6 -6
  11. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/tests/unit/vizro_mcp/test_server.py +7 -5
  12. vizro_mcp-0.0.1.dev0/CHANGELOG.md +0 -0
  13. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/.gitignore +0 -0
  14. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/LICENSE.txt +0 -0
  15. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/assets/claude_prompt.png +0 -0
  16. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/assets/claude_validate.png +0 -0
  17. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/assets/claude_working.png +0 -0
  18. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/assets/cursor_working.png +0 -0
  19. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/changelog.d/new_fragment.md.j2 +0 -0
  20. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/changelog.d/scriv.ini +0 -0
  21. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/src/vizro_mcp/_schemas/__init__.py +0 -0
  22. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/src/vizro_mcp/_schemas/schemas.py +0 -0
  23. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/src/vizro_mcp/_utils/__init__.py +0 -0
  24. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/src/vizro_mcp/_utils/utils.py +0 -0
  25. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/src/vizro_mcp/py.typed +0 -0
  26. {vizro_mcp-0.0.1.dev0 → vizro_mcp-0.1.1}/uv.lock +0 -0
@@ -0,0 +1,18 @@
1
+ <a id='changelog-0.1.1'></a>
2
+
3
+ # 0.1.1 — 2025-05-15
4
+
5
+ ### Fixed
6
+
7
+ - Fix name conflict with `langchain` by avoiding use of conflicting parameter names in tools. ([#1177](https://github.com/mckinsey/vizro/pull/1177))
8
+
9
+ <a id='changelog-0.1.0'></a>
10
+
11
+ # 0.1.0 — 2025-05-06
12
+
13
+ ## Added
14
+
15
+ - Initial release of the Vizro MCP server. ([#1125](https://github.com/mckinsey/vizro/pull/1125))
16
+ - still experimental, please provide feedback via [github issues](https://github.com/mckinsey/vizro/issues)
17
+ - pinned `vizro` version to `0.1.38`
18
+ - published with 6 tools and 3 prompt templates
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vizro-mcp
3
- Version: 0.0.1.dev0
3
+ Version: 0.1.1
4
4
  Summary: MCP server to help create Vizro dashboards and charts
5
5
  Author: Vizro Team
6
6
  License-File: LICENSE.txt
@@ -17,21 +17,39 @@ Requires-Dist: pandas[excel,html,parquet]
17
17
  Requires-Dist: vizro==0.1.38
18
18
  Description-Content-Type: text/markdown
19
19
 
20
+ <a href="https://glama.ai/mcp/servers/@mckinsey/vizro">
21
+ <img width="380" height="200" src="https://glama.ai/mcp/servers/@mckinsey/vizro/badge" />
22
+ </a>
23
+
20
24
  # Vizro MCP server
21
25
 
22
26
  Vizro-MCP is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server, which works alongside a LLM to help you create Vizro dashboards and charts.
23
27
 
28
+ ![Vizro MCP Demo](assets/vizro-mcp.gif)
29
+
24
30
  ## Features of Vizro-MCP
25
31
 
26
32
  Vizro-MCP provides tools and templates to create a functioning Vizro chart or dashboard step by step. Benefits include:
27
33
 
28
- ✅ One consistent framework for charts and dashboards with one common design language. ✅ Validated config output that is readable and easy to alter or maintain. ✅ Live preview of the dashboard to iterate the design until the dashboard is perfect. ✅ Use of local or remote datasets simply by providing a path or URL.
34
+ ✅ One consistent framework for charts and dashboards with one common design language.
35
+
36
+ ✅ Validated config output that is readable and easy to alter or maintain.
37
+
38
+ ✅ Live preview of the dashboard to iterate the design until the dashboard is perfect.
39
+
40
+ ✅ Use of local or remote datasets simply by providing a path or URL.
29
41
 
30
42
  ### Without Vizro-MCP
31
43
 
32
44
  Without Vizro-MCP, if you try to make a dashboard using an LLM, it could choose any framework, and use it without specific guidance, design principles, or consistency. The results are:
33
45
 
34
- ❌ A random choice of frontend framework or charting library. ❌ A vibe-coded mess that may or may not run, but certainly is not very maintainable. ❌ No way to easily preview the dashboard. ❌ No easy way to connect to real data.
46
+ ❌ A random choice of frontend framework or charting library.
47
+
48
+ ❌ A vibe-coded mess that may or may not run, but certainly is not very maintainable.
49
+
50
+ ❌ No way to easily preview the dashboard.
51
+
52
+ ❌ No easy way to connect to real data.
35
53
 
36
54
  ## 🛠️ Get started
37
55
 
@@ -48,10 +66,27 @@ In principle, the Vizro MCP server works with _any_ MCP enabled LLM applications
48
66
 
49
67
  > ⚠️ **Warning:** In some hosts (like Claude Desktop) the free plan might be less performant, which may cause issues when the request is too complex. In cases where the request causes the UI to crash, opt for using a paid plan, or reduce your request's complexity.
50
68
 
51
- ## Setup Instructions
69
+ ### Setup Instructions
70
+
71
+ The general server config is mostly the same for all hosts:
72
+
73
+ ```json
74
+ {
75
+ "mcpServers": {
76
+ "vizro-mcp": {
77
+ "command": "uvx",
78
+ "args": [
79
+ "vizro-mcp"
80
+ ]
81
+ }
82
+ }
83
+ }
84
+ ```
85
+
86
+ In principle, the Vizro MCP server works with _any_ MCP enabled LLM applications but we recommend Claude Desktop or Cursor as popular choices (see more detailed instructions below). Different AI tools may use different setup methods or connection settings. Check each tool's docs for details.
52
87
 
53
88
  <details>
54
- <summary><strong>Claude</strong></summary>
89
+ <summary><strong>Claude Desktop</strong></summary>
55
90
 
56
91
  Add the following to your `claude_desktop_config.json` [found via Developer Settings](https://modelcontextprotocol.io/quickstart/user#2-add-the-filesystem-mcp-server).
57
92
 
@@ -68,7 +103,7 @@ Add the following to your `claude_desktop_config.json` [found via Developer Sett
68
103
  }
69
104
  ```
70
105
 
71
- > ⚠️ **Warning:** In some cases you may need to provide the full path to your `uv` executable, so instead of `uv` would use something like `/Users/<your-username>/.local/bin/uv`. To discover the path of `uv` on your machine, in your terminal app, type `which uv`.
106
+ > ⚠️ **Warning:** In some cases you may need to provide the full path to your `uvx` executable, so instead of `uvx` would use something like `/Users/<your-username>/.local/bin/uvx`. To discover the path of `uvx` on your machine, in your terminal app, type `which uvx`.
72
107
 
73
108
  If you are using Claude Desktop, restart it, and after a few moments, you should see the vizro-mcp menu when opening the settings/context menu:
74
109
 
@@ -94,7 +129,7 @@ Add the following to `mcp.json` [found via the Cursor Settings](https://docs.cur
94
129
  }
95
130
  ```
96
131
 
97
- > ⚠️ **Warning:** In some cases you may need to provide the full path to your `uv` executable, so instead of `uv` would use something like `/Users/<your-username>/.local/bin/uv`. To discover the path of `uv` on your machine, in your terminal app, type `which uv`.
132
+ > ⚠️ **Warning:** In some cases you may need to provide the full path to your `uvx` executable, so instead of `uvx` would use something like `/Users/<your-username>/.local/bin/uvx`. To discover the path of `uvx` on your machine, in your terminal app, type `which uvx`.
98
133
 
99
134
  Similarly, when using Cursor, after a short pause, you should see a green light in the MCP menu:
100
135
 
@@ -102,8 +137,6 @@ Similarly, when using Cursor, after a short pause, you should see a green light
102
137
 
103
138
  </details>
104
139
 
105
- In principle, the Vizro MCP server works with _any_ MCP enabled LLM applications but we recommend Claude Desktop or Cursor as popular choices. Different AI tools may use different setup methods or connection settings. Check each tool's docs for details.
106
-
107
140
  ## 💻 Usage
108
141
 
109
142
  ### Use prompt templates to get specific dashboards quickly
@@ -122,6 +155,8 @@ You can also ask the LLM to create specific dashboards based on local or remote
122
155
 
123
156
  > _Create a simple two page Vizro dashboard, with first page being a correlation analysis of `<insert absolute file path or public URL>` data, and the second page being a map plot of `<insert absolute file path or public URL>` data_
124
157
 
158
+ You can find a set of sample CSVs to try out in the [Plotly repository](https://github.com/plotly/datasets/tree/master).
159
+
125
160
  You can even ask for a dashboard without providing data:
126
161
 
127
162
  > _Create a Vizro dashboard with one page, a scatter chart, and a filter._
@@ -138,9 +173,11 @@ You can also ask the model to give you the link, but it will attempt to regenera
138
173
 
139
174
  ### Create Vizro charts
140
175
 
141
- The **easiest** way to get started with Vizro charts is to choose the template `create_vizro_chart` and just send the prompt. This will create a simple chart that you can alter. Take it from there!
176
+ If you don't want to create an entire Vizro dashboard, you can still use Vizro-MCP to create the code for a single chart. If you're not sure what kind of chart you want, check out the [Vizro Visual Vocabulary](https://huggingface.co/spaces/vizro/demo-visual-vocabulary) for ideas.
142
177
 
143
- Alternatively, you can just ask in the chat things like:
178
+ The **easiest** way to create a Vizro chart is to choose the template `create_vizro_chart` and just send the prompt. This will create a simple chart that you can alter. Take it from there!
179
+
180
+ Alternatively, you can just ask in the chat, for example:
144
181
 
145
182
  > _Create a scatter based on the iris dataset._
146
183
 
@@ -168,12 +205,8 @@ The Vizro MCP server provides the following tools. In general you should not nee
168
205
  ## Available Prompts (if client allows)
169
206
 
170
207
  - `create_starter_dashboard` - Use this prompt template to get started with Vizro dashboards.
171
- - `create_EDA_dashboard` - Use this prompt template to create an Exploratory Data Analysis (EDA) dashboard based on a local or remote CSV dataset
172
- - `create_vizro_chart` - Use this prompt template to create a Vizro styled plotly chart based on a local or remote CSV dataset
173
-
174
- ## Sample data
175
-
176
- You can find a set of sample CSVs to try out in the [Plotly repository](https://github.com/plotly/datasets/tree/master).
208
+ - `create_EDA_dashboard` - Use this prompt template to create an Exploratory Data Analysis (EDA) dashboard based on a local or remote CSV dataset.
209
+ - `create_vizro_chart` - Use this prompt template to create a Vizro styled plotly chart based on a local or remote CSV dataset.
177
210
 
178
211
  ## Development or running from source
179
212
 
@@ -201,12 +234,67 @@ If you are a developer, or if you are running Vizro-MCP from source, you need to
201
234
 
202
235
  Replace `<PATH TO VIZRO>` with the actual path to your Vizro repository. You may also need to provide the full path to your `uv` executable, so instead of `"uv"` you would use something like `"/Users/<your-username>/.local/bin/uv"`. To discover the path of `uv` on your machine, in your terminal app, type `which uv`.
203
236
 
204
- ## Other cool MCP Servers
237
+ ## Disclaimers
238
+
239
+ <details>
240
+ <summary><strong>Third party API</strong></summary>
241
+
242
+ Users are responsible for anything done via their host LLM application.
243
+
244
+ Users are responsible for procuring any and all rights necessary to access any third-party generative AI tools and for complying with any applicable terms or conditions thereof.
245
+
246
+ Users are wholly responsible for the use and security of the third-party generative AI tools and of Vizro.
247
+
248
+ </details>
249
+
250
+ <details>
251
+ <summary><strong>User acknowledgments</strong></summary>
252
+
253
+ Users acknowledge and agree that:
254
+
255
+ Any results, options, data, recommendations, analyses, code, or other information (“Outputs”) generated by any third-party generative AI tools (“GenAI Tools”) may contain some inaccuracies, biases, illegitimate, potentially infringing, or otherwise inappropriate content that may be mistaken, discriminatory, or misleading.
256
+
257
+ McKinsey & Company:
258
+
259
+ (i) expressly disclaims the accuracy, adequacy, timeliness, reliability, merchantability, fitness for a particular purpose, non-infringement, safety or completeness of any Outputs,
260
+
261
+ (ii) shall not be liable for any errors, omissions, or other defects in, delays or interruptions in such Outputs, or for any actions taken in reliance thereon, and
205
262
 
206
- Here are some other awesome MCP servers you might want to check out:
263
+ (iii) shall not be liable for any alleged violation or infringement of any right of any third party resulting from the users’ use of the GenAI Tools and the Outputs.
207
264
 
208
- - [Context7](https://github.com/upstash/context7) - Provides up-to-date code documentation for any library directly in your prompts. Great for getting the latest API references and examples without relying on outdated training data.
265
+ The Outputs shall be verified and validated by the users and shall not be used without human oversight and as a sole basis for making decisions impacting individuals.
209
266
 
210
- - [Everything MCP](https://github.com/modelcontextprotocol/servers/tree/main/src/everything) - A development-focused MCP server that combines multiple capabilities including web search, code search, and more. Useful for testing and prototyping MCP features. Part of the official MCP servers collection.
267
+ Users remain solely responsible for the use of the Output, in particular, the users will need to determine the level of human oversight needed to be given the context and use case, as well as for informing the users’ personnel and other affected users about the nature of the GenAI Output. Users are also fully responsible for their decisions, actions, use of Vizro and Vizro-MCP and compliance with applicable laws, rules, and regulations, including but not limited to confirming that the Outputs do not infringe any third-party rights.
211
268
 
212
- You can find more MCP servers in the [official MCP servers repository](https://github.com/modelcontextprotocol/servers/tree/main).
269
+ </details>
270
+
271
+ <details>
272
+ <summary><strong>Warning and safety usage for generative AI models</strong></summary>
273
+
274
+ Vizro-MCP is used by generative AI models because large language models (LLMs) represent significant advancements in the AI field. However, as with any powerful tool, there are potential risks associated with connecting to a generative AI model.
275
+
276
+ We recommend users research and understand the selected model before using Vizro-MCP.
277
+
278
+ Users are encouraged to treat AI-generated content as supplementary, always apply human judgment, approach with caution, review the relevant disclaimer page, and consider the following:
279
+
280
+ <ol>
281
+ <li>Hallucination and misrepresentation</li>
282
+ Generative models can potentially generate information while appearing factual, being entirely fictitious or misleading.
283
+
284
+ The vendor models might lack real-time knowledge or events beyond its last updates. Vizro-MCP output may vary and you should always verify critical information. It is the user's responsibility to discern the accuracy, consistent, and reliability of the generated content.
285
+
286
+ <li>Unintended and sensitive output</li>
287
+ The outputs from these models can be unexpected, inappropriate, or even harmful. Users as human in the loop is an essential part. Users must check and interpret the final output. It is necessary to approach the generated content with caution, especially when shared or applied in various contexts.
288
+
289
+ <li>Data privacy</li>
290
+ Your data is sent to model vendors if you connect to LLMs via their APIs. For example, if you connect to the model from OpenAI, your data will be sent to OpenAI via their API. Users should be cautious about sharing or inputting any personal or sensitive information.
291
+
292
+ <li>Bias and fairness</li>
293
+ Generative AI can exhibit biases present in their training data. Users need to be aware of and navigate potential biases in generated outputs and be cautious when interpreting the generated content.
294
+
295
+ <li>Malicious use</li>
296
+ These models can be exploited for various malicious activities. Users should be cautious about how and where they deploy and access such models.
297
+ </ol>
298
+ It's crucial for users to remain informed, cautious, and ethical in their applications.
299
+
300
+ </details>
@@ -1,18 +1,36 @@
1
+ <a href="https://glama.ai/mcp/servers/@mckinsey/vizro">
2
+ <img width="380" height="200" src="https://glama.ai/mcp/servers/@mckinsey/vizro/badge" />
3
+ </a>
4
+
1
5
  # Vizro MCP server
2
6
 
3
7
  Vizro-MCP is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server, which works alongside a LLM to help you create Vizro dashboards and charts.
4
8
 
9
+ ![Vizro MCP Demo](assets/vizro-mcp.gif)
10
+
5
11
  ## Features of Vizro-MCP
6
12
 
7
13
  Vizro-MCP provides tools and templates to create a functioning Vizro chart or dashboard step by step. Benefits include:
8
14
 
9
- ✅ One consistent framework for charts and dashboards with one common design language. ✅ Validated config output that is readable and easy to alter or maintain. ✅ Live preview of the dashboard to iterate the design until the dashboard is perfect. ✅ Use of local or remote datasets simply by providing a path or URL.
15
+ ✅ One consistent framework for charts and dashboards with one common design language.
16
+
17
+ ✅ Validated config output that is readable and easy to alter or maintain.
18
+
19
+ ✅ Live preview of the dashboard to iterate the design until the dashboard is perfect.
20
+
21
+ ✅ Use of local or remote datasets simply by providing a path or URL.
10
22
 
11
23
  ### Without Vizro-MCP
12
24
 
13
25
  Without Vizro-MCP, if you try to make a dashboard using an LLM, it could choose any framework, and use it without specific guidance, design principles, or consistency. The results are:
14
26
 
15
- ❌ A random choice of frontend framework or charting library. ❌ A vibe-coded mess that may or may not run, but certainly is not very maintainable. ❌ No way to easily preview the dashboard. ❌ No easy way to connect to real data.
27
+ ❌ A random choice of frontend framework or charting library.
28
+
29
+ ❌ A vibe-coded mess that may or may not run, but certainly is not very maintainable.
30
+
31
+ ❌ No way to easily preview the dashboard.
32
+
33
+ ❌ No easy way to connect to real data.
16
34
 
17
35
  ## 🛠️ Get started
18
36
 
@@ -29,10 +47,27 @@ In principle, the Vizro MCP server works with _any_ MCP enabled LLM applications
29
47
 
30
48
  > ⚠️ **Warning:** In some hosts (like Claude Desktop) the free plan might be less performant, which may cause issues when the request is too complex. In cases where the request causes the UI to crash, opt for using a paid plan, or reduce your request's complexity.
31
49
 
32
- ## Setup Instructions
50
+ ### Setup Instructions
51
+
52
+ The general server config is mostly the same for all hosts:
53
+
54
+ ```json
55
+ {
56
+ "mcpServers": {
57
+ "vizro-mcp": {
58
+ "command": "uvx",
59
+ "args": [
60
+ "vizro-mcp"
61
+ ]
62
+ }
63
+ }
64
+ }
65
+ ```
66
+
67
+ In principle, the Vizro MCP server works with _any_ MCP enabled LLM applications but we recommend Claude Desktop or Cursor as popular choices (see more detailed instructions below). Different AI tools may use different setup methods or connection settings. Check each tool's docs for details.
33
68
 
34
69
  <details>
35
- <summary><strong>Claude</strong></summary>
70
+ <summary><strong>Claude Desktop</strong></summary>
36
71
 
37
72
  Add the following to your `claude_desktop_config.json` [found via Developer Settings](https://modelcontextprotocol.io/quickstart/user#2-add-the-filesystem-mcp-server).
38
73
 
@@ -49,7 +84,7 @@ Add the following to your `claude_desktop_config.json` [found via Developer Sett
49
84
  }
50
85
  ```
51
86
 
52
- > ⚠️ **Warning:** In some cases you may need to provide the full path to your `uv` executable, so instead of `uv` would use something like `/Users/<your-username>/.local/bin/uv`. To discover the path of `uv` on your machine, in your terminal app, type `which uv`.
87
+ > ⚠️ **Warning:** In some cases you may need to provide the full path to your `uvx` executable, so instead of `uvx` would use something like `/Users/<your-username>/.local/bin/uvx`. To discover the path of `uvx` on your machine, in your terminal app, type `which uvx`.
53
88
 
54
89
  If you are using Claude Desktop, restart it, and after a few moments, you should see the vizro-mcp menu when opening the settings/context menu:
55
90
 
@@ -75,7 +110,7 @@ Add the following to `mcp.json` [found via the Cursor Settings](https://docs.cur
75
110
  }
76
111
  ```
77
112
 
78
- > ⚠️ **Warning:** In some cases you may need to provide the full path to your `uv` executable, so instead of `uv` would use something like `/Users/<your-username>/.local/bin/uv`. To discover the path of `uv` on your machine, in your terminal app, type `which uv`.
113
+ > ⚠️ **Warning:** In some cases you may need to provide the full path to your `uvx` executable, so instead of `uvx` would use something like `/Users/<your-username>/.local/bin/uvx`. To discover the path of `uvx` on your machine, in your terminal app, type `which uvx`.
79
114
 
80
115
  Similarly, when using Cursor, after a short pause, you should see a green light in the MCP menu:
81
116
 
@@ -83,8 +118,6 @@ Similarly, when using Cursor, after a short pause, you should see a green light
83
118
 
84
119
  </details>
85
120
 
86
- In principle, the Vizro MCP server works with _any_ MCP enabled LLM applications but we recommend Claude Desktop or Cursor as popular choices. Different AI tools may use different setup methods or connection settings. Check each tool's docs for details.
87
-
88
121
  ## 💻 Usage
89
122
 
90
123
  ### Use prompt templates to get specific dashboards quickly
@@ -103,6 +136,8 @@ You can also ask the LLM to create specific dashboards based on local or remote
103
136
 
104
137
  > _Create a simple two page Vizro dashboard, with first page being a correlation analysis of `<insert absolute file path or public URL>` data, and the second page being a map plot of `<insert absolute file path or public URL>` data_
105
138
 
139
+ You can find a set of sample CSVs to try out in the [Plotly repository](https://github.com/plotly/datasets/tree/master).
140
+
106
141
  You can even ask for a dashboard without providing data:
107
142
 
108
143
  > _Create a Vizro dashboard with one page, a scatter chart, and a filter._
@@ -119,9 +154,11 @@ You can also ask the model to give you the link, but it will attempt to regenera
119
154
 
120
155
  ### Create Vizro charts
121
156
 
122
- The **easiest** way to get started with Vizro charts is to choose the template `create_vizro_chart` and just send the prompt. This will create a simple chart that you can alter. Take it from there!
157
+ If you don't want to create an entire Vizro dashboard, you can still use Vizro-MCP to create the code for a single chart. If you're not sure what kind of chart you want, check out the [Vizro Visual Vocabulary](https://huggingface.co/spaces/vizro/demo-visual-vocabulary) for ideas.
123
158
 
124
- Alternatively, you can just ask in the chat things like:
159
+ The **easiest** way to create a Vizro chart is to choose the template `create_vizro_chart` and just send the prompt. This will create a simple chart that you can alter. Take it from there!
160
+
161
+ Alternatively, you can just ask in the chat, for example:
125
162
 
126
163
  > _Create a scatter based on the iris dataset._
127
164
 
@@ -149,12 +186,8 @@ The Vizro MCP server provides the following tools. In general you should not nee
149
186
  ## Available Prompts (if client allows)
150
187
 
151
188
  - `create_starter_dashboard` - Use this prompt template to get started with Vizro dashboards.
152
- - `create_EDA_dashboard` - Use this prompt template to create an Exploratory Data Analysis (EDA) dashboard based on a local or remote CSV dataset
153
- - `create_vizro_chart` - Use this prompt template to create a Vizro styled plotly chart based on a local or remote CSV dataset
154
-
155
- ## Sample data
156
-
157
- You can find a set of sample CSVs to try out in the [Plotly repository](https://github.com/plotly/datasets/tree/master).
189
+ - `create_EDA_dashboard` - Use this prompt template to create an Exploratory Data Analysis (EDA) dashboard based on a local or remote CSV dataset.
190
+ - `create_vizro_chart` - Use this prompt template to create a Vizro styled plotly chart based on a local or remote CSV dataset.
158
191
 
159
192
  ## Development or running from source
160
193
 
@@ -182,12 +215,67 @@ If you are a developer, or if you are running Vizro-MCP from source, you need to
182
215
 
183
216
  Replace `<PATH TO VIZRO>` with the actual path to your Vizro repository. You may also need to provide the full path to your `uv` executable, so instead of `"uv"` you would use something like `"/Users/<your-username>/.local/bin/uv"`. To discover the path of `uv` on your machine, in your terminal app, type `which uv`.
184
217
 
185
- ## Other cool MCP Servers
218
+ ## Disclaimers
219
+
220
+ <details>
221
+ <summary><strong>Third party API</strong></summary>
222
+
223
+ Users are responsible for anything done via their host LLM application.
224
+
225
+ Users are responsible for procuring any and all rights necessary to access any third-party generative AI tools and for complying with any applicable terms or conditions thereof.
226
+
227
+ Users are wholly responsible for the use and security of the third-party generative AI tools and of Vizro.
228
+
229
+ </details>
230
+
231
+ <details>
232
+ <summary><strong>User acknowledgments</strong></summary>
233
+
234
+ Users acknowledge and agree that:
235
+
236
+ Any results, options, data, recommendations, analyses, code, or other information (“Outputs”) generated by any third-party generative AI tools (“GenAI Tools”) may contain some inaccuracies, biases, illegitimate, potentially infringing, or otherwise inappropriate content that may be mistaken, discriminatory, or misleading.
237
+
238
+ McKinsey & Company:
239
+
240
+ (i) expressly disclaims the accuracy, adequacy, timeliness, reliability, merchantability, fitness for a particular purpose, non-infringement, safety or completeness of any Outputs,
241
+
242
+ (ii) shall not be liable for any errors, omissions, or other defects in, delays or interruptions in such Outputs, or for any actions taken in reliance thereon, and
186
243
 
187
- Here are some other awesome MCP servers you might want to check out:
244
+ (iii) shall not be liable for any alleged violation or infringement of any right of any third party resulting from the users’ use of the GenAI Tools and the Outputs.
188
245
 
189
- - [Context7](https://github.com/upstash/context7) - Provides up-to-date code documentation for any library directly in your prompts. Great for getting the latest API references and examples without relying on outdated training data.
246
+ The Outputs shall be verified and validated by the users and shall not be used without human oversight and as a sole basis for making decisions impacting individuals.
190
247
 
191
- - [Everything MCP](https://github.com/modelcontextprotocol/servers/tree/main/src/everything) - A development-focused MCP server that combines multiple capabilities including web search, code search, and more. Useful for testing and prototyping MCP features. Part of the official MCP servers collection.
248
+ Users remain solely responsible for the use of the Output, in particular, the users will need to determine the level of human oversight needed to be given the context and use case, as well as for informing the users’ personnel and other affected users about the nature of the GenAI Output. Users are also fully responsible for their decisions, actions, use of Vizro and Vizro-MCP and compliance with applicable laws, rules, and regulations, including but not limited to confirming that the Outputs do not infringe any third-party rights.
192
249
 
193
- You can find more MCP servers in the [official MCP servers repository](https://github.com/modelcontextprotocol/servers/tree/main).
250
+ </details>
251
+
252
+ <details>
253
+ <summary><strong>Warning and safety usage for generative AI models</strong></summary>
254
+
255
+ Vizro-MCP is used by generative AI models because large language models (LLMs) represent significant advancements in the AI field. However, as with any powerful tool, there are potential risks associated with connecting to a generative AI model.
256
+
257
+ We recommend users research and understand the selected model before using Vizro-MCP.
258
+
259
+ Users are encouraged to treat AI-generated content as supplementary, always apply human judgment, approach with caution, review the relevant disclaimer page, and consider the following:
260
+
261
+ <ol>
262
+ <li>Hallucination and misrepresentation</li>
263
+ Generative models can potentially generate information while appearing factual, being entirely fictitious or misleading.
264
+
265
+ The vendor models might lack real-time knowledge or events beyond its last updates. Vizro-MCP output may vary and you should always verify critical information. It is the user's responsibility to discern the accuracy, consistent, and reliability of the generated content.
266
+
267
+ <li>Unintended and sensitive output</li>
268
+ The outputs from these models can be unexpected, inappropriate, or even harmful. Users as human in the loop is an essential part. Users must check and interpret the final output. It is necessary to approach the generated content with caution, especially when shared or applied in various contexts.
269
+
270
+ <li>Data privacy</li>
271
+ Your data is sent to model vendors if you connect to LLMs via their APIs. For example, if you connect to the model from OpenAI, your data will be sent to OpenAI via their API. Users should be cautious about sharing or inputting any personal or sensitive information.
272
+
273
+ <li>Bias and fairness</li>
274
+ Generative AI can exhibit biases present in their training data. Users need to be aware of and navigate potential biases in generated outputs and be cautious when interpreting the generated content.
275
+
276
+ <li>Malicious use</li>
277
+ These models can be exploited for various malicious activities. Users should be cautious about how and where they deploy and access such models.
278
+ </ol>
279
+ It's crucial for users to remain informed, cautious, and ethical in their applications.
280
+
281
+ </details>
Binary file
@@ -7,7 +7,9 @@ Uncomment the section that is right (remove the HTML comment wrapper).
7
7
  <!--
8
8
  ### Highlights ✨
9
9
 
10
- - Initial release of the Vizro MCP server. Highly experimental, please use with caution. ([#1125](https://github.com/mckinsey/vizro/pull/1125)) -->
10
+ - A bullet item for the Highlights category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))
11
+
12
+ -->
11
13
 
12
14
  <!--
13
15
  ### Removed
@@ -16,9 +18,12 @@ Uncomment the section that is right (remove the HTML comment wrapper).
16
18
 
17
19
  -->
18
20
 
21
+ <!--
19
22
  ### Added
20
23
 
21
- - Initial release of the Vizro MCP server. Highly experimental, please use with caution. ([#1125](https://github.com/mckinsey/vizro/pull/1125))
24
+ - A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))
25
+
26
+ -->
22
27
 
23
28
  <!--
24
29
  ### Changed
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "https://glama.ai/mcp/schemas/server.json",
3
+ "maintainers": ["maxschulz-COL", "lingyielia"]
4
+ }
@@ -32,6 +32,11 @@ prep-release = [
32
32
  pypath = "python -c 'import sys; print(sys.executable)'"
33
33
  test = "pytest tests --headless {args}"
34
34
  test-unit = "pytest tests/unit {args}"
35
+ test-unit-coverage = [
36
+ "coverage run -m pytest tests/unit {args}",
37
+ "- coverage combine",
38
+ "coverage report"
39
+ ]
35
40
 
36
41
  [publish.index]
37
42
  disable = true
@@ -39,7 +39,7 @@ exclude_lines = [
39
39
  "if __name__ == .__main__.:",
40
40
  "if TYPE_CHECKING:"
41
41
  ]
42
- fail_under = 0
42
+ fail_under = 63
43
43
  show_missing = true
44
44
  skip_covered = true
45
45
 
@@ -3,7 +3,7 @@ import sys
3
3
 
4
4
  from .server import mcp
5
5
 
6
- __version__ = "0.0.1.dev0"
6
+ __version__ = "0.1.1"
7
7
 
8
8
 
9
9
  def main():
@@ -99,7 +99,7 @@ def get_sample_data_info(data_name: Literal["iris", "tips", "stocks", "gapminder
99
99
 
100
100
  @mcp.tool()
101
101
  def validate_model_config(
102
- config: dict[str, Any],
102
+ dashboard_config: dict[str, Any],
103
103
  data_infos: list[DFMetaData], # Should be Optional[..]=None, but Cursor complains..
104
104
  auto_open: bool = True,
105
105
  ) -> ValidationResults:
@@ -109,7 +109,7 @@ def validate_model_config(
109
109
  The PyCafe link will be automatically opened in your default browser if auto_open is True.
110
110
 
111
111
  Args:
112
- config: Either a JSON string or a dictionary representing a Vizro model configuration
112
+ dashboard_config: Either a JSON string or a dictionary representing a Vizro dashboard model configuration
113
113
  data_infos: List of DFMetaData objects containing information about the data files
114
114
  auto_open: Whether to automatically open the PyCafe link in a browser
115
115
 
@@ -119,7 +119,7 @@ def validate_model_config(
119
119
  Vizro._reset()
120
120
 
121
121
  try:
122
- dashboard = vm.Dashboard.model_validate(config)
122
+ dashboard = vm.Dashboard.model_validate(dashboard_config)
123
123
  except ValidationError as e:
124
124
  return ValidationResults(
125
125
  valid=False,
@@ -333,14 +333,14 @@ Create an EDA dashboard based on the following dataset:{file_path_or_url}. Proce
333
333
 
334
334
  @mcp.tool()
335
335
  def validate_chart_code(
336
- config: ChartPlan,
336
+ chart_config: ChartPlan,
337
337
  data_info: DFMetaData,
338
338
  auto_open: bool = True,
339
339
  ) -> ValidationResults:
340
340
  """Validate the chart code created by the user and optionally open the PyCafe link in a browser.
341
341
 
342
342
  Args:
343
- config: A ChartPlan object with the chart configuration
343
+ chart_config: A ChartPlan object with the chart configuration
344
344
  data_info: Metadata for the dataset to be used in the chart
345
345
  auto_open: Whether to automatically open the PyCafe link in a browser
346
346
 
@@ -350,7 +350,7 @@ def validate_chart_code(
350
350
  Vizro._reset()
351
351
 
352
352
  try:
353
- chart_plan_obj = ChartPlan.model_validate(config)
353
+ chart_plan_obj = ChartPlan.model_validate(chart_config)
354
354
  except ValidationError as e:
355
355
  return ValidationResults(
356
356
  valid=False,
@@ -200,7 +200,7 @@ class TestValidateModelConfig:
200
200
  self, valid_dashboard_config: dict[str, Any], dashboard_config_validation_result: ValidationResults
201
201
  ) -> None:
202
202
  """Test successful validation of a dashboard configuration."""
203
- result = validate_model_config(config=valid_dashboard_config, data_infos=[], auto_open=False)
203
+ result = validate_model_config(dashboard_config=valid_dashboard_config, data_infos=[], auto_open=False)
204
204
 
205
205
  # Compare everything but the pycafe_url
206
206
  assert result.valid == dashboard_config_validation_result.valid
@@ -219,7 +219,9 @@ class TestValidateModelConfig:
219
219
  iris_metadata: DFMetaData,
220
220
  ) -> None:
221
221
  """Test validation of a dashboard with a scatter graph component."""
222
- result = validate_model_config(config=graph_dashboard_config, data_infos=[iris_metadata], auto_open=False)
222
+ result = validate_model_config(
223
+ dashboard_config=graph_dashboard_config, data_infos=[iris_metadata], auto_open=False
224
+ )
223
225
 
224
226
  # Compare everything but the pycafe_url
225
227
  assert result.valid == graph_dashboard_validation_result.valid
@@ -237,7 +239,7 @@ class TestValidateModelConfig:
237
239
  invalid_config = valid_dashboard_config.copy()
238
240
  invalid_config["titles"] = invalid_config.pop("title")
239
241
 
240
- result = validate_model_config(config=invalid_config, data_infos=[iris_metadata], auto_open=False)
242
+ result = validate_model_config(dashboard_config=invalid_config, data_infos=[iris_metadata], auto_open=False)
241
243
 
242
244
  assert result.valid is False
243
245
  assert "Validation Error: 1 validation error for Dashboard" in result.message
@@ -256,7 +258,7 @@ class TestValidateChartCode:
256
258
  chart_plan_validation_result: ValidationResults,
257
259
  ) -> None:
258
260
  """Test successful validation of chart code."""
259
- result = validate_chart_code(config=valid_chart_plan, data_info=iris_metadata, auto_open=False)
261
+ result = validate_chart_code(chart_config=valid_chart_plan, data_info=iris_metadata, auto_open=False)
260
262
 
261
263
  # Compare everything but the pycafe_url
262
264
  assert result.valid == chart_plan_validation_result.valid
@@ -274,7 +276,7 @@ class TestValidateChartCode:
274
276
  iris_metadata: DFMetaData,
275
277
  ) -> None:
276
278
  """Test validation error for an invalid chart plan."""
277
- result = validate_chart_code(config=invalid_chart_plan, data_info=iris_metadata, auto_open=False)
279
+ result = validate_chart_code(chart_config=invalid_chart_plan, data_info=iris_metadata, auto_open=False)
278
280
 
279
281
  assert result.valid is False
280
282
  assert result.python_code == ""
File without changes
File without changes
File without changes
File without changes