GitHub - antvis/mcp-server-chart: 🤖 A visualization Model Context Protocol server for generating 20+ visual charts using @antvis. (original) (raw)

A Model Context Protocol server for generating charts using AntV.

This is a TypeScript-based MCP server that provides chart generation capabilities. It allows you to create various types of charts through MCP tools. You can also use it in Dify.

✨ Features

Now 20+ charts supported.

mcp-server-chart preview

🤖 Usage

To use with Desktop APP, such as Claude, VSCode, Cline, Cherry Studio, Cursor, and so on, add the MCP server config below. On Mac system:

{ "mcpServers": { "mcp-server-chart": { "command": "npx", "args": [ "-y", "@antv/mcp-server-chart" ] } } }

On Window system:

{ "mcpServers": { "mcp-server-chart": { "command": "cmd", "args": [ "/c", "npx", "-y", "@antv/mcp-server-chart" ] } } }

Also, you can use it on aliyun, modelscope, glama.ai, smithery.ai or others with HTTP, SSE Protocol.

🚰 Run with SSE or Streamable transport

Install the package globally.

npm install -g @antv/mcp-server-chart

Run the server with your preferred transport option:

For SSE transport (default endpoint: /sse)

mcp-server-chart --transport sse

For Streamable transport with custom endpoint

mcp-server-chart --transport streamable

Then you can access the server at:

🎮 CLI Options

You can also use the following CLI options when running the MCP server. Command options by run cli with -h.

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

📠 Private Deployment

MCP Server Chart provides a free chart generation service by default. For users with a need for private deployment, they can try using VIS_REQUEST_SERVER to customize their own chart generation service.

{ "mcpServers": { "mcp-server-chart": { "command": "npx", "args": [ "-y", "@antv/mcp-server-chart" ], "env": { "VIS_REQUEST_SERVER": "" } } } }

You can use AntV's project GPT-Vis-SSR to deploy an HTTP service in a private environment, and then pass the URL address through env VIS_REQUEST_SERVER.

🔨 Development

Install dependencies:

Build the server:

Start the MCP server:

📄 License

MIT@AntV.