1 Star 1 Fork 1

Gitee 极速下载/mcp-server-chart

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/antvis/mcp-server-chart
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

MCP Server Chart build npm Version smithery badge npm License

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
  • generate_area_chart - Generate a area chart, and return an image URL.
  • generate_bar_chart - Generate a bar chart, and return an image URL.
  • generate_boxplot_chart - Generate a boxplot chart, and return an image URL.
  • generate_column_chart - Generate a column chart, and return an image URL.
  • generate_dual_axes_chart - Generate a dual-axes chart, and return an image URL.
  • generate_fishbone_diagram - Generate a fishbone-diagram chart, and return an image URL.
  • generate_flow_diagram - Generate a flow-diagram chart, and return an image URL.
  • generate_funnel_chart - Generate a funnel chart, and return an image URL.
  • generate_histogram_chart - Generate a histogram chart, and return an image URL.
  • generate_line_chart - Generate a line chart, and return an image URL.
  • generate_liquid_chart - Generate a liquid chart, and return an image URL.
  • generate_mind_map - Generate a mind-map chart, and return an image URL.
  • generate_network_graph - Generate a network-graph chart, and return an image URL.
  • generate_organization_chart - Generate a organization-chart chart, and return an image URL.
  • generate_pie_chart - Generate a pie chart, and return an image URL.
  • generate_radar_chart - Generate a radar chart, and return an image URL.
  • generate_sankey_chart - Generate a sankey chart, and return an image URL.
  • generate_scatter_chart - Generate a scatter chart, and return an image URL.
  • generate_treemap_chart - Generate a treemap chart, and return an image URL.
  • generate_venn_chart - Generate a venn chart, and return an image URL.
  • generate_violin_chart - Generate a violin chart, and return an image URL.
  • generate_word_cloud_chart - Generate a word-cloud chart, and return an image URL.

🤖 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:

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

🎮 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": "<YOUR_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.

  • Method: POST
  • Parameter: Which will be passed to GPT-Vis-SSR for renderring. Such as, { "type": "line", "data": [{ "time": "2025-05", "value": "512" }, { "time": "2025-06", "value": "1024" }] }.
  • Return: The return object of HTTP service.
    • success: boolean Whether generate chart image successfully.
    • resultObj: string The chart image url.
    • errorMessage: string When success = false, return the error message.

🔨 Development

Install dependencies:

npm install

Build the server:

npm run build

Start the MCP server:

npm run start

📄 License

MIT@AntV.

MIT License Copyright (c) 2025 AntV Visualization Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

AntV 是蚂蚁集团开源的企业级数据可视化解决方案,让人们在数据世界里获得视觉化思考能力 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/mirrors/mcp-server-chart.git
git@gitee.com:mirrors/mcp-server-chart.git
mirrors
mcp-server-chart
mcp-server-chart
main

搜索帮助