Replace direct python path in .mcp.json with run.sh wrapper scripts
that automatically locate the venv in cache or local directory.
Problem: .venv symlinks are gitignored, causing them to be wiped on
every git operation. The SessionStart hook should recreate them but
this was unreliable, leading to repeated MCP server failures.
Solution: run.sh scripts that:
- First check ~/.cache/claude-mcp-venvs/leo-claude-mktplace/{server}/.venv
- Fallback to local .venv if exists
- Exit with helpful error if neither found
This eliminates dependency on symlinks entirely - the scripts are
tracked in git and will always be present after clone/pull/update.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
viz-platform MCP Server
Model Context Protocol (MCP) server for Dash Mantine Components validation and visualization tools.
Overview
This MCP server provides 21 tools for:
- DMC Validation: Version-locked component registry prevents Claude from hallucinating invalid props
- Chart Creation: Plotly-based visualization with theme integration
- Layout Composition: Dashboard layouts with responsive grids
- Theme Management: Design token-based theming system
- Page Structure: Multi-page Dash app generation
Tools
DMC Tools (3)
| Tool | Description |
|---|---|
list_components |
List available DMC components by category |
get_component_props |
Get valid props, types, and defaults for a component |
validate_component |
Validate component definition before use |
Chart Tools (2)
| Tool | Description |
|---|---|
chart_create |
Create Plotly chart (line, bar, scatter, pie, histogram, area, heatmap) |
chart_configure_interaction |
Configure chart interactions (zoom, pan, hover) |
Layout Tools (5)
| Tool | Description |
|---|---|
layout_create |
Create dashboard layout structure |
layout_add_filter |
Add filter components to layout |
layout_set_grid |
Configure responsive grid settings |
layout_get |
Retrieve layout configuration |
layout_add_section |
Add sections to layout |
Theme Tools (6)
| Tool | Description |
|---|---|
theme_create |
Create new theme with design tokens |
theme_extend |
Extend existing theme with overrides |
theme_validate |
Validate theme completeness |
theme_export_css |
Export theme as CSS custom properties |
theme_list |
List available themes |
theme_activate |
Set active theme for visualizations |
Page Tools (5)
| Tool | Description |
|---|---|
page_create |
Create new page structure |
page_add_navbar |
Add navigation bar to page |
page_set_auth |
Configure page authentication |
page_list |
List available pages |
page_get_app_config |
Get full app configuration |
Configuration
Environment Variables
| Variable | Required | Description |
|---|---|---|
DMC_VERSION |
No | Dash Mantine Components version (auto-detected if installed) |
VIZ_DEFAULT_THEME |
No | Default theme name |
CLAUDE_PROJECT_DIR |
No | Project directory for theme storage |
Theme Storage
Themes can be stored at two levels:
- User-level:
~/.config/claude/themes/ - Project-level:
{project}/.viz-platform/themes/
Project-level themes take precedence.
Component Registry
The server uses a static JSON registry for DMC component validation:
- Pre-generated from DMC source code
- Version-tagged (e.g.,
dmc_2_5.json) - Prevents hallucination of non-existent props
- Fast, deterministic validation
Registry files are stored in registry/ directory.
Tests
94 tests with coverage:
test_config.py: 82% coveragetest_component_registry.py: 92% coveragetest_dmc_tools.py: 88% coveragetest_chart_tools.py: 68% coveragetest_theme_tools.py: 99% coverage
Run tests:
cd mcp-servers/viz-platform
source .venv/bin/activate
pytest tests/ -v
Dependencies
- Python 3.10+
- FastMCP
- plotly
- dash-mantine-components (optional, for version detection)
Usage
This MCP server is used by the viz-platform plugin. See plugins/viz-platform/README.md for usage instructions.