Discover the mcp-server-chart MCP Server—Your One‑Click AI Chart Generator
This article introduces the AntV‑developed mcp-server-chart MCP Server, explains how to set up the VSCode + Cline + Node environment, configure the server via JSON, and demonstrates its ability to generate network and bar charts through large‑model function calls, while also discussing current limitations and future improvements.
Introduction
The MCP (Model‑Centric Programming) tool enables large language models to call external services, turning chatbots into AI agents. Among the many MCP servers, the AntV team’s mcp-server-chart (https://github.com/antvis/mcp-server-chart) lets users generate visual charts simply by conversing with a model, eliminating the need to manually create charts for reports.
Environment Setup
We use VSCode with the Cline plugin as the MCP client, and install Node.js. The server is invoked via npx. The large‑model client in this guide uses the DeepSeek‑V3‑0324 API key. Detailed installation steps are described in the linked article.
Configuration
Add the server definitions to the MCP configuration file under the mcpServers section. The JSON below shows the required entries for the Amap map server and the chart server:
{
"mcpServers": {
"amap-maps": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@amap/amap-maps-mcp-server"],
"env": {"AMAP_MAPS_API_KEY": "your Amap API key"},
"disabled": false,
"autoApprove": ["maps_geo", "maps_around_search", "maps_search_detail"]
},
"mcp-server-chart": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@antv/mcp-server-chart"]
}
}
}Supported Chart Functions
The mcp-server-chart server exposes utility functions that can produce dozens of chart types, including bar, pie, line, and flow diagrams.
Case 1: Network Graph Generation
Prompt: "Please draw a relationship graph of characters from the drama \"The Legend of Zhen Huan\"" . The DeepSeek‑V3‑0324 model calls generate_network_graph in mcp-server-chart and returns a network diagram, as shown below.
Case 2: Bar Chart from Amap Data
Prompt: "Help me calculate the distances from Yongfeng Subway Station to Beijing South, North, Fengtai, and Qinghe stations and draw a bar chart" . The model first calls the Amap map server’s maps_distance function, then passes the results to generate_bar_chart in mcp-server-chart. The resulting bar chart is displayed below.
Future Optimizations
Although the chart generation is powerful, the current implementation does not honor modification prompts such as “set the x‑axis to stations and the y‑axis to distances and redraw the bar chart”. Adding configurable parameters or additional tool functions would allow users to control chart formatting more precisely.
Conclusion
The mcp-server-chart server provides a convenient, AI‑driven way to create visualizations, leveraging AntV’s visualization expertise. With further enhancements, the combination of this MCP server and large language models will become a potent tool for automatic chart generation.
Fun with Large Models
Master's graduate from Beijing Institute of Technology, published four top‑journal papers, previously worked as a developer at ByteDance and Alibaba. Currently researching large models at a major state‑owned enterprise. Committed to sharing concise, practical AI large‑model development experience, believing that AI large models will become as essential as PCs in the future. Let's start experimenting now!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
