About MCP ECharts
MCP ECharts is an MCP server built on Apache ECharts that generates charts and diagrams dynamically from AI-produced configurations for chart generation and data analysis. It exports png, svg and option formats and can optionally store images in MinIO or other object storage.
Key features
- 01Supports the full ECharts syntax and options
- 02Exports png, svg and option formats
- 03Validates ECharts configurations before output
- 04Optional MinIO storage that returns URLs
- 05Falls back to Base64 output when storage is unavailable
Use cases
- 01Generating bar or line charts from data with an AI model
- 02Producing exportable chart images during a conversation
- 03Storing generated charts in object storage and sharing links
MCP support
This is an MCP server that exposes chart generation tools to MCP clients, which can send ECharts options and receive rendered charts.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
18Saved tool list · updated 3w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| echartsOption | string | Yes | ECharts option and configuration used to generate charts. For example: { "title": { "text": "ECharts Entry Example", "left": "center", "top": "2%" }, "tooltip": {}, "xAxis": { "data": ["shirt", "cardigan", "chiffon", "pants", "heels", "socks"] }, "yAxis": {}, "series": [{ "name": "Sales", "type": "bar", "data": [5, 20, 36, 10, 10, 20] }] } ATTENTION: A valid ECharts option must be a valid JSON string, and cannot be empty. |
| width | number | No | The width of the ECharts in pixels. Default is 800. |
| height | number | No | The height of the ECharts in pixels. Default is 600. |
| theme | enum | No | ECharts theme, optional. Default is 'default'.default | dark |
| outputType | enum | No | The output type of the diagram. Can be 'png', 'svg' or 'option'. Default is 'png', 'png' will return the rendered PNG image, 'svg' will return the rendered SVG string, and 'option' will return the valid ECharts option.png | svg | option |
Details
From the project README
MCP ECharts

Generate
Apache ECharts with AI MCP dynamically for chart generation and data analysis. Also you can use mcp-server-chart to generate chart, graph, map.
✨ Features
- Fully support all features and syntax of
ECharts, include data, style, theme and so on. - Support exporting to
png,svg, andoptionformats, with validation forEChartsto facilitate the model's multi-round output of correct syntax and graphics. - MinIO Integration, store charts in
MinIOobject storage and return URLs instead of Base64 data for better performance and sharing capabilities. - Lightweight, we can install it easily with
zero dependence. - Extremely
secure, fully generated locally, without relying on any remote services.
🤖 Usage
Prerequisites
- Node.js 18 or higher is required.
Desktop Applications (stdio transport)
To use with Desktop APP, such as Claude, VSCode, Cline, Cherry Studio, and so on, add the MCP server config below. On Mac system:
{
"mcpServers": {
"mcp-echarts": {
"command": "npx",
"args": [
"-y",
"mcp-echarts"
]
}
}
}
On Window system:
{
"mcpServers": {
"mcp-echarts": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"mcp-echarts"
]
}
}
}
Also, you can use it on modelscope, glama.ai, skillselion.com or others with HTTP, SSE Protocol.
🚰 Run with SSE or Streamable transport
Install the package globally.
npm install -g mcp-echarts
Run the server with your preferred transport option:
# For SSE transport (default endpoint: /sse)
mcp-echarts -t sse
# For Streamable transport with custom endpoint
mcp-echarts -t streamable
Then you can access the server at:
- SSE transport:
http://localhost:3033/sse - Streamable transport:
http://localhost:3033/mcp
🎮 CLI Options
You can also use the following CLI options when running the MCP server. Command options by run cli with -h.
MCP ECharts 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: 3033)
--endpoint, -e Specify the endpoint for the transport:
- For SSE: default is "/sse"
- For streamable: default is "/mcp"
--help, -h Show this help message
🗂️ MinIO Configuration (Optional)
For better performance and sharing capabilities, you can configure MinIO object storage to store chart images as URLs instead of Base64 data.
Note
If MinIO is not configured or unavailable, the system automatically falls back to
Base64data output, ensuring compatibility.
We can Integrate with MinIO object storage providers below.
- MinIO: High-performance, S3-compatible object storage. Use MinIO JavaScript Client for direct integration.
- Amazon S3: Use AWS SDK with compatible API endpoint.
- Alibaba Cloud OSS: Use the Alibaba Cloud SDK for OSS services.
- Google Cloud Storage: Integrate using Google Cloud SDK or compatible API.
- Microsoft Azure Blob Storage: Use Azure SDK for Blob storage access.
- Tencent Cloud COS: Use the Tencent Cloud SDK for COS integration.
Also, we can setup MinIO locally for free.
-
Install and start MinIO locally:
# Download MinIO (macOS example) brew install minio/stable/minio # Start MinIO server minio server ~/minio-data --console-address :9001 -
Configure environment variables:
# Copy the example environment file cp .env.example .env # Edit .env with your MinIO settings MINIO_ENDPOINT=localhost MINIO_PORT=9000 MINIO_USE_SSL=false MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_BUCKET_NAME=mcp-echarts
🔨 Development
Install dependencies:
npm install
Build the server:
npm run build
Start the MCP server:
npm run start
🧑🏻💻 Contributors
- lyw405: Supports
15+charting MCP tool. #2 - 2niuhe: Support MCP with SSE and Streaming HTTP. #17
- susuperli: Use
MinIOto save the chart image base64 and return the url. #10 - BQXBQX: Use
@napi-rs/canvasinstead node-canvas. #3 - Meet-student: Add
outputTypeschema for all chart tools. #24 - hustcc: Initial the repo.
📄 License
MIT@hustcc.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.