echarts-mcp
Provides tools for rendering Apache ECharts options to SVG, validating ECharts options, and listing available chart types.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@echarts-mcpCreate an SVG bar chart showing 2024 monthly sales."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
echarts-mcp
A modern, open-source Apache ECharts MCP server. It exposes type-safe tools that let AI
agents and chat UIs render rich, deterministic charts server-side — no browser. Emits SVG,
PNG, and self-contained interactive HTML (PNG needs the optional @napi-rs/canvas dep).
Built against the Model Context Protocol v2 SDK (@modelcontextprotocol/server@2) and
Apache ECharts 6.1.0 (pinned), supporting both stdio and Streamable HTTP transports.
Highlights
Multi-format rendering — one call returns any combination of
svg(raw vector text, zero native deps),png(base64 image, via optional@napi-rs/canvas), andhtml(a self-contained interactive page). Deterministic by default (animation: false).Fully stateless — every tool result is self-contained (raw SVG/PNG/HTML + echoed option). No files, no session state, horizontally scalable over HTTP.
Optional chart hosting — set
MCP_EXPORT_DIR+MCP_EXPORT_BASE_URLand useexportToUrlto persist an artifact and get a public URL for chat platforms.Type-safe tool surface — JSON Schema derived from Zod v4 (
Standard Schema), so agents get precise, machine-readable input/output contracts.Passthrough fidelity —
render_echartaccepts any ECharts v6 option; it does not restrict chart types (seelist_chart_typesfor discoverability only).Hardened by default — SSRF deny-by-default for remote images, option-depth/complexity bounds, render timeout, constant-time auth, and non-root container. See SECURITY.md.
Related MCP server: ECharts MCP Server
Tools
Tool | Purpose |
| Renders an ECharts option to SVG, PNG, and/or HTML. Returns the artifacts + echoed option. |
| Dry-run structural + semantic validation (pinned to echarts@6.1.0) without rendering. |
| Lists common series types for agent discoverability (not an allowlist). |
render_echart inputs
Param | Type | Default | Notes |
| object | required | Full ECharts v6 option (passthrough). |
|
|
| Outputs to produce in one call. |
| int | 800 / 500 | Render dimensions in logical pixels (100–4096). |
| number | 2 | DPI multiplier for PNG output (1–3). |
| string | object |
| Built-in name or inline theme JSON object. |
| string |
| e.g. |
| boolean |
| Emit animated output when |
| boolean |
| Persist the artifact and return a public URL (needs hosting config). |
The result carries MCP content blocks per requested format — an image block for
base64 PNG, a text block for raw SVG and/or HTML — plus structuredContent with
formats, width, height, theme, background, version, and (conditionally)
svg, pngBytes, html, url, and a warning.
Quick start
Requires Node.js 20+ (developed on Node 24) and pnpm.
pnpm install
pnpm build # compiles src/ -> dist/
pnpm dev # run via tsx (stdio)
pnpm start # run the compiled dist (stdio)Run the server over stdio (the default) from an MCP client by pointing it at dist/index.js.
Install from npm
npm install -g @ryuk3nd0/echarts-mcp
# then use it from any MCP client:
echarts-mcp
# or ad-hoc without a global install:
npx -y @ryuk3nd0/echarts-mcpStreamable HTTP
MCP_TRANSPORT=streamable-http MCP_HTTP_PORT=3030 node dist/index.jsThe MCP endpoint is then available at http://localhost:3030/mcp.
Configuration
Configuration is resolved in this precedence order (highest first):
Environment variables
A JSON config file (
MCP_CONFIGpath, or./config.jsonwhen present)Built-in defaults
Env var | Config key | Default |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See config.example.json for the full shape.
Authentication (Streamable HTTP only)
By default the HTTP endpoint is open (intended for trusted localhost). To protect it,
set MCP_API_TOKEN (or http.authToken in config.json). Clients must then send
Authorization: Bearer <token>; requests without a matching token receive 401.
Development
pnpm typecheck # tsc --noEmit
pnpm lint # eslint
pnpm test # vitest run
pnpm format # prettierEnterprise / security suites
pnpm test:security # adversarial: SSRF guard, bounds, HTML injection, allowlist
pnpm test:stress # concurrency + pathological-input cliffs
pnpm test:leak # standalone --expose-gc heap-plateau check
pnpm test:enterprise # security + stress + leak (release gate)
pnpm audit # dependency audit (release-time, --audit-level=high)Docker
docker build -t echarts-mcp .
# stdio
docker run -i --rm echarts-mcp
# streamable HTTP
docker run -p 3030:3030 -e MCP_TRANSPORT=streamable-http echarts-mcpPNG rendering
PNG output uses the optional @napi-rs/canvas dependency (a Rust/Skia binding). It is
installed automatically with pnpm install, but if the native binary is unavailable the
SVG and HTML paths still work — requesting png without it returns a clear actionable
error. Raster rendering is bounded by an 8K-equivalent pixel budget and a
maxImageBytes cap (default 8 MiB); oversized images are suppressed with a warning.
Security
The threat model, implemented controls, and accepted residual risks are documented in SECURITY.md. In short: this is a local-first server (stdio), with SSRF denied by default, bounded inputs, and a non-root container. See that file for what is and isn't covered.
Roadmap / deferred
Geo/map fetches and custom font registration in the canvas path.
Full OAuth 2.1 resource-server auth (optional bearer token today).
HTTP-transport hardening (body/concurrency caps) before any hosted deployment.
License
Apache-2.0. See LICENSE.
Integrations
Ready-to-paste client config snippets live in integrations/:
integrations/claude-desktop.json— Claude Desktop stdio entry.integrations/mcp.json— generic stdio entry (Claude Code, Cursor, and others).integrations/streamable-http.json— remote Streamable HTTP endpoint for gateways and hosted LLM tool integrations.
A machine-readable SKILL.md at the repo root describes the server for Agent Skills systems.
The same guidance is exposed to MCP clients via the server's instructions field.
Available Tools
3 toolslist_chart_typesList chart typesA
Lists common ECharts series types for agent discoverability. Not an allowlist — render_echart accepts any option ECharts v6 supports.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure. It reveals a key trait: the list is not exhaustive and render_echart accepts any ECharts v6 option, which prevents misuse. It doesn't describe the return format, but for a simple list tool this is sufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the main purpose, and every clause adds value. The second sentence prevents a common misconception about allowlisting. No redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter, no-output-schema tool, the description fully covers what an agent needs to know: what it does, how it relates to render_echart, and its non-exhaustive nature. Nothing is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so the schema is trivially complete. The description doesn't need to add parameter details. Baseline of 4 applies, and the description's mention of ECharts v6 context is a small bonus.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Lists') and resource ('ECharts series types'), clearly stating the tool's purpose. It also distinguishes itself from sibling tools by noting that render_echart accepts any option, clarifying that this list is for discoverability only.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool (for agent discoverability) and explicitly contrasts with render_echart by stating this is not an allowlist. It doesn't mention validate_echart_option or explicitly state when not to use it, but the context is clear enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
render_echartRender EChartsA
Renders an Apache ECharts visualization server-side (no browser). Returns image (base64 PNG), SVG text, and/or self-contained interactive HTML, selectable via the formats list. PNG requires the optional @napi-rs/canvas dep. For chat-platform targets (Slack/Discord/Telegram), use exportToUrl (needs hosting config).
| Name | Required | Description | Default |
|---|---|---|---|
| theme | No | Built-in theme name (e.g. 'light', 'dark') or an inline theme JSON object. | light |
| width | No | Render width in pixels (logical/CSS px). | |
| height | No | Render height in pixels (logical/CSS px). | |
| option | Yes | Standard Apache ECharts option object (full passthrough to echarts v6). | |
| formats | No | Output formats to produce in one call: 'svg' (text block with raw SVG), 'png' (image block with base64 PNG; requires optional @napi-rs/canvas), 'html' (text block with a self-contained interactive static HTML page). | |
| animation | No | Whether to emit animated output. Disabled by default for deterministic output. | |
| background | No | Background color for the chart (e.g. '#ffffff' or 'transparent'). | transparent |
| exportToUrl | No | When true and chart hosting is configured, also persist the chart and return its public HTTPS URL (for Slack/Discord/Telegram targets). | |
| devicePixelRatio | No | DPI multiplier for raster/PNG output. |
Output Schema
| Name | Required | Description |
|---|---|---|
| svg | No | |
| url | No | |
| html | No | |
| theme | Yes | Theme name used ('inline' when a theme object was supplied). |
| width | Yes | |
| height | Yes | |
| formats | Yes | |
| version | Yes | Pinned echarts runtime version. |
| warning | No | |
| pngBytes | No | |
| background | Yes | |
| pngMimeType | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are absent, so description carries the load. It discloses the server-side behavior, output options, optional dependency for PNG, and the exportToUrl alternative. It doesn't mention failure modes or performance characteristics, but given the context, that's acceptable. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise, informative three sentences. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given complexity (rendering, formats, dependency), description covers key aspects: server-side, output types, dependency requirement, and alternative for chat platforms. Output schema exists, so return values are covered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers all 9 parameters with descriptions (100% coverage). The description adds the dependency caveat for PNG and the chat-platform alternative, which are beyond schema. So it adds value above the baseline 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool renders Apache ECharts visualizations server-side outputting PNG/SVG/HTML formats. It distinguishes itself from sibling tools like validate_echart_option (validation) and listing chart types by focusing on rendering.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use exportToUrl for chat platforms (Slack/Discord/Telegram) as an alternative, which is a clear usage guideline. It also notes the requirement for hosting configuration, giving strong contextual guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
validate_echart_optionValidate ECharts optionA
Dry-run structural and semantic validation of an ECharts option against echarts@6.1.0 without rendering. Returns errors (would break a render) and warnings (likely mistakes).
| Name | Required | Description | Default |
|---|---|---|---|
| option | Yes | The ECharts option object to validate. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of behavioral disclosure. It clearly states it is a dry-run (no rendering) and returns errors and warnings, which are meaningful behavioral traits. It does not detail edge cases or side effects, but the core behavior is transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loaded with the key action ('Dry-run structural and semantic validation') and includes the return value summary. Every word contributes to the user's understanding with no fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter tool with no annotations and no output schema, the description effectively covers the tool's purpose, behavioral constraints, and return semantics. It could be more complete by listing example validation rules or the exact return shape, but it is largely sufficient for an AI agent to decide when and how to invoke it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already fully describes the only parameter 'option' with a clear description, so baseline is 3. The tool description adds the version context (echarts@6.1.0) and validation scope (structural/semantic) but does not add additional parameter-level meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool performs 'structural and semantic validation of an ECharts option against echarts@6.1.0 without rendering.' It uses a specific verb ('validates') and resource ('ECharts option'), and the 'without rendering' clause distinguishes it from the sibling render_echart tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context by noting 'without rendering' and 'dry-run', suggesting it is the safe pre-render check. However, it never explicitly mentions alternative tools or provides when-to-use vs. when-not-to-use guidance relative to siblings render_echart and list_chart_types.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v1.0.0- Changed
render_echart25 fields changed- changed
Input schema / properties / animation / descriptionPrevious value: -"Whether to emit an animated SVG. Disabled by default for deterministic output."New value: +"Whether to emit animated output. Disabled by default for deterministic output." - changed
Input schema / properties / devicePixelRatio / descriptionPrevious value: -"DPI multiplier (raster only)."New value: +"DPI multiplier for raster/PNG output." - removed
Input schema / properties / devicePixelRatio / exclusiveMinimumRemoved value: -0 - added
Input schema / properties / devicePixelRatio / maximumAdded value: +3 - added
Input schema / properties / devicePixelRatio / minimumAdded value: +1 - added
Input schema / properties / exportToUrlAdded value: +{ + "default": false, + "description": "When true and chart hosting is configured, also persist the chart and return its public HTTPS URL (for Slack/Discord/Telegram targets).", + "type": "boolean" +} - added
Input schema / properties / formatsAdded value: +{ + "default": [ + "svg" + ], + "description": "Output formats to produce in one call: 'svg' (text block with raw SVG), 'png' (image block with base64 PNG; requires optional @napi-rs/canvas), 'html' (text block with a self-contained interactive static HTML page).", + "items": { + "enum": [ + "svg", + "png", + "html" + ], + "type": "string" + }, + "maxItems": 3, + "minItems": 1, + "type": "array" +} - changed
Input schema / properties / height / descriptionPrevious value: -"Render height in pixels."New value: +"Render height in pixels (logical/CSS px)." - removed
Input schema / properties / height / exclusiveMinimumRemoved value: -0 - changed
Input schema / properties / height / maximumPrevious value: -9007199254740991New value: +4096 - added
Input schema / properties / height / minimumAdded value: +100 - removed
Input schema / properties / rendererRemoved value: -{ - "default": "svg", - "description": "Output mode: 'svg' (vector, available now) or 'canvas'/'dual' (raster PNG, ships in v1.1).", - "enum": [ - "svg", - "canvas", - "dual" - ], - "type": "string" -} - changed
Input schema / properties / width / descriptionPrevious value: -"Render width in pixels."New value: +"Render width in pixels (logical/CSS px)." - removed
Input schema / properties / width / exclusiveMinimumRemoved value: -0 - changed
Input schema / properties / width / maximumPrevious value: -9007199254740991New value: +4096 - added
Input schema / properties / width / minimumAdded value: +100 - added
Output schema / properties / formatsAdded value: +{ + "items": { + "type": "string" + }, + "type": "array" +} - added
Output schema / properties / htmlAdded value: +{ + "type": "string" +} - added
Output schema / properties / pngBytesAdded value: +{ + "type": "number" +} - added
Output schema / properties / pngMimeTypeAdded value: +{ + "type": "string" +} - removed
Output schema / properties / rendererRemoved value: -{ - "type": "string" -} - removed
Output schema / properties / svg / descriptionRemoved value: -"Raw SVG source of the rendered chart." - added
Output schema / properties / urlAdded value: +{ + "type": "string" +} - added
Output schema / properties / warningAdded value: +{ + "type": "string" +} - changed
Output schema / requiredPrevious value: -[ - "svg", - "width", - "height", - "renderer", - "theme", - "background", - "version" -]New value: +[ + "formats", + "width", + "height", + "theme", + "background", + "version" +]
3 tool updates
v0.1.2- First observed
list_chart_types - First observed
render_echart - First observed
validate_echart_option
TDQS
render_echart, validate_echart_option, and list_chart_types each address a distinct concern: output generation, option validation, and capability discovery. No two tools overlap in purpose, so agent selection should be straightforward.
All tool names use snake_case with a verb-first pattern: render_, validate_, list_. The minor inconsistency is the object noun varying between echart, echart_option, and chart_types, but the overall convention is still predictable.
Three tools cover a narrow, well-defined pipeline: discovering chart types, validating options, and rendering output. This is an appropriate scope with no redundant tools and no obvious missing boilerplate steps.
The core workflow is well covered: list_chart_types aids discovery, validate_echart_option prevents render failures, and render_echart produces several output formats. However, render_echart's description references an exportToUrl tool for chat platforms that is not actually part of this server, creating a minor gap for agents aiming at Slack/Discord/Telegram.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Real-time planetary signal engine and Model Context Protocol (MCP) server for autonomous AI agents.
- mcpOAuthcom.slickfast
Render 47 chart types and tiled dashboards as PNG/SVG. Deterministic, no headless browser.
Related MCP Servers
- TypeScriptMIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that generates beautiful chart images from ECharts configurations, supporting various chart types with customizable dimensions.197MIT

vchart-mcp-serverofficial
AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server for the @visactor/vchart that enables AI assistants to generate interactive charts and visualizations.102252MIT- AlicenseNot gradedqualityCmaintenanceAn MCP (Model Context Protocol) server that enables LLMs to generate ECharts visualizations by accepting chart type, data and parameters and returning cloud image URLs of the generated charts.1981Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/ryuk3nd0/echarts-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server