microcharts is a micro chart library for React, and its MCP package (@microcharts/mcp) provides models with a toolset for invoking chart capabilities. The official description states that microcharts has 106 chart types, zero runtime dependencies, accessibility by default, and RSC compatibility.
Purpose: The MCP server and Vercel AI-SDK toolset let models first find a suitable "word-sized" chart, then get the exact integration method, and finally render it as a finished SVG with generated alt text. The official documentation emphasizes that this is not about having the model output some syntax and hoping the client renders it, but rather returning a real library SVG via tool calls, along with an accessible name generated by describeSeries.
Main capabilities:
- find_microchart(question, dataShape?): Ranks the chart catalog using a natural-language question, useful when the question is known but the chart type is uncertain.
- get_microchart(slug): Returns everything needed to integrate a single chart, including the import path, the chart's own props and shared props, data shape, best-use/avoid-use guidance, a copy-and-run example, and a JSON props form of the same example, sample, which can be passed directly to render_microchart.
- render_microchart(type, data?, props?, format?): Renders a complete, self-contained SVG plus generated alt text. series is passed via data, and other props (value, target, curve, color, width) go in props. format is "svg" (default, with inline styles, suitable for any interface) or "bare" (no CSS, for pages that already load @microcharts/react/styles.css). Missing data or an incorrect shape is rejected by name with a hint rather than throwing a stack trace, and oversized payloads are also rejected.
- Resources: microcharts://catalog (all charts and metadata) and microcharts://agent-setup (a prompt for integrating microcharts into a codebase).
Usage: Start it via npx @microcharts/mcp; the package bundles its own copy of @microcharts/react. It can be added to any MCP client, such as Claude Desktop's claude_desktop_config.json or Cursor's .cursor/mcp.json, and the client will start the server over stdio on demand. It can also be used with Vercel AI: the same three capabilities are provided as AI-SDK tools (under the /ai-sdk subpath, with the core not pulling in the ai dependency); the exported findChart, getChart, and renderChart functions can also be used directly.
Use cases: displaying real charts in chat interfaces or environments where React cannot run; having models choose charts based on a question and generate accessible SVGs; using it locally with no account, no key, and no data sent externally.
Limitations: The official documentation does not provide further information such as pricing, cost, or platform coverage; descriptions such as the number of chart types and zero dependencies come from the official text. The server bundles the chart catalog and renders using @microcharts/react, whose version is tracked independently; compatible libraries are pulled automatically, and the library version corresponding to a specific snapshot is shown in the microcharts://catalog resource.