AntV Chart Generator MCP server

Enables AI to generate data visualizations using AntV's charting capabilities, supporting various chart types from structured data without requiring direct knowledge of visualization libraries.
Back to servers
Setup instructions
Provider
AntV
Release date
Apr 28, 2025
Language
TypeScript
Package
Stats
50.6K downloads
2.2K stars

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.

Installation

Using with Desktop Applications

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"
      ]
    }
  }
}

Installation for SSE or Streamable Transport

To use the server with SSE or Streamable transport protocols:

  1. Install the package globally:
npm install -g @antv/mcp-server-chart
  1. Run the server with your preferred transport option:
# 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:

  • SSE transport: http://localhost:1122/sse
  • Streamable transport: http://localhost:1122/mcp

Command Line Options

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

Configuration Options

Environment Variables

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

Private Deployment

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.

Generate Records

To view chart generation records, you need to generate a service identifier:

  1. Use Alipay to scan and open the mini program
  2. Click the "My" menu, enter "My Services" page
  3. Click "Generate" button and copy the generated identifier
  4. Add the SERVICE_ID environment variable to your configuration:
{
  "mcpServers": {
    "AntV Map": {
      "command": "npx",
      "args": [
        "-y",
        "@antv/mcp-server-chart"
      ],
      "env": {
        "SERVICE_ID": "***********************************"
      }
    }
  }
}

Tool Filtering

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"
      }
    }
  }
}

Available Chart Types

MCP Server Chart supports over 25 chart types, including:

  • Area charts
  • Bar and column charts
  • Boxplot charts
  • Dual axes charts
  • Fishbone diagrams
  • Flow diagrams
  • Funnel charts
  • Histograms
  • Line charts
  • Liquid charts
  • Mind maps
  • Network graphs
  • Organization charts
  • Pie charts
  • Radar charts
  • Sankey charts
  • Scatter plots
  • Treemaps
  • Venn diagrams
  • Violin plots
  • Word clouds
  • Geographic visualizations (district maps, path maps, pin maps)

Note that geographic visualization chart generation currently only supports map generation within China.

How to install this MCP server

For Claude Code

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.

For Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.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

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later