The MCP Server Chart is a versatile visualization tool that provides chart generation capabilities through the Model Context Protocol. It leverages AntV's visualization libraries to create over 25 different chart types, making it easy to generate data visualizations for analysis and presentation.
To use MCP Server Chart with desktop AI applications like Claude, VSCode, Cline, Cherry Studio, or Cursor, add the following configuration:
For Mac:
{
"mcpServers": {
"mcp-server-chart": {
"command": "npx",
"args": [
"-y",
"@antv/mcp-server-chart"
]
}
}
}
For Windows:
{
"mcpServers": {
"mcp-server-chart": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"@antv/mcp-server-chart"
]
}
}
}
To use the server with SSE or Streamable transport protocols:
npm install -g @antv/mcp-server-chart
# For SSE transport (default endpoint: /sse)
mcp-server-chart --transport sse
# For Streamable transport
mcp-server-chart --transport streamable
The server will be accessible at:
http://localhost:1122/sse
http://localhost:1122/mcp
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
Variable | Description | Default | Example |
---|---|---|---|
VIS_REQUEST_SERVER |
Custom chart generation service URL | https://antv-studio.alipay.com/api/gpt-vis |
https://your-server.com/api/chart |
SERVICE_ID |
Service identifier for chart generation records | - | your-service-id-123 |
DISABLED_TOOLS |
Comma-separated list of tool names to disable | - | generate_fishbone_diagram,generate_mind_map |
For users who need private deployment, you can customize your chart generation service using the VIS_REQUEST_SERVER
environment variable:
{
"mcpServers": {
"mcp-server-chart": {
"command": "npx",
"args": [
"-y",
"@antv/mcp-server-chart"
],
"env": {
"VIS_REQUEST_SERVER": "<YOUR_VIS_REQUEST_SERVER>"
}
}
}
}
You can deploy an HTTP service in a private environment using AntV's GPT-Vis-SSR project.
To view chart generation records, you need to generate a service identifier:
SERVICE_ID
environment variable to your configuration:{
"mcpServers": {
"AntV Map": {
"command": "npx",
"args": [
"-y",
"@antv/mcp-server-chart"
],
"env": {
"SERVICE_ID": "***********************************"
}
}
}
}
You can disable specific chart generation tools using the DISABLED_TOOLS
environment variable:
{
"mcpServers": {
"mcp-server-chart": {
"command": "npx",
"args": [
"-y",
"@antv/mcp-server-chart"
],
"env": {
"DISABLED_TOOLS": "generate_fishbone_diagram,generate_mind_map"
}
}
}
}
MCP Server Chart supports over 25 chart types, including:
Note that geographic visualization chart generation currently only supports map generation within China.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "mcp-server-chart" '{"command":"npx","args":["-y","@antv/mcp-server-chart"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"mcp-server-chart": {
"command": "npx",
"args": [
"-y",
"@antv/mcp-server-chart"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"mcp-server-chart": {
"command": "npx",
"args": [
"-y",
"@antv/mcp-server-chart"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect