To install vchart-mcp-server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @VisActor/vchart-mcp-server --client claude
Running with SSE or Streamable Transport
Install and Start
Install @visactor/vchart-mcp-server globally:
npm install -g @visactor/vchart-mcp-server
Start the server:
# For SSE transport (default endpoint: /sse)
mcp-server-chart --transport sse
# For Streamable transport (default endpoint: /streamable)
mcp-server-chart --transport streamable
Options:
-t, --transport <type> Transport type (stdio, sse, streamable) [default: stdio]
-p, --port <port> Port number for HTTP-based transports [default: 3000]
-e, --endpoint <path> Endpoint path for HTTP-based transports [default: /message]
-h, --help Show this help message
Examples:
node index.js # Start with stdio transport
node index.js -t sse -p 3000 # Start with SSE transport on port 3000
node index.js -t sse -p 3000 -e /api/sse # Start with SSE transport on custom endpoint
node index.js -t streamable -p 3001 -e /stream # Start with streamable transport on custom endpoint
Example Usage in AI Conversations
Once configured, you can ask your AI assistant to create charts:
“Create an area chart showing monthly sales data”
The assistant will use the generate_cartesian_chart tool with parameters:
- chartType: "area"
- dataTable: your sales data
- xField: "month"
- yField: "sales"
“Generate a dual-axis chart comparing revenue and user growth”
The assistant will use the generate_dual_axis_chart tool with parameters:
- dataTable: your business data
- xField: "time"
- yField: ["revenue", "userGrowth"]
“Show me an interactive HTML bar chart of quarterly performance”
The assistant will use the generate_cartesian_chart tool with parameters:
- chartType: "bar"
- dataTable: your quarterly data
- xField: "quarter"
- yField: "performance"
- output: "html"
“Create a pie chart of product sales share”
The assistant will use the generate_polar_chart tool with parameters:
- chartType: "pie"
- dataTable: your sales data
- categoryField: "product"
- valueField: "sales"
“Draw a scatter plot of height and weight”
The assistant will use the generate_scatter_chart tool with parameters:
- dataTable: your body data
- xField: "height"
- yField: "weight"
- colorField: "gender" (optional)
“Create a radar chart for team skill assessment”
The assistant will use the generate_polar_chart tool with parameters:
- chartType: "radar"
- dataTable: your assessment data
- categoryField: "skill"
- valueField: "score"
“Generate a Sankey diagram showing data flow”
The assistant will use the generate_sankey_chart tool with parameters:
- dataTable: your flow data
- sourceField: "from"
- targetField: "to"
- valueField: "amount"
“Create a heatmap showing data distribution”
The assistant will use the generate_heatmap_chart tool with parameters:
- dataTable: your distribution data
- xField: "x_category"
- yField: "y_category"
- sizeField: "value"
Development
Prerequisites
Node.js version >= 22.7.5
Build
npm run build
Development Mode (Auto Rebuild)
npm run watch
Testing
# Test chart generation
npm run test-tool
# Run MCP Inspector for debugging
npm run inspector
Debugging
Since the MCP server communicates via stdio, debugging can be challenging. Use MCP Inspector for development:
npm run inspector
Testing in AI Editors
To test the MCP server in an AI editor, use the following configuration:
Currently, images and HTML generated by vchart-mcp-server are produced via https://vmind.visactor.com/export. For private deployment, set the VIMD_IMAGE_SERVER environment variable to specify your own image generation server.
vchart-mcp-server
A Model Context Protocol (MCP) server for the @visactor/vchart that enables AI assistants to generate interactive charts and visualizations.
English | 简体中文
Table of Contents
generate_cartesian_chartgenerate_polar_chartgenerate_hierarchical_chartgenerate_progress_chartgenerate_wordcloud_venngenerate_range_column_chartgenerate_dual_axis_chartgenerate_scatter_chartgenerate_sankey_chartgenerate_heatmap_chartFeatures
Chart Output Formats
Each chart can be generated in multiple formats:
Common Parameters Supported by All Charts
output"spec"|"image"|"html""image"width500height500titlesubTitletitleOrientchartThemebackgroundcolorsSupported Chart Types and Tools
generate_cartesian_chartGenerates Cartesian coordinate system charts, including area, bar, line, waterfall, funnel, and animated ranking bar charts.
dataTablechartType"line"|"area"|"bar"|"waterfall"|"funnel"|"ranking_bar"xFieldstringyFieldstringcolorFieldstringtimeFieldstringstackOrPercent"stack"|"percent"transposebooleanxAxisType"band"|"linear"xAxisOrient"top"|"bottom"xAxisTitlestringxAxisHasGridbooleanxAxisHasLabelbooleanxAxisHasTickbooleanyAxisType"band"|"linear"yAxisOrient"left"|"right"yAxisTitlestringyAxisHasGridbooleanyAxisHasLabelbooleanyAxisHasTickbooleangenerate_polar_chartGenerates polar coordinate system charts, including radar, rose, and pie charts.
dataTablechartType"radar"|"rose"|"pie"categoryFieldstringvalueFieldstringcolorFieldstringangleAxisTitlestringangleAxisHasGridbooleanangleAxisHasLabelbooleanangleAxisHasTickbooleanangleAxisType"band"|"linear"radiusAxisTitlestringradiusAxisHasGridbooleanradiusAxisHasLabelbooleanradiusAxisHasTickbooleanradiusAxisType"band"|"linear"generate_hierarchical_chartGenerates hierarchical charts, including treemap, circle packing, and sunburst charts.
dataTablechartType"sunburst"|"treemap"|"circle_packing"colorFieldstringvalueFieldstringgenerate_progress_chartGenerates progress charts, including circular, linear, gauge, and liquid charts.
dataTablechartType"linear_progress"|"circular_progress"|"gauge"|"liquid"valueFieldstringcolorFieldstringgenerate_wordcloud_vennGenerates word cloud or Venn diagrams, suitable for displaying keywords and frequencies in text data.
Parameters:
dataTablechartType"wordcloud"|"venn"colorFieldstringvalueFieldstringgenerate_range_column_chartGenerates horizontal range bar charts, suitable for displaying data ranges and comparisons.
dataTableany[]xFieldstringyField[string, string]colorFieldstringxAxisType"band"|"linear"xAxisOrient"top"|"bottom"xAxisTitlestringxAxisHasGridbooleanxAxisHasLabelbooleanxAxisHasTickbooleanyAxisType"band"|"linear"yAxisOrient"left"|"right"yAxisTitlestringyAxisHasGridbooleanyAxisHasLabelbooleanyAxisHasTickbooleangenerate_dual_axis_chartCombination chart with two Y axes, for comparing two metrics with different units.
dataTableany[]xFieldstringyField[string, string]colorFieldstringstackOrPercent"stack"|"percent"xAxisOrient"top"|"bottom"xAxisTitlestringxAxisHasGridbooleanxAxisHasLabelbooleanxAxisHasTickbooleanleftYAxisTitlestringleftYAxisHasGridbooleanleftYAxisHasLabelbooleanleftYAxisHasTickbooleanrightYAxisTitlestringrightYAxisHasGridbooleanrightYAxisHasLabelbooleanrightYAxisHasTickbooleangenerate_scatter_chartDisplays the relationship between two variables, suitable for discovering patterns and outliers.
dataTableany[]xFieldstringyFieldstringcolorFieldstringsizeFieldstringxAxisType"band"|"linear"xAxisOrient"top"|"bottom"xAxisTitlestringxAxisHasGridbooleanxAxisHasLabelbooleanxAxisHasTickbooleanyAxisType"band"|"linear"yAxisOrient"left"|"right"yAxisTitlestringyAxisHasGridbooleanyAxisHasLabelbooleanyAxisHasTickbooleangenerate_sankey_chartGenerates Sankey diagrams.
dataTableany[]sourceFieldstringtargetFieldstringvalueFieldstringgenerate_heatmap_chartGenerates heatmaps, suitable for displaying data density and distribution.
dataTableany[]xFieldstringyFieldstringsizeFieldstringxAxisType"band"|"linear"xAxisOrient"top"|"bottom"xAxisTitlestringxAxisHasGridbooleanxAxisHasLabelbooleanxAxisHasTickbooleanyAxisType"band"|"linear"yAxisOrient"left"|"right"yAxisTitlestringyAxisHasGridbooleanyAxisHasLabelbooleanyAxisHasTickbooleanUsage
To use in desktop applications (such as Trae, Claude, VSCode, Cline, Cherry Studio, Cursor, etc.), add the following MCP server configuration:
MacOS
Windows
Installing via Smithery
To install vchart-mcp-server for Claude Desktop automatically via Smithery:
Running with SSE or Streamable Transport
Install and Start
Install
@visactor/vchart-mcp-serverglobally:Start the server:
Then you can access the server at:
http://localhost:3001/ssehttp://localhost:3001/streamableOther CLI Options
Example Usage in AI Conversations
Once configured, you can ask your AI assistant to create charts:
“Create an area chart showing monthly sales data”
“Generate a dual-axis chart comparing revenue and user growth”
“Show me an interactive HTML bar chart of quarterly performance”
“Create a pie chart of product sales share”
“Draw a scatter plot of height and weight”
“Create a radar chart for team skill assessment”
“Generate a Sankey diagram showing data flow”
“Create a heatmap showing data distribution”
Development
Prerequisites
Build
Development Mode (Auto Rebuild)
Testing
Debugging
Since the MCP server communicates via stdio, debugging can be challenging. Use MCP Inspector for development:
Testing in AI Editors
To test the MCP server in an AI editor, use the following configuration:
Environment Variables
VIMD_IMAGE_SERVER- Custom image generation server URL (default: https://vmind.visactor.com/export)Private Deployment
Currently, images and HTML generated by vchart-mcp-server are produced via https://vmind.visactor.com/export. For private deployment, set the
VIMD_IMAGE_SERVERenvironment variable to specify your own image generation server.Image generation service can be deployed privately refer to https://github.com/VisActor/vchart-mcp-server-export.
Star History
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
Related Projects