home / mcp / mcp echarts server
Generates AI-assisted ECharts visuals with optional MinIO-backed storage for quick sharing.
Configuration
View docs{
"mcpServers": {
"hustcc-mcp-echarts": {
"command": "npx",
"args": [
"-y",
"mcp-echarts"
],
"env": {
"MINIO_PORT": "YOUR_MINIO_PORT",
"MINIO_USE_SSL": "false",
"MINIO_ENDPOINT": "YOUR_MINIO_ENDPOINT",
"MINIO_ACCESS_KEY": "YOUR_ACCESS_KEY",
"MINIO_SECRET_KEY": "YOUR_SECRET_KEY",
"MINIO_BUCKET_NAME": "mcp-echarts"
}
}
}
}You can run the MCP ECharts server locally to dynamically generate Apache ECharts visuals using AI, with options to export charts and store them in object storage for easy sharing. This guide shows how to set up, run, and configure the server so you can generate charts, graphs, and maps efficiently.
You will run the MCP ECharts server as a local process and connect to it through your MCP client or development environment. Start with the provided standard input/output (stdio) configuration to run the server locally, then query the server to generate charts, export formats, and store results in object storage when enabled.
Prerequisites you need before starting: a working Node.js installation (version 18 or higher) and access to a terminal or command prompt.
Install the MCP ECharts package globally so you can run the MCP server from anywhere:
npm install -g mcp-echartsRun the MCP ECharts server with your preferred transport option. The default is SSE, but you can switch to streamable transport if needed.
# For SSE transport (default endpoint: /sse)
mcp-echarts -t sse
# For Streamable transport with a custom endpoint
mcp-echarts -t streamableAccess the server endpoints once it is running. For SSE, use the /sse endpoint; for streamable, use the /mcp endpoint.
To run the MCP ECharts server in a desktop or development environment that communicates via stdio, use one of the following configurations. These blocks show the exact command and arguments you should place in your client configuration.
{
"mcpServers": {
"mcp-echarts": {
"command": "npx",
"args": [
"-y",
"mcp-echarts"
]
}
}
}{
"mcpServers": {
"mcp-echarts": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"mcp-echarts"
]
}
}
}You can enable MinIO object storage to keep chart images and return URLs instead of embedding Base64 data. If MinIO is not configured or available, the server will output Base64 data as a fallback.
The configuration uses environment variables for MinIO access. Typical variables include endpoint, port, SSL usage, access key, secret key, and the bucket name.
All chart generation and storage happen locally on your machine, ensuring you do not rely on remote services for core processing. This improves security and reduces exposure to external latency.
To develop or contribute to the MCP ECharts server, install dependencies, build the project, and run the server locally.
npm install
```
```
npm run build
```
```
npm run startThe MCP ECharts CLI accepts options to tailor the transport, port, and endpoints you use to connect your client. If you need help, run the CLI with the help option.
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 messageThe MCP ECharts server supports generating charts with AI-assisted ECharts syntax, exporting to PNG, SVG, and option formats, and storing results in MinIO or compatible object storage. It is designed to be lightweight, self-contained, and secure, running entirely locally.
Dynamically generate Apache ECharts visuals using AI MCP, supporting data, styling, and theme options.
Export generated charts to PNG, SVG, and option formats with validation to ensure correct syntax and graphics.
Store charts in object storage like MinIO and return accessible URLs instead of embedding Base64 data.
Operate over multiple transports (stdio for local runs, SSE for streaming, and streamable for HTTP-like streaming) to fit various environments.