Sandbox
@hustcc/mcp-echarts

MCP server for ECharts chart generation

MCP ECharts exposes Apache ECharts as an MCP server for agents. It lets them build charts from data, validate ECharts options, and export results as PNG, SVG, or raw option JSON. When MinIO is configured, it can store chart images and return URLs instead of base64.

266 starsโ€ข39 forksโ€ขTypeScriptโ€ขUpdated 21d ago
Who it's for

Builders who want their agent to create ECharts charts from data and return shareable outputs.

What it delivers

You can ask your agent for charts and get valid ECharts output without hand-writing chart config.

What it does

ECharts chart generation

Generates Apache ECharts options with support for data, style, and theme settings.

Multiple export formats

Returns chart output as `png`, `svg`, or `option`.

Option validation

Validates ECharts options so agents can fix syntax across multiple rounds.

MinIO storage support

Stores chart images in MinIO-compatible object storage and returns URLs instead of base64.

Local-first execution

Runs locally without remote services.

MCP transports

Supports stdio, SSE, and streamable HTTP transport.

How to get it

  1. 1Install the package globally.
    npm install -g mcp-echarts
  2. 2Run 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
  3. 3Install and start MinIO locally
    # Download MinIO (macOS example)
    brew install minio/stable/minio
    
    # Start MinIO server
    minio server ~/minio-data --console-address :9001
  4. 4Install dependencies
    npm install
  5. 5Build the server
    npm run build
  6. 6Start the MCP server
    npm run start

README

MCP ECharts build npm Version Listed on Skillselion npm License Trust Score

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.

mcp-echarts
award

โœจ Features

  • Fully support all features and syntax of ECharts, include data, style, theme and so on.
  • 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.
  • MinIO Integration, store charts in MinIO object 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 Base64 data output, ensuring compatibility.

We can Integrate with MinIO object storage providers below.

Also, we can setup MinIO locally for free.

  1. Install and start MinIO locally:

    # Download MinIO (macOS example)
    brew install minio/stable/minio
    
    # Start MinIO server
    minio server ~/minio-data --console-address :9001
    
  2. 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 MinIO to save the chart image base64 and return the url. #10
  • BQXBQX: Use @napi-rs/canvas instead node-canvas. #3
  • Meet-student: Add outputType schema for all chart tools. #24
  • hustcc: Initial the repo.

๐Ÿ“„ License

MIT@hustcc.

Files in the repo

Repository payloadโ€ข17 top-level entries
  • __tests__
  • .github
  • .husky
  • fonts
  • src
  • .env.example
  • .gitignore
  • .prettierrc
  • biome.json
  • Dockerfile
  • glama.json
  • LICENSE
  • package.json
  • README.md
  • smithery.yaml
  • tsconfig.json
  • tsconfig.test.json

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph โ€” average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code โ€” use any LLM (Claude, Gemini, Grok, DeepSeek, Ollamaโ€ฆ) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300ยตs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up โ€” it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k