chart-mcp
Renders interactive charts using Chart.js, supporting line, bar, pie, doughnut, radar, polar area, bubble, and scatter chart types with dynamic data regeneration and chart type switching.
Click on "Deploy 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., "@chart-mcprender a bar chart"
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.
chart-mcp
An MCP App server that renders an interactive Chart.js chart inside an MCP host (e.g. Claude Desktop). Users can switch between chart types and regenerate random data without leaving the host UI.
Features
Eight chart types: line, bar, pie, doughnut, radar, polar area, bubble, scatter
Chart type selector dropdown
"Regenerate Data" button that fetches fresh random data from the server
Host theme integration via CSS custom properties
Related MCP server: QuickChart MCP Server
How it works
The server exposes two MCP tools and one resource:
Name | Type | Description |
| UI tool | Opens the chart UI in the host. Accepts an optional |
| Tool | Returns Chart.js-compatible JSON for the given chart type. Called from the UI. |
| Resource | The bundled React + Chart.js single-file HTML served to the host. |
When the host invokes render-chart it reads the _meta.ui.resourceUri field and loads the bundled HTML as an interactive panel. The React UI then calls generate-data via app.callServerTool() whenever data is needed.
Requirements
Node.js 18+
npm
Getting started
npm install
npm run build
npm run serve # HTTP transport on port 3001
# or
npm run serve:stdio # stdio transportDuring development, Vite watches source files and the server restarts on changes:
npm run devConnecting to an MCP host
HTTP transport
Point your MCP host at:
http://localhost:3001/mcpstdio transport
Use the serve:stdio script as the command in your host configuration:
{
"mcpServers": {
"chart-mcp": {
"command": "npm",
"args": ["run", "serve:stdio"],
"cwd": "/path/to/chart-mcp"
}
}
}Test host
The @modelcontextprotocol/ext-apps repo ships a browser-based test host:
cd /path/to/mcp-ext-apps/examples/basic-host
npm install && npm run start
# open http://localhost:8080Enter http://localhost:3001/mcp as the server URL, then invoke render-chart to open the chart UI.
Usage
Once connected, ask the host to call the render-chart tool:
render-chart # defaults to bar chart
render-chart chartType="pie" # open with pie chart selectedInside the UI:
Use the Chart Type dropdown to switch chart types — new data is fetched automatically.
Click Regenerate Data to get fresh random data for the current chart type.
Project structure
chart-mcp/
├── mcp-app.html # Vite HTML entry point
├── main.ts # HTTP + stdio transport entry point
├── server.ts # MCP server: tools, resource, data generation
├── vite.config.ts # Vite + singlefile config
├── tsconfig.json
├── package.json
└── src/
├── mcp-app.tsx # React chart UI
└── global.css # Host CSS variable fallbacksScripts
Script | Description |
| Type-check and bundle the UI to |
| Vite watch + MCP server with live reload |
| Start MCP server (HTTP, port 3001) |
| Start MCP server (stdio) |
License
Apache 2.0 — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Renders interactive Chart.js charts and dashboards inline in AI conversations. Supports bar, line, area, pie, doughnut, scatter, and radar charts with multi-chart dashboard grids.
Renders interactive Chart.js charts and dashboards inline in AI conversations.
Create, inspect, manage, and render charts and data visualizations as SVG/PNG or interactive embeds.
Generate production-ready chart code (Recharts, Chart.js, ECharts, Plotly) from a prompt.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to generate and render charts as PNG, SVG, or WebP images directly in chat interfaces. Supports Chart.js specifications and natural language descriptions for creating visualizations from data.37 npm1MIT
- FlicenseAqualityDmaintenanceGenerates and downloads charts using QuickChart.io through Claude Desktop and other MCP clients.11-
- AlicenseAqualityAmaintenanceTableCharts MCP Server gives any LLM assistant the ability to instantly convert tabular data into beautiful, hosted, interactive dashboards. Simply provide JSON rows, raw CSV text, or a public URL (Notion page, Google Sheet, or Salesforce report), and get back a shareable dashboard URL plus an embeddable iframe code — all in one tool call. Supports 6 chart types: bar, line, area, pie, scatter, a213 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server that renders interactive Chart.js charts (bar, line, pie, doughnut, etc.) inline in Claude's UI.1MIT