npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@iflow-mcp/apache-echarts-mcp

v1.0.0

Published

Apache ECharts MCP Server

Readme

ECharts MCP

This project shows how to implement an MCP (Model Context Protocol) server of Apache ECharts.

The basic workflow is that it gets chart type, data and other parameters from an LLM, and returns the cloud image URL of the generated ECharts chart.

Supported ECharts series types: 'bar', 'line', 'pie', 'scatter', 'funnel', 'tree', 'treemap', 'sunburst'.

Setup

npm install

Create an .env file. See .env.example for reference. You need to have the access to a baidubce/bce-sdk-js account to store the images on the cloud.

Run

# Run the MCP server
npm run dev

# Run the inspector in another terminal
npm run inspect

FAQ

How to change image cloud storage?

By default, it uses baidubce/bce-sdk-js to store the generated image and return the URL of the image on the cloud. If you wish to use other Cloud storage, change the implemenation in src/storage.js.

How to change ECharts theme?

See registerTheme and registerFont comments in src/chart.js.

How to support more series types?

  1. Change inputSchema in src/index.js
  2. Normalize data in src/chart.js

You are welcomed to make a pull request.

Discussion of Implementation

To make an MCP server of Apache ECharts, there are 3 common ways to do:

  1. Ask LLM to provide a full ECharts option
  2. Ask LLM to provide pre-fined parameters including chart themes
  3. Ask LLM to provide pre-fined minimal parameters

The advantage of Approach 1 is that is has the potential of making all kinds of charts that ECharts supports. But it may not be stable, especially for less frequently used chart types.

Approach 2 gives the freedom to change chart themes from prompt. For example, you may ask the LLM to generate a chart with red bars of data .... But this approach requires a lot of parameters in order to support so many ECharts options. And it degenerates to approach 1 as the number of parameters grows.

Approach 3 asks LLM to provide minimal parameters like series type, data, seriesName, title, and axisName. The chart theme is defined in the app so that only the developer of this app, rather than users can change the theme. We believe this is the best way to provide stable results and so this is the approach we take in this project.