ECharts 图表可视化 MCP

hustcc/MCP-ECharts
Hosted
68 Stars 1.6w 次浏览 hustcc 更新于 2026-08-23

使用AI MCP动态生成Apache ECharts图表。支持所有ECharts功能,导出为png、svg和option格式,轻量且安全。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "mcp-echarts": {
      "args": [
        "/c",
        "npx",
        "-y",
        "mcp-echarts"
      ],
      "command": "cmd"
    }
  }
}

可用工具 (17 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

generate_echarts 5 个参数 需填 1 项

Generate visual charts using Apache ECharts with echarts option and configuration dynamically. Apache ECharts is an Open Source JavaScript Visualization Library, which is used to create interactive charts and visualizations in web applications. It supports a wide range of chart types, including line charts, bar charts, pie charts, scatter plots, and more. ECharts is highly customizable and can be integrated with various data sources to create dynamic visualizations.

必填参数:echartsOption

generate_line_chart 12 个参数 需填 1 项

Generate a line chart to show trends over time, such as, the ratio of Apple computer sales to Apple's profits changed from 2000 to 2016.

必填参数:data

generate_bar_chart 10 个参数 需填 1 项

Generate a bar chart to show data for numerical comparisons among different categories, such as, comparing categorical data and for horizontal comparisons.

必填参数:data

generate_pie_chart 7 个参数 需填 1 项

Generate a pie chart to show the proportion of parts, such as, market share and budget allocation.

必填参数:data

generate_radar_chart 6 个参数 需填 1 项

Generate a radar chart to display multidimensional data (four dimensions or more), such as, evaluate Huawei and Apple phones in terms of five dimensions: ease of use, functionality, camera, benchmark scores, and battery life.

必填参数:data

generate_scatter_chart 8 个参数 需填 1 项

Generate a scatter chart to show the relationship between two variables, helps discover their relationship or trends, such as, the strength of correlation, data distribution patterns.

必填参数:data

generate_sankey_chart 7 个参数 需填 1 项

Generate a sankey chart to visualize the flow of data between different stages or categories, such as, the user journey from landing on a page to completing a purchase.

必填参数:data

generate_funnel_chart 6 个参数 需填 1 项

Generate a funnel chart to visualize the progressive reduction of data as it passes through stages, such as, the conversion rates of users from visiting a website to completing a purchase.

必填参数:data

generate_gauge_chart 8 个参数 需填 1 项

Generate a gauge chart to display single indicator's current status, such as, CPU usage rate, completion progress, or performance scores.

必填参数:data

generate_treemap_chart 6 个参数 需填 1 项

Generate a treemap chart to display hierarchical data and can intuitively show comparisons between items at the same level, such as, show disk space usage with treemap.

必填参数:data

generate_sunburst_chart 6 个参数 需填 1 项

Generate a sunburst chart to display multi-level hierarchical data, such as, organizational structure, file system hierarchy, or category breakdown.

必填参数:data

generate_heatmap_chart 8 个参数 需填 1 项

Generate a heatmap chart to display data density or intensity distribution, such as, user activity patterns by time and day, or correlation matrix.

必填参数:data

generate_candlestick_chart 7 个参数 需填 1 项

Generate a candlestick chart for financial data visualization, such as, stock prices, cryptocurrency prices, or other OHLC (Open-High-Low-Close) data.

必填参数:data

generate_boxplot_chart 8 个参数 需填 1 项

Generate a boxplot chart to show data for statistical summaries among different categories, such as, comparing the distribution of data points across categories.

必填参数:data

generate_graph_chart 7 个参数 需填 1 项

Generate a network graph chart to show relationships (edges) between entities (nodes), such as, relationships between people in social networks.

必填参数:data

generate_parallel_chart 7 个参数 需填 2 项

Generate a parallel coordinates chart to display multi-dimensional data, such as, comparing different products across multiple attributes.

必填参数:data、dimensions

generate_tree_chart 8 个参数 需填 1 项

Generate a tree chart to display hierarchical data structure, such as, organizational chart, family tree, or file directory structure.

必填参数:data

服务介绍

MCP ECharts

使用AI MCP动态生成Apache ECharts图表和图形。用于图表生成和数据分析。

✨ 特性

  • 完全支持ECharts的所有特性和语法,包括数据、样式、主题等。
  • 支持导出为pngsvgoption格式,并对ECharts进行验证,以便模型多轮输出正确的语法和图形。
  • 轻量级,可以使用零依赖安装。
  • 极其安全,完全在本地生成,不依赖任何远程服务。

🤖 使用方法

桌面应用程序一起使用,如Claude、VSCode、Cline、Cherry Studio等,添加以下MCP服务器配置。在Mac系统上:


{

  "mcpServers": {

    "mcp-echarts": {

      "command": "npx",

      "args": [

        "-y",

        "mcp-echarts"

      ]

    }

  }

}

在Windows系统上:


{

  "mcpServers": {

    "mcp-echarts": {

      "command": "cmd",

      "args": [

        "/c",

        "npx",

        "-y",

        "mcp-echarts"

      ]

    }

  }

}

此外,您还可以通过HTTP、SSE协议在阿里云、modelscope、glama.ai、smithery.ai或其他平台上使用它。

🔨 开发

安装依赖项:


npm install

构建服务器:


npm run build

启动MCP服务器:


npm run start

📄 许可证

MIT@hustcc

相关 MCP 服务