vizro-mcp 0.1.0__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 (25) hide show
  1. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/CHANGELOG.md +8 -0
  2. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/PKG-INFO +26 -5
  3. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/README.md +25 -4
  4. vizro_mcp-0.1.1/assets/vizro-mcp.gif +0 -0
  5. vizro_mcp-0.1.1/glama.json +4 -0
  6. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/src/vizro_mcp/__init__.py +1 -1
  7. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/src/vizro_mcp/server.py +6 -6
  8. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/tests/unit/vizro_mcp/test_server.py +7 -5
  9. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/.gitignore +0 -0
  10. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/LICENSE.txt +0 -0
  11. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/assets/claude_prompt.png +0 -0
  12. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/assets/claude_validate.png +0 -0
  13. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/assets/claude_working.png +0 -0
  14. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/assets/cursor_working.png +0 -0
  15. /vizro_mcp-0.1.0/changelog.d/20250506_175642_maximilian_schulz_0_1_0.md → /vizro_mcp-0.1.1/changelog.d/20250515_115815_lingyi_zhang_0_1_1.md +0 -0
  16. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/changelog.d/new_fragment.md.j2 +0 -0
  17. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/changelog.d/scriv.ini +0 -0
  18. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/hatch.toml +0 -0
  19. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/pyproject.toml +0 -0
  20. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/src/vizro_mcp/_schemas/__init__.py +0 -0
  21. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/src/vizro_mcp/_schemas/schemas.py +0 -0
  22. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/src/vizro_mcp/_utils/__init__.py +0 -0
  23. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/src/vizro_mcp/_utils/utils.py +0 -0
  24. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/src/vizro_mcp/py.typed +0 -0
  25. {vizro_mcp-0.1.0 → vizro_mcp-0.1.1}/uv.lock +0 -0
@@ -1,3 +1,11 @@
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
+
1
9
  <a id='changelog-0.1.0'></a>
2
10
 
3
11
  # 0.1.0 — 2025-05-06
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vizro-mcp
3
- Version: 0.1.0
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,10 +17,16 @@ 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:
@@ -60,10 +66,27 @@ In principle, the Vizro MCP server works with _any_ MCP enabled LLM applications
60
66
 
61
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.
62
68
 
63
- ## 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.
64
87
 
65
88
  <details>
66
- <summary><strong>Claude</strong></summary>
89
+ <summary><strong>Claude Desktop</strong></summary>
67
90
 
68
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).
69
92
 
@@ -114,8 +137,6 @@ Similarly, when using Cursor, after a short pause, you should see a green light
114
137
 
115
138
  </details>
116
139
 
117
- 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.
118
-
119
140
  ## 💻 Usage
120
141
 
121
142
  ### Use prompt templates to get specific dashboards quickly
@@ -1,7 +1,13 @@
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:
@@ -41,10 +47,27 @@ In principle, the Vizro MCP server works with _any_ MCP enabled LLM applications
41
47
 
42
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.
43
49
 
44
- ## 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.
45
68
 
46
69
  <details>
47
- <summary><strong>Claude</strong></summary>
70
+ <summary><strong>Claude Desktop</strong></summary>
48
71
 
49
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).
50
73
 
@@ -95,8 +118,6 @@ Similarly, when using Cursor, after a short pause, you should see a green light
95
118
 
96
119
  </details>
97
120
 
98
- 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.
99
-
100
121
  ## 💻 Usage
101
122
 
102
123
  ### Use prompt templates to get specific dashboards quickly
Binary file
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "https://glama.ai/mcp/schemas/server.json",
3
+ "maintainers": ["maxschulz-COL", "lingyielia"]
4
+ }
@@ -3,7 +3,7 @@ import sys
3
3
 
4
4
  from .server import mcp
5
5
 
6
- __version__ = "0.1.0"
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
File without changes