Skip to main content
Glama

ECharts MCP Server

by w2xi

📊 ECharts MCP Server

中文文档 | English

A Model Context Protocol (MCP) server that generates beautiful chart images from ECharts configurations.

✨ Features

  • 🎨 Generate high-quality chart images from ECharts configurations
  • 🖼️ Support for various chart types (bar, line, pie, scatter, etc.)
  • 📐 Customizable dimensions (width/height)
  • 🎯 Easy integration with AI assistants via MCP

⚙️ Configuration

.cursor/mcp.json

{ "mcpServers": { "echarts-mcp": { "command": "npx", "args": ["echarts-mcp"], } } }

🔧 Local Development

If you want to run from source:

# Clone the repository git clone https://github.com/w2xi/echarts-mcp.git cd echarts-mcp # Install dependencies npm install # Run the server npm start

Then configure your MCP client:

{ "mcpServers": { "echarts-mcp": { "command": "node", "args": ["/path/to/echarts-mcp/cli.js"], "env": {} } } }

📖 Usage

Once configured, you can use the MCP server in your AI assistant by requesting chart generation:

Example Prompts:

  • "Generate a bar chart showing sales data for the last 6 months"
  • "Create a pie chart displaying market share distribution"
  • "Make a line chart with temperature data over time"

Tool Parameters:

  • width: Chart width in pixels (e.g., 1000)
  • height: Chart height in pixels (e.g., 500)
  • echarts: ECharts configuration object as string

Example ECharts Configuration:

{ backgroundColor: '#fff', title: { text: 'Monthly Sales Data' }, tooltip: {}, legend: { data: ['Sales'] }, xAxis: { data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'] }, yAxis: {}, series: [{ name: 'Sales', type: 'bar', data: [120, 200, 150, 80, 70, 110] }] }

🛠️ Development

Scripts

  • npm start - Start the MCP server
  • npm test - Run test charts
  • npm run inspect - Inspect the MCP server with debugging tools

Dependencies

  • ECharts: Chart generation library
  • Canvas: Server-side canvas rendering
  • MCP SDK: Model Context Protocol implementation
  • Zod: Schema validation

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

MIT License


Made with ❤️ by w2xi

-
security - not tested
F
license - not found
-
quality - not tested

A Model Context Protocol server that generates beautiful chart images from ECharts configurations, supporting various chart types with customizable dimensions.

  1. ✨ Features
    1. ⚙️ Configuration
      1. 🔧 Local Development
        1. 📖 Usage
          1. Example Prompts:
          2. Tool Parameters:
          3. Example ECharts Configuration:
        2. 🛠️ Development
          1. Scripts
          2. Dependencies
        3. 🤝 Contributing
          1. 📄 License
            1. 🔗 Links

              Related MCP Servers

              • A
                security
                F
                license
                A
                quality
                A Model Context Protocol server that provides API functionality for creating, managing, and exporting Excalidraw drawings in various formats like SVG, PNG, and JSON.
                Last updated -
                8
                69
                24
                JavaScript
              • A
                security
                A
                license
                A
                quality
                mcp-server-chart
                Last updated -
                25
                4,065
                2,128
                TypeScript
                MIT License
                • Apple
              • A
                security
                F
                license
                A
                quality
                A Model Context Protocol server that generates TradingView chart visualizations with real-time updates, enabling AI assistants to create and display financial charts through an integration with Chart-IMG API.
                Last updated -
                5
                26
                TypeScript
                • Apple
              • A
                security
                A
                license
                A
                quality
                A Model Context Protocol server that generates lightweight ASCII charts directly in terminal environments, supporting line charts, bar charts, scatter plots, histograms, and sparklines without GUI dependencies.
                Last updated -
                5
                4
                TypeScript
                MIT License
                • Apple
                • Linux

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/w2xi/echarts-mcp'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server