Skip to main content
Glama

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.

โœจ 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.

Related MCP server: ECharts MCP Server

๐Ÿค– 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 toBase64 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.

Available Tools

18 tools
generate_area_chartB

Generate an area chart to show data trends under continuous independent variables and observe the overall data trend, such as, displacement = velocity (average or instantaneous) ร— time: s = v ร— t. If the x-axis is time (t) and the y-axis is velocity (v) at each moment, an area chart allows you to observe the trend of velocity over time and infer the distance traveled by the area's size.

Inputs: data (required), axisXTitle, axisYTitle, height, +8 more.

generate_bar_chartB

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

Inputs: data (required), axisXTitle, axisYTitle, height, +6 more.

generate_boxplot_chartB

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

Inputs: data (required), axisXTitle, axisYTitle, height, +4 more.

generate_candlestick_chartA

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

Inputs: data (required), height, showVolume, theme, +3 more.

generate_echartsB

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.

Inputs: echartsOption (required), width, height, theme, +1 more.

generate_funnel_chartA

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.

Inputs: data (required), height, theme, title, +2 more.

generate_gauge_chartC

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

Inputs: data (required), height, max, min, +4 more.

generate_graph_chartB

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

Inputs: data (required), height, layout, theme, +3 more.

generate_heatmap_chartB

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

Inputs: data (required), axisXTitle, axisYTitle, height, +4 more.

generate_line_chartB

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.

Inputs: data (required), axisXTitle, axisYTitle, height, +8 more.

generate_parallel_chartB

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

Inputs: data (required), dimensions (required), height, theme, +3 more.

generate_pie_chartB

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

Inputs: data (required), height, innerRadius, theme, +3 more.

generate_radar_chartB

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.

Inputs: data (required), height, theme, title, +2 more.

generate_sankey_chartB

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.

Inputs: data (required), height, nodeAlign, theme, +3 more.

generate_scatter_chartA

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.

Inputs: data (required), axisXTitle, axisYTitle, height, +4 more.

generate_sunburst_chartB

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

Inputs: data (required), height, theme, title, +2 more.

generate_tree_chartB

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

Inputs: data (required), height, layout, orient, +4 more.

generate_treemap_chartB

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.

Inputs: data (required), height, theme, title, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    A3.5/5.0

    Scored across 18 tools

    Disambiguation4/5

    Most tools target distinct chart types with clear purposes. However, the generic 'generate_echarts' tool overlaps with all others, potentially causing confusion if an agent misselects it instead of a specific chart function.

    Naming Consistency5/5

    All tools follow the exact same naming pattern: 'generate_<chart_type>_chart'. This is perfectly consistent and predictable.

    Tool Count5/5

    18 tools is a well-scoped count for a chart generation server. It covers a broad range of chart types without being overwhelming, and each tool serves a distinct purpose.

    Completeness4/5

    The server covers most major chart types needed for general visualization, including specialized ones like boxplot and candlestick. Minor missing types (e.g., maps, 3D) are acceptable gaps.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables generation of 25+ types of charts and data visualizations using AntV, including bar charts, line charts, maps, mind maps, and specialized diagrams like fishbone and sankey charts. Supports both statistical charts and geographic visualizations for comprehensive data analysis and presentation.
      205 npm
      -