API & MCP
Everything a person can do on Embeddable Chart Builder, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://embeddablechartbuilder.usefulweb.site/api/v1/calculate– run Embeddable Chart BuilderGET https://embeddablechartbuilder.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Embeddable Chart Builder
Paste a small table and get a chart you can host yourself: inline SVG markup, a <figure> snippet with an accessible data-table fallback, a standalone .svg file and a standalone .html file with no external scripts (optionally with a tiny inline script for tooltips and keyboard focus).
| Field | Type | Default | Description |
|---|---|---|---|
data | textarea | — | Data. First row = headers. First column = labels (or dates/numbers for line and scatter charts); every further numeric column becomes a series. |
file | file | — | Or upload CSV/XLSX. Max 5 MB; the first sheet is used. |
chartType | select (line, area, bar, stacked, scatter, pie, donut) | "bar" | Chart type |
title (required) | text | "My chart" | Title |
description | textarea | — | Text alternative (description). What the chart shows, for screen readers and as the image alt text. Empty: generated from the data. |
xLabel | text | — | X axis label |
yLabel | text | — | Y axis label |
sourceNote | text | — | Source / credit line. Shown under the chart, e.g. "Source: Eurostat, 2026". |
width | integer | 640 | Width. The SVG scales to its container; this sets the aspect ratio and text size. |
height | integer | 360 | Height |
interactive | boolean | false | Add hover/keyboard tooltips to the standalone HTML file |
png | boolean | false | Also create a PNG image |
Example request
Grouped bars with a source line
curl -X POST https://embeddablechartbuilder.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"data":"Fruit,2025,2026\nApples,12,15\nPears,9,11\nPlums,4,7","chartType":"bar","title":"Fruit sold (tonnes)","yLabel":"tonnes","sourceNote":"Source: example data"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://embeddablechartbuilder.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
embeddable_chart_builder - Local stdio connector:
node src/mcp-stdio.ts --tool=embeddable-chart-builder
{
"mcpServers": {
"embeddable-chart-builder": { "type": "http", "url": "https://embeddablechartbuilder.usefulweb.site/mcp" }
}
}