echart-mcp-view
This MCP server lets you create and render 16 types of interactive ECharts visualizations as sandboxed MCP App HTML resources within compliant MCP hosts.
Supported Chart Types (opener tools):
Table – structured row/column display
Line – trends and time series with smoothing, area fill, stacking, and data zoom
Bar – grouped, stacked, or horizontal category comparisons
Pie – standard pie, donut, or Nightingale rose variants
Scatter – correlations and bubble charts
Radar – multi-dimensional profile comparisons
Heatmap – matrix intensity and 2D density
Funnel – conversion stages and value drop-off
Gauge – single KPI, progress, or threshold indicator
Tree – parent-child hierarchical relationships
Treemap – hierarchical size comparisons with nested rectangles
Graph – node-link relationship networks
Sankey – weighted source-to-target flows
Candlestick – OHLC market/range data
Boxplot – distributions and outliers
Mixed – combined bar+line series with dual y-axis support
App-Only Helper Tools:
echart_mcp_view_app_build_option– validate input and generate ECharts options from the current app payloadechart_mcp_view_app_examples– retrieve sample inputs for one or all chart types
Cross-Cutting Capabilities:
Provide structured high-level inputs (tabular rows, trees, or node/link graphs) instead of raw ECharts config
Adapt automatically to host theme, locale, and display mode (inline/fullscreen)
Enable interactive features: tooltips, legends, data zoom, toolboxes, and visual maps
Safely customize style/layout via
advanced.optionPatch(restricted keys — no series, dataset, axes, formatters, or HTML overrides)Choose between canvas and SVG renderers
Debug mode to inspect input JSON and generated chart options
Runs over Streamable HTTP or stdio, with configurable origins and optional bearer-token authentication
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., "@echart-mcp-viewshow pie chart of market share by product category"
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.
echart-mcp-view
Agent-ready ECharts visualization for MCP Apps.
echart-mcp-view is an MCP server that turns structured tool arguments into polished, interactive chart views. It exposes one model-visible opener tool per chart type, serves each chart UI as an independent MCP App HTML resource, and lets the embedded app rebuild ECharts options from validated data without asking the model to hand-write chart configuration.
Highlights
16 focused chart apps for tables, Cartesian charts, relationships, hierarchy, flow, KPI, finance, and distribution views.
MCP Apps first: every opener tool maps to a
ui://HTML resource rendered by a compliant host.Structured chart input: callers provide data, encodings, axes, presentation, and interaction controls instead of raw ECharts options.
Host-aware UI: app chrome follows Host theme, locale, and
inline/fullscreendisplay mode when available.Single-file app bundles: every chart surface is built into a self-contained HTML resource under
dist/client/.Safe customization:
advanced.optionPatchaccepts controlled style/layout keys while blocking series, datasets, axes, formatter functions, HTML rendering, timelines, and render modes.Debuggable by design: optional debug mode reveals input JSON and generated chart options for local inspection.
Related MCP server: mcp-plots
How It Works
The model calls a chart opener tool such as
echart_mcp_view_open_line.The tool validates the input and returns structured content plus MCP App metadata.
The Host fetches the matching
ui://echart-mcp-view/*.htmlresource and renders it in a sandboxed iframe.The embedded React app receives tool input/result notifications, builds an ECharts option through the app-only helper tool, and renders the chart.
This keeps the model-facing tool surface compact while keeping chart rendering, theme handling, and interactive UI behavior inside the app.
Chart Catalog
Model-visible opener tools:
Chart | Tool | Best for |
Table |
| Row and column inspection |
Line |
| Trends, time series, multi-metric comparison |
Bar |
| Category comparison, grouped bars, stacked bars |
Pie |
| Share-of-total, donut, rose charts |
Scatter |
| Correlation, bubble size, visual maps |
Radar |
| Multi-dimensional profile comparison |
Heatmap |
| Matrix intensity and two-dimensional density |
Funnel |
| Conversion stages and ordered drop-off |
Gauge |
| Single KPI, progress, threshold state |
Tree |
| Parent-child hierarchy |
Treemap |
| Hierarchical size comparison |
Graph |
| Node-link relationship networks |
Sankey |
| Weighted source-target flows |
Candlestick |
| OHLC market or range data |
Boxplot |
| Distribution summaries and outliers |
Mixed |
| Combined bar and line series |
App-only helper tools:
Tool | Purpose |
| Validate chart input and return a table view model or ECharts option for the current app payload |
| Return reusable sample inputs for one chart type or all chart types |
Quick Start
Requirements:
Node.js 20+
npm
Run the published package over Streamable HTTP:
npx -y echart-mcp-view@latest --http --host 127.0.0.1 --port 3338Default HTTP endpoints:
http://127.0.0.1:3338/mcp
http://127.0.0.1:3338/healthzRun over stdio when an MCP host launches this server as a local command:
npx -y echart-mcp-view@latest --stdioFor a source checkout, install and build first:
npm install
npm run build
npm run startMCP Host Configuration
Recommended stdio configuration with npx:
{
"mcpServers": {
"echart-mcp-view": {
"command": "npx",
"args": ["-y", "echart-mcp-view@latest", "--stdio"]
}
}
}Pin the version for reproducible host setups:
{
"mcpServers": {
"echart-mcp-view": {
"command": "npx",
"args": ["-y", "echart-mcp-view@0.1.0", "--stdio"]
}
}
}Source checkout stdio configuration:
{
"mcpServers": {
"echart-mcp-view": {
"command": "node",
"args": ["/absolute/path/to/echart-mcp-view/dist/index.js", "--stdio"]
}
}
}Streamable HTTP with npx:
npx -y echart-mcp-view@latest --http --host 127.0.0.1 --port 3338Use the /mcp endpoint in hosts that support Streamable HTTP MCP connections.
NPM Package
The package exposes a single executable:
echart-mcp-view --stdio
echart-mcp-view --http --host 127.0.0.1 --port 3338Local global install is optional:
npm install -g echart-mcp-view
echart-mcp-view --stdioUse npx for one-off runs or Host-managed launches:
npx -y echart-mcp-view@latest --stdio
npx -y echart-mcp-view@latest --http --host 127.0.0.1 --port 3338Runtime Modes
Transports
--stdio: stdio transport for local MCP host process management.--http: Streamable HTTP transport, served at/mcp.--hostand--port: override HTTP bind host and port.
Environment
ECHART_MCP_VIEW_HTTP_HOST=127.0.0.1
ECHART_MCP_VIEW_HTTP_PORT=3338
ECHART_MCP_VIEW_ALLOWED_ORIGINS=http://localhost:3000
ECHART_MCP_VIEW_ALLOWED_HOSTS=localhost,127.0.0.1
ECHART_MCP_VIEW_HTTP_AUTH_TOKEN=optional-bearer-token
ECHART_MCP_VIEW_DEBUG=0Remote HTTP mode requires explicit allowed hosts, allowed origins, and an auth token.
Debug Mode
The JSON input and generated-option panel is hidden by default. Enable it when inspecting payloads or chart output:
ECHART_MCP_VIEW_DEBUG=1 node dist/index.js --http --host 127.0.0.1 --port 3338
ECHART_MCP_VIEW_DEBUG=1 node dist/index.js --stdioFor direct local app-page inspection, append ?debug=1 or ?debug=true to the built app URL.
MCP Apps Behavior
Theme: explicit
presentation.themewins; otherwise the app followshostContext.theme; without Host context it falls back toprefers-color-scheme.Display mode: app capabilities advertise
inlineandfullscreen; the app requests mode changes through the MCP Apps bridge and trusts the Host result.Locale: app chrome uses
hostContext.localewhen present, thennavigator.language, thenen-US.Host styles: supported Host CSS variables and fonts are applied through the MCP Apps SDK helpers.
App-only tools: helper tools are marked app-visible so the embedded UI can rebuild options without expanding the model-visible tool set.
Input Contract
Chart opener tools accept chart-specific subsets of the common input model:
Field | Purpose |
| Top-level chart title |
| Top-level chart subtitle |
| Tabular rows as object records or a matrix |
| Optional ordered field names |
| Table column metadata |
| Hierarchical tree or treemap nodes |
| Graph or Sankey relation data |
| Mapping from data fields to visual channels |
| Optional per-series overrides |
| Theme, palette, labels, legend, stacking, smoothing, orientation |
| Cartesian or mixed chart axis settings |
| Tooltip, legend, zoom, toolbox, visual map |
| Renderer and restricted ECharts option patch |
Use data.source for tabular charts, data.tree for hierarchy charts, and data.nodes / data.links for graph or Sankey charts. Prefer top-level title and subtitle; presentation fallback titles are accepted by app-side option building.
Line Chart Example
{
"title": "Revenue by Month",
"subtitle": "Actuals and profit trend",
"data": {
"source": [
{ "month": "Jan", "revenue": 82, "profit": 21 },
{ "month": "Feb", "revenue": 91, "profit": 24 },
{ "month": "Mar", "revenue": 104, "profit": 31 }
]
},
"encoding": {
"x": "month",
"y": ["revenue", "profit"]
},
"presentation": {
"smooth": true,
"showLegend": true
},
"interaction": {
"tooltip": true,
"dataZoom": "both"
}
}Sankey Example
{
"title": "Budget Flow",
"data": {
"nodes": [
{ "name": "Budget" },
{ "name": "Product" },
{ "name": "Marketing" }
],
"links": [
{ "source": "Budget", "target": "Product", "value": 62 },
{ "source": "Budget", "target": "Marketing", "value": 38 }
]
},
"interaction": {
"tooltip": true
}
}Architecture
Layer | Files | Responsibility |
MCP server |
| Register chart opener tools, app-only helpers, and resources |
Resource registry |
| Serve |
Chart service |
| Validate opener payloads and produce structured tool results |
Option builder |
| Convert normalized chart input into table view models or ECharts options |
App runtime |
| Connect to the Host, apply theme/locale/display context, render chart UI |
App bundles |
| One entry point per chart HTML resource |
Test harness |
| Exercise stdio and HTTP MCP server behavior |
Build output:
Path | Contents |
| Compiled MCP server entry |
| Single-file MCP App HTML resources |
| Type declarations for compiled modules |
Security Notes
App HTML resources use the MCP Apps resource MIME type and a restrictive empty CSP domain list by default.
Remote HTTP mode requires host allow-list, origin allow-list, and bearer-token authentication.
External links are handled by the Host; chart apps do not need broad network access for normal rendering.
advanced.optionPatchis limited to safe visual/layout keys:aria,backgroundColor,color,dataZoom,grid,legend,textStyle,title,toolbox,tooltip, andvisualMap.optionPatchrejects nested overrides for generated data structures and executable/rendering fields such asseries,dataset, axes,formatter,html,rich,timeline,media, and render mode.
Development
Common scripts:
Script | Description |
| Compile the server and build all app HTML bundles |
| Build only the single-file MCP App HTML resources |
| Start HTTP transport from |
| Start stdio transport from |
| Run TypeScript checks for source and tests |
| Run unit tests |
| Build app HTML and verify UI layout snapshots/checks |
| Run stdio and HTTP MCP harness tests |
| Run typecheck, unit tests, UI layout tests, and MCP harness tests |
Verification
Run fast local checks:
npm run typecheck
npm testRun full verification:
npm run checkMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/SpenserCai/echart-mcp-view'
If you have feedback or need assistance with the MCP directory API, please join our Discord server