MCP server chart: Generates visual charts (25+) using @antvis. Model context visualization.
# MCP Server Chart [](https://mcp.dev) [](https://github.com/antvis/mcp-server-chart/actions/workflows/build.yml) [](https://www.npmjs.com/package/@antv/mcp-server-chart) [](https://smithery.ai/server/@antvis/mcp-server-chart) [](https://www.npmjs.com/package/@antv/mcp-server-chart)
A Model Context Protocol (MCP) server for generating charts using [AntV](https://github.com/antvis/). This server allows AI agents and applications to request and receive chart visualizations based on provided data and specifications. It's built with TypeScript and supports various chart types through MCP tools. It can also be integrated with platforms like [Dify](https://marketplace.dify.ai/plugins/antv/visualization).
<a href="https://www.star-history.com/#antvis/mcp-server-chart&Date">
<img width="512" src="https://api.star-history.com/svg?repos=antvis/mcp-server-chart&type=Date" alt="Star History Chart"/>
</a>
## Table of Contents
- [Features](#features)
- [Usage](#usage)
- [Running with SSE or Streamable Transport](#running-with-sse-or-streamable-transport)
- [CLI Options](#cli-options)
- [Environment Variables](#environment-variables)
- [VIS_REQUEST_SERVER](#vis_request_server)
- [SERVICE_ID](#service_id)
- [DISABLED_TOOLS](#disabled_tools)
- [Private Deployment](#private-deployment)
- [Generating Records](#generating-records)
- [Tool Filtering](#tool-filtering)
- [Development](#development)
- [License](#license)
## Features
This MCP server supports generating over 25 chart types using AntV's visualization libraries.
<img width="768" alt="mcp-server-chart preview" src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*IyIRQIQHyKYAAAAAgCAAAAgAemJ7AQ/fmt.avif" />
The following chart generation tools are available:
1. `generate_area_chart`: Generates an area chart to display data trends over a continuous variable.
2. `generate_bar_chart`: Generates a bar chart for comparing values across categories (horizontal).
3. `generate_boxplot_chart`: Generates a boxplot to display data distribution, including median, quartiles, and outliers.
4. `generate_column_chart`: Generates a column chart for comparing values across categories (vertical).
5. `generate_district_map`: Generates a district map to visualize administrative divisions and data distribution within them.
6. `generate_dual_axes_chart`: Generates a dual-axes chart to display the relationship between two variables with different units or ranges.
7. `generate_fishbone_diagram`: Generates a fishbone diagram (Ishikawa diagram) for root cause analysis.
8. `generate_flow_diagram`: Generates a flowchart to display the steps and sequence of a process.
9. `generate_funnel_chart`: Generates a funnel chart to visualize data loss at different stages.
10. `generate_histogram_chart`: Generates a histogram to display data distribution by dividing it into intervals.
11. `generate_line_chart`: Generates a line chart to display data trends over time or another continuous variable.
12. `generate_liquid_chart`: Generates a liquid chart to display proportions as a water-filled sphere.
13. `generate_mind_map`: Generates a mind map to display thought processes and hierarchical information.
14. `generate_network_graph`: Generates a network graph to display relationships and connections between nodes.
15. `generate_organization_chart`: Generates an organizational chart to display the structure of an organization.
16. `generate_path_map`: Generates a path map to display route planning results for Points of Interest (POIs).
17. `generate_pie_chart`: Generates a pie chart to display proportions as sectors of a circle.
18. `generate_pin_map`: Generates a pin map to show the distribution of POIs.
19. `generate_radar_chart`: Generates a radar chart to display multi-dimensional data comprehensively.
20. `generate_sankey_chart`: Generates a Sankey chart to display data flow and volume between nodes.
21. `generate_scatter_chart`: Generates a scatter plot to display the relationship between two variables.
22. `generate_treemap_chart`: Generates a treemap to display hierarchical data as nested rectangles.
23. `generate_venn_chart`: Generates a Venn diagram to display relationships between sets.
24. `generate_violin_chart`: Generates a violin plot to display data distribution with features of boxplots and density plots.
25. `generate_word_cloud_chart`: Generates a word cloud to display the frequency of words in textual data.
> [!NOTE]
> The geographic visualization charts (district map, path map, and pin map) use [AMap service](https://lbs.amap.com/) and currently only support map generation within China.
## Usage
To use this MCP server with desktop applications like Claude, VSCode, [Cline](https://cline.bot/mcp-marketplace), Cherry Studio, or Cursor, configure the MCP server as follows:
**macOS:**
```json
{
"mcpServers": {
"mcp-server-chart": {
"command": "npx",
"args": [
"-y",
"@antv/mcp-server-chart"
]
}
}
}
Windows:
{
"mcpServers": {
"mcp-server-chart": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"@antv/mcp-server-chart"
]
}
}
}
This MCP server can also be used on platforms like aliyun, modelscope, glama.ai, and smithery.ai via HTTP or SSE protocols.
You can run the MCP server using either Server-Sent Events (SSE) or a Streamable transport.
npm install -g @antv/mcp-server-chart
# For SSE transport (default endpoint: /sse)
mcp-server-chart --transport sse
# For Streamable transport with custom endpoint
mcp-server-chart --transport streamable
http://localhost:1122/sse
http://localhost:1122/mcp
Use the following command-line options when running the MCP server. Run mcp-server-chart -h
for a full list.
MCP Server Chart CLI
Options:
--transport, -t Specify the transport protocol: "stdio", "sse", or "streamable" (default: "stdio")
--port, -p Specify the port for SSE or streamable transport (default: 1122)
--endpoint, -e Specify the endpoint for the transport:
- For SSE: default is "/sse"
- For streamable: default is "/mcp"
--help, -h Show this help message
The following environment variables can be used to configure the MCP server:
| Variable | Description
antvis/mcp-server-chart
April 25, 2025
July 7, 2025
TypeScript