Skip to content

ztd-charts ships 44 React SVG charts with an MCP server

A nine-day-old MIT-licensed TypeScript library puts every chart behind a JSON Schema so AI agents can validate and render specs without writing JSX.

Draftship Editorial3 min read

44 charts, nine days, 319 stars

The GitHub trending AI repositories list surfaced Junhan2/ztd-charts on 2026-11-14, when the repository had 319 stars and 46 forks. It was created on 2026-11-05, so those numbers built up in nine days. The project is written in TypeScript, licensed MIT, and tagged chart and data-visualization. Its claim is 44 animated, interactive React charts from ztd-charts, drawn in pure SVG with no runtime dependencies, plus a JSON spec and CLI and MCP tooling aimed at AI agents.

Pure SVG, no runtime dependencies

React is the only peer dependency. The README puts a chart plus the shared core at roughly 12 to 26 kB Brotli, and says very large data switches to canvas on its own. The 44 charts are grouped into proportion, hierarchy, flow, comparison, trend, distribution, relationship, map and KPI. That covers familiar shapes such as pie, bar and line alongside Sankey, chord, Marimekko, ridgeline, candlestick, parallel coordinates, tile grid maps and gauges.

The accessibility claims are specific: keyboard navigation, a screen reader description and a data table for every chart, reduced motion support, and labels at WCAG AA contrast. English is the default locale, and setting locale="ko-KR" changes number formats such as 1.2만 and 3.4억 and translates chart text into Korean. The card design gives each chart one message, with a single item in the accent color and a bold takeaway line underneath.

The JSON spec is the interface for agents

Every chart can also be written as a JSON spec with a public JSON Schema. That spec is what the command line tool, the MCP server and the agent skill consume: they validate it and render it to PNG, SVG or HTML. Three npm packages split the work. ztd-charts holds the React components, cards, grid, themes and data hooks, plus spec tools and server rendering. ztd-charts-cli lists, validates, renders and suggests charts from a terminal. ztd-charts-mcp is the MCP server.

According to the README, that server can list available charts, return a chart's schema and example, validate a spec and flag wrong fields, render output as PNG, SVG or React code, and suggest charts from a CSV file, raw rows or a URL. Setup for Claude Code is one command, claude mcp add ztd-charts -- npx -y ztd-charts-mcp, and the guide also covers Cursor and Claude Desktop. An llms.txt file is meant to hand a model the whole library in one document.

A worked example

The README shows the loop in two terminal commands. npx ztd-charts-cli suggest sales.csv --out-dir charts produces chart ideas and ready specs from a data file. npx ztd-charts-cli render donut.json --out donut.png --theme light --scale 2 turns one spec into a PNG. On the React side, installation starts with npm i ztd-charts. The documentation names REST, CSV, Supabase, Google Sheets and Postgres among the data connections it covers.

Limits and open questions

The source does not say which chart types fall back to canvas or at what data size. It points to a QA report covering screenshots, contrast, frame rate, a 10,000-point stress test and bundle sizes, but none of those results appear in the announcement. No React version range is stated. Server rendering exists as a package entry point without detail on how it behaves. A migration path from @junhanlee/chart-kit is mentioned, also without detail.

Adoption is thin so far, with stars as the only signal and nine days of history. The README also notes that every number in its examples is made up, which is worth remembering before copying a demo.

What it means for building apps with AI

The notable idea is the split between what a model writes and what the renderer accepts. A JSON Schema gives an agent a bounded target, and a validator that names wrong fields is easier to loop on than freehand component code. Whether that helps depends on the app: a dashboard needs data before it needs charts. If you are building on Draftship, apps come with a built-in database and hosting, and you can read about managing your app data before wiring a chart to it. Draftship is not affiliated with ztd-charts.

Primary sources

This article was drafted with AI assistance from the primary sources listed below and checked automatically against them. An editor hasn't reviewed it yet.