EChart

v1.0.0Analyticsstable

基于 mcp-go 框架构建的 mcp 服务,它提供了一个能动态生成 ECharts 图表页面的工具。

echartsgolangmcpmcp-server
Share:
60
Stars
0
Downloads
0
Weekly
0/5

What is EChart?

EChart is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 基于 mcp-go 框架构建的 mcp 服务,它提供了一个能动态生成 echarts 图表页面的工具。

基于 mcp-go 框架构建的 mcp 服务,它提供了一个能动态生成 ECharts 图表页面的工具。

This server falls under the Analytics category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • 基于 mcp-go 框架构建的 mcp 服务,它提供了一个能动态生成 ECharts 图表页面的工具。

Use Cases

Generate dynamic ECharts visualization pages from AI prompts.
Create interactive charts with data-driven insights.
Visualize data in ECharts format automatically.
cnkanwei

Maintainer

LicenseMIT
Languagehtml
Versionv1.0.0
UpdatedFeb 26, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx echart

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use EChart

EChart MCP Server is a Go application built on the mcp-go framework that dynamically generates standalone ECharts visualization pages from JSON chart configurations. When an AI assistant invokes the generate_echarts_page tool with an ECharts JSON option object, the server renders a self-contained HTML file containing the interactive chart and returns a URL pointing to it. This makes it easy to create bar charts, line charts, pie charts, and other ECharts visualizations directly from AI-generated data without writing any frontend code.

Prerequisites

  • Go 1.24 or higher (to build from source) — OR Docker for containerized deployment
  • An MCP-compatible client that supports SSE transport (e.g., Claude Desktop with SSE support, or a custom MCP client)
  • Network access from your MCP client to the server (default: localhost:8989)
1

Clone the repository

Clone the mcp-server-echart repository to your local machine.

git clone https://github.com/cnkanwei/mcp-server-echart.git
cd mcp-server-echart
2

Configure environment variables

Copy the example .env file and adjust the port, public URL, and static file directory as needed.

cp .env.example .env
# Key settings in .env:
# PORT=8989
# PUBLIC_URL=http://localhost:8989
# LOG_LEVEL=info
# STATIC_DIR=static
3

Install dependencies and run locally

Install Go module dependencies and start the server. It will listen on the PORT defined in .env (default: 8989).

go mod tidy
go run main.go
4

Run with Docker (alternative)

Build and run the server as a Docker container. Pass environment variables to customize the port and public URL.

docker build -t mcp-server-echart .
docker run -p 8989:8989 \
  -e PORT=8989 \
  -e PUBLIC_URL=http://localhost:8989 \
  -d --name my-echart-server mcp-server-echart
5

Configure your MCP client to connect via SSE

This server communicates over SSE (Server-Sent Events), not stdio. Add it to your MCP client config using the URL form pointing to the /sse endpoint.

{
  "mcpServers": {
    "mcp-server-echart": {
      "url": "http://localhost:8989/sse"
    }
  }
}

EChart Examples

Client configuration

MCP client configuration using the SSE URL transport. The server must be running before the client connects. Adjust the URL if you changed the PORT or PUBLIC_URL.

{
  "mcpServers": {
    "mcp-server-echart": {
      "url": "http://localhost:8989/sse"
    }
  }
}

Prompts to try

Example prompts that invoke the generate_echarts_page tool to create various chart types. The AI will build the ECharts JSON config and pass it to the server.

- "Create a bar chart showing monthly sales data: Jan 120, Feb 90, Mar 150, Apr 200."
- "Generate a pie chart of market share: Company A 35%, B 25%, C 20%, D 20%."
- "Make a line chart visualizing temperature trends over 7 days with highs and lows."
- "Build an ECharts stacked bar chart comparing Q1 and Q2 revenue by product category."

Troubleshooting EChart

MCP client cannot connect — 'connection refused' on localhost:8989

Ensure the Go server or Docker container is running before starting the MCP client. Verify with: curl http://localhost:8989/sse — you should see an SSE stream header. If you changed the port in .env, update the URL in your MCP client config to match.

The tool returns a URL but the chart page shows a blank or error

Ensure PUBLIC_URL in .env matches the address accessible from your browser. For local use, http://localhost:8989 is correct. If running in Docker with a different host port, update PUBLIC_URL to reflect the mapped port.

go mod tidy fails or build errors on newer Go versions

The project requires Go 1.24 or higher. Check your Go version with 'go version'. If you are behind a corporate proxy, set GOPROXY=https://goproxy.io,direct before running go mod tidy.

Frequently Asked Questions about EChart

What is EChart?

EChart is a Model Context Protocol (MCP) server that 基于 mcp-go 框架构建的 mcp 服务,它提供了一个能动态生成 echarts 图表页面的工具。 It connects AI assistants to external tools and data sources through a standardized interface.

How do I install EChart?

Follow the installation instructions on the EChart GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with EChart?

EChart works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is EChart free to use?

Yes, EChart is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Analytics MCP Servers

Explore all analytics servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "echart": { "command": "npx", "args": ["-y", "echart"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use EChart?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides