Skip to content
Back to search

mcp-echarts

๐Ÿงฌ Generate visual charts using ECharts with AI MCP dynamically, used for chart generation and data analysis.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/hustcc--mcp-echarts/badge.svg)](/listings/hustcc--mcp-echarts)

HTML

<a href="/listings/hustcc--mcp-echarts"><img src="/api/listings/hustcc--mcp-echarts/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md ยท README ยท 184 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # <img src="https://echarts.apache.org/zh/images/favicon.png" height="24"/> MCP ECharts ![](https://badge.mcpx.dev?type=server 'MCP Server') [![build](https://github.com/hustcc/mcp-echarts/actions/workflows/build.yml/badge.svg)](https://github.com/hustcc/mcp-echarts/actions/workflows/build.yml) [![npm Version](https://img.shields.io/npm/v/mcp-echarts.svg)](https://www.npmjs.com/package/mcp-echarts) [![Listed on Skillselion](https://skillselion.com/badge/mcp/tool/io.github.hustcc/mcp-echarts.svg)](https://skillselion.com/mcp/tool/io.github.hustcc/mcp-echarts) [![npm License](https://img.shields.io/npm/l/mcp-echarts.svg)](https://www.npmjs.com/package/mcp-echarts) [![Trust Score](https://archestra.ai/mcp-catalog/api/badge/quality/hustcc/mcp-echarts)](https://archestra.ai/mcp-catalog/hustcc__mcp-echarts)
  2. Generate <img src="https://echarts.apache.org/zh/images/favicon.png" height="14"/> [Apache ECharts](https://echarts.apache.org/) with AI MCP dynamically for chart generation and data analysis. _Also you can use <img src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*ZFK8SrovcqgAAAAAAAAAAAAAemJ7AQ/original" height="14"/> [mcp-server-chart](https://github.com/antvis/mcp-server-chart) to generate chart, graph, map._
  3. <div align="center">
  4. <img width="648" alt="mcp-echarts" src="https://mdn.alipayobjects.com/huamei_1gdzij/afts/img/A*s3w3SpMMPDQAAAAARzAAAAgAemB7AQ/original" />
  5. </div>
  6. <div align="center">
  7. <img width="648" alt="award" src="https://github.com/user-attachments/assets/962ab78f-387d-412d-81e3-13981328082d" />
  8. </div>
  9. ## โœจ Features
  10. - Fully support all features and syntax of `ECharts`, include data, style, theme and so on.
  11. - Support exporting to `png`, `svg`, and `option` formats, with validation for `ECharts` to facilitate the model's multi-round output of correct syntax and graphics.
  12. - MinIO Integration, store charts in `MinIO` object storage and return URLs instead of Base64 data for better performance and sharing capabilities.
  13. - Lightweight, we can install it easily with `zero dependence`.
  14. - Extremely `secure`, fully generated locally, without relying on any remote services.
  15. ## ๐Ÿค– Usage
  16. ### Prerequisites
  17. - Node.js 18 or higher is required.
  18. ### Desktop Applications (stdio transport)
  19. To use with `Desktop APP`, such as Claude, VSCode, Cline, Cherry Studio, and so on, add the MCP server config below. On Mac system:
  20. ```json
  21. {
  22. "mcpServers": {
  23. "mcp-echarts": {
  24. "command": "npx",
  25. "args": [
  26. "-y",
  27. "mcp-echarts"
  28. ]
  29. }
  30. }
  31. }
  32. ```
  33. On Window system:
  34. ```json
  35. {
  36. "mcpServers": {
  37. "mcp-echarts": {
  38. "command": "cmd",
  39. "args": [
  40. "/c",
  41. "npx",
  42. "-y",
  43. "mcp-echarts"
  44. ]
  45. }
  46. }
  47. }
  48. ```
  49. Also, you can use it on [modelscope](https://www.modelscope.cn/mcp/servers/hustcc/MCP-ECharts), [glama.ai](https://glama.ai/mcp/servers/@hustcc/mcp-echarts), [skillselion.com](https://skillselion.com/mcp/tool/io.github.hustcc/mcp-echarts) or others with HTTP, SSE Protocol.
  50. ## ๐Ÿšฐ Run with SSE or Streamable transport
  51. Install the package globally.
  52. ```bash
  53. npm install -g mcp-echarts
  54. ```
  55. Run the server with your preferred transport option:
  56. ```bash
  57. # For SSE transport (default endpoint: /sse)
  58. mcp-echarts -t sse
  59. # For Streamable transport with custom endpoint
  60. mcp-echarts -t streamable
  61. ```
  62. Then you can access the server at:
  63. - SSE transport: `http://localhost:3033/sse`
  64. - Streamable transport: `http://localhost:3033/mcp`
  65. ## ๐ŸŽฎ CLI Options
  66. You can also use the following CLI options when running the MCP server. Command options by run cli with `-h`.
  67. ```plain
  68. MCP ECharts CLI
  69. Options:
  70. --transport, -t Specify the transport protocol: "stdio", "sse", or "streamable" (default: "stdio")
  71. --port, -p Specify the port for SSE or streamable transport (default: 3033)
  72. --endpoint, -e Specify the endpoint for the transport:
  73. - For SSE: default is "/sse"
  74. - For streamable: default is "/mcp"
  75. --help, -h Show this help message
  76. ```
  77. ## ๐Ÿ—‚๏ธ MinIO Configuration (Optional)
  78. For better performance and sharing capabilities, you can configure MinIO object storage to store chart images as URLs instead of Base64 data.
  79. > [!NOTE]
  80. > If MinIO is not configured or unavailable, the system automatically falls back to `Base64` data output, ensuring compatibility.
  81. We can Integrate with `MinIO` object storage providers below.
  82. - [MinIO](https://min.io/): High-performance, S3-compatible object storage. Use [MinIO JavaScript Client](https://docs.min.io/enterprise/aistor-object-store/developers/sdk/javascript/) for direct integration.
  83. - [Amazon S3](https://aws.amazon.com/s3/): Use [AWS SDK](https://aws.amazon.com/sdk-for-javascript/) with compatible API endpoint.
  84. - [Alibaba Cloud OSS](https://www.alibabacloud.com/product/object-storage-service): Use the [Alibaba Cloud SDK](https://www.alibabacloud.com/help/en/sdk) for OSS services.
  85. - [Google Cloud Storage](https://cloud.google.com/storage): Integrate using [Google Cloud SDK](https://cloud.google.com/sdk) or compatible API.
  86. - [Microsoft Azure Blob Storage](https://azure.microsoft.com/en-us/products/storage/blobs): Use [Azure SDK](https://azure.microsoft.com/en-us/downloads/) for Blob storage access.
  87. - [Tencent Cloud COS](https://intl.cloud.tencent.com/product/cos): Use the [Tencent Cloud SDK](https://intl.cloud.tencent.com/document/product/436/6474) for COS integration.
  88. Also, we can setup MinIO locally for free.
  89. 1. **Install and start MinIO locally:**
  90. ```bash
  91. # Download MinIO (macOS example)
  92. brew install minio/stable/minio
  93. # Start MinIO server
  94. minio server ~/minio-data --console-address :9001
  95. ```
  96. 3. **Configure environment variables:**
  97. ```bash
  98. # Copy the example environment file
  99. cp .env.example .env
  100. # Edit .env with your MinIO settings
  101. MINIO_ENDPOINT=localhost
  102. MINIO_PORT=9000
  103. MINIO_USE_SSL=false
  104. MINIO_ACCESS_KEY=minioadmin
  105. MINIO_SECRET_KEY=minioadmin
  106. MINIO_BUCKET_NAME=mcp-echarts
  107. ```
  108. ## ๐Ÿ”จ Development
  109. Install dependencies:
  110. ```bash
  111. npm install
  112. ```
  113. Build the server:
  114. ```bash
  115. npm run build
  116. ```
  117. Start the MCP server:
  118. ```bash
  119. npm run start
  120. ```
  121. ## ๐Ÿง‘๐Ÿปโ€๐Ÿ’ป Contributors
  122. - [lyw405](https://github.com/lyw405): Supports `15+` charting MCP tool. [#2](https://github.com/hustcc/mcp-echarts/issues/2)
  123. - [2niuhe](https://github.com/2niuhe): Support MCP with SSE and Streaming HTTP. [#17](https://github.com/hustcc/mcp-echarts/issues/17)
  124. - [susuperli](https://github.com/susuperli): Use `MinIO` to save the chart image base64 and return the url. [#10](https://github.com/hustcc/mcp-echarts/issues/10)
  125. - [BQXBQX](https://github.com/BQXBQX): Use `@napi-rs/canvas` instead node-canvas. [#3](https://github.com/hustcc/mcp-echarts/issues/3)
  126. - [Meet-student](https://github.com/Meet-student): Add `outputType` schema for all chart tools. [#24](https://github.com/hustcc/mcp-echarts/issues/24)
  127. - [hustcc](https://github.com/hustcc): Initial the repo.
  128. ## ๐Ÿ“„ License
  129. MIT@[hustcc](https://github.com/hustcc).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If itโ€™s helped, pass it on.