datawrapper-mcp-v2
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Uyari
- network request — Outbound network request in app/harness/host.ts
- process.env — Environment variable access in app/harness/vite.config.ts
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
Hosted MCP server for Datawrapper: create, style and publish charts, maps and tables from Claude, ChatGPT, Cursor or VS Code. All 25 chart types, skills, interactive chart viewer, OAuth.
Datawrapper MCP V2
Let your AI assistant create, style, preview and publish Datawrapper charts, maps and tables.
All 25 chart types · choropleth & locator maps · skills over MCP · interactive chart viewer · OAuth
Quickstart · Connect · Tools · Skills · Chart viewer · FAQ · Run locally
Hosted MCP server — nothing to install:
https://datawrapper-mcp.alpacatools.org/mcp
The interactive chart viewer (MCP App) with a real chart rendered by Datawrapper, shown as “Chart only” — light and dark.
[!NOTE]
Community project — not affiliated with Datawrapper GmbH. You need a free Datawrapper account.Use the hosted server: add
https://datawrapper-mcp.alpacatools.org/mcpto Claude, ChatGPT, Cursor, VS Code or any MCP client and sign in once with your Datawrapper token — no Node.js, no config files, always the latest release. Prefer to keep everything on your machine? You can still run it locally.
✨ What you can do
- Every chart type — all 25 Datawrapper visualizations: bars, columns, lines, areas, pies, donuts, dot/range/arrow plots, scatter plots, tables, choropleth, symbol and locator maps.
- One call, finished chart — data, title, source, alt text, styling and annotations in a single
create_chart, followed by a PNG preview the assistant can check. - Styling that just works — say
sort,highlight,y_rangeornumber_format; the server maps it to the option each chart type actually uses (learned from Datawrapper's own defaults and ~3,000 public charts). - Maps without the pain — search 4,700+ basemaps in any language (“Landkreise Bayern”, “US counties”), automatic region matching with spelling correction, markers for locator maps.
- Safe by design — validates before calling the API (no wasted quota), dry-run diffs, publishing and deleting need a real confirmation, trash with restore.
- Built on the newest MCP — spec 2026-07-28 (SDK v2), skills over MCP, an MCP App chart viewer and a hosted (or self-hostable) OAuth 2.1 HTTP server.
🚀 Quickstart
Add the server
https://datawrapper-mcp.alpacatools.org/mcpto your client — in claude.ai: Settings → Connectors → Add custom connector. Other clients: Connect your client.Sign in. A Datawrapper page opens: create an API token with the scopes
chart:readchart:writefolder:readfolder:writeand paste it. Optional:team:read(team folders),auth:read(show the token's scopes inwhoami),auth:write(one-time editor sign-in links fromopen_in_editor).Ask for a chart:
Look up annual inflation in Germany, France and Italy since 2015 (Eurostat) and make a line chart — highlight Germany and shade the 2022 energy crisis.
🔌 Connect your client
Every client uses the same URL: https://datawrapper-mcp.alpacatools.org/mcp. The first time, a sign-in page asks for your Datawrapper API token.
Settings → Connectors → Add custom connector, name it “Datawrapper” and paste the URL, then Connect. The connector is available in claude.ai, Claude Desktop and the mobile apps, including the interactive chart viewer. On Team and Enterprise plans an owner can add it once for the whole organization in the admin settings.
Claude Codeclaude mcp add --transport http datawrapper https://datawrapper-mcp.alpacatools.org/mcp
Then run /mcp and choose Authenticate. Claude Code also loads the server's skills (they appear as /datawrapper:<skill>).
Turn on developer mode in ChatGPT's settings, then create a connector with the URL (authentication: OAuth).
CursorClick Add to Cursor above, or add to ~/.cursor/mcp.json:
{ "mcpServers": { "datawrapper": { "url": "https://datawrapper-mcp.alpacatools.org/mcp" } } }
VS Code / VS Code Insiders
Click Add to VS Code above, or add to .vscode/mcp.json:
{ "servers": { "datawrapper": { "type": "http", "url": "https://datawrapper-mcp.alpacatools.org/mcp" } } }
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{ "mcpServers": { "datawrapper": { "serverUrl": "https://datawrapper-mcp.alpacatools.org/mcp" } } }
Codex
codex mcp add datawrapper --url https://datawrapper-mcp.alpacatools.org/mcp
codex mcp login datawrapper
Goose
goose configure → Add Extension → Remote Extension (Streamable HTTP) → URL above.
Any client with Streamable HTTP and OAuth works: { "type": "http", "url": "https://datawrapper-mcp.alpacatools.org/mcp" }. Clients without remote servers can run it locally.
How sign-in works: the token you paste is checked against Datawrapper and then kept only inside encrypted connection tokens held by your client. The server stores nothing, logs no tokens and never shows the token to the model. Charts and API quota belong to your own Datawrapper workspace. Revoke access any time by deleting the token in Datawrapper. The server runs on Fly.io in Frankfurt — see the privacy policy.
🖼️ Gallery
Real charts with real data, each made by a single create_chart call — the exact calls are in scripts/gen-readme-gallery.ts.
![]() Line · reference line, arrow annotation with circle |
![]() Line · area fill between two lines with a second color, striped ranges |
![]() Small multiples · long data pivoted automatically, per-panel annotations |
![]() Bars · flags, overlay for a second value, highlight |
![]() Population pyramid · mirrored split bars |
![]() Stacked columns · totals, series colors, annotation |
![]() Scatter · log axis, bubble sizes, colors by region, trend line |
![]() Range plot · flags, sorted by difference |
![]() Table · sparklines, mini bars, flags, heatmap, search |
![]() Choropleth · German country names matched automatically, diverging scale |
![]() Spike map · symbols by coordinates, sized by a column |
![]() Locator map · 3D buildings, tilted camera, area, route, numbered key, inset |
| Family | Types |
|---|---|
| Bars | d3-bars · d3-bars-split · d3-bars-stacked · d3-bars-grouped · d3-bars-bullet |
| Columns | column-chart · grouped-column-chart · stacked-column-chart · multiple-columns |
| Lines & areas | d3-lines · multiple-lines · d3-area |
| Dots, ranges, arrows | d3-dot-plot · d3-range-plot · d3-arrow-plot |
| Pies | d3-pies · d3-donuts · d3-multiple-pies · d3-multiple-donuts · election-donut-chart |
| Scatter | d3-scatter-plot |
| Maps | d3-maps-choropleth · d3-maps-symbols · locator-map |
| Tables | tables |
Aliases in plain language work too: bar, stacked bars, choropleth, Kreisdiagramm, table …
💬 Example prompts
| Use case | Prompt |
|---|---|
| Trend with context | “Line chart of these monthly prices, start at zero and mark the 2022 energy crisis.” |
| Ranking | “Sorted bar chart of the top 10 cities by rent, highlight Munich, values in €.” |
| Regional data | “Map unemployment by German district from this CSV with 5 color steps.” |
| Places | “Locator map with our three office locations in Berlin, the HQ in red.” |
| Lookup table | “Searchable table of all countries with a heatmap on the growth column.” |
| Review | “Review chart aBc12 for clarity and accessibility — propose fixes, don't change anything yet.” |
A typical conversation:
You: Turn this CSV into a chart about how renewables grew.
Claude: (analyze_data → create_chart) Created a draft stacked column chart … [preview]
You: Make renewables green and the rest grey, and add the source "Ember".
Claude: (update_chart) Updated — 3 changes. [preview]
You: Publish it and give me the embed code.
Claude: (publish_chart → you confirm) Published v1: https://datawrapper.dwcdn.net/… <iframe …>
🛠️ Tools
28 tools · 📖 read-only · ✏️ changes data · ⚠️ needs confirmation
🔎 Discover (5)| Tool | What it does | |
|---|---|---|
| 📖 | whoami |
Check the connection and show the account, workspaces, teams and API token scopes. |
| 📖 | analyze_data |
Profile a dataset (column types, number format, ranges) and recommend 1–4 suitable chart types with the column mapping and a reason. |
| 📖 | describe_chart_type |
Without type, list all 25 chart/map/table types with when to use each. |
| 📖 | list_themes |
List available themes. |
| 📖 | get_guide |
Read expert guidance (the same content as this server's skills) on a topic. |
| Tool | What it does | |
|---|---|---|
| ✏️ | create_chart |
Create a chart, map or table in one call (create + upload data + style). |
| ✏️ | update_chart |
Change an existing chart — texts, data, type, style, annotations or raw options. |
| 📖 | preview_chart |
Render the current state of a chart as PNG (desktop or mobile width, light or dark, optionally only the chart without title, description and footer) to check it visually. |
| 📖 | get_chart |
Show one chart. |
| 📖 | search_charts |
Find charts by text, folder, type or publish state, newest first, or list the user's recently edited, published or viewed charts (recent). |
| ✏️ | open_in_editor |
Create a one-time sign-in link (valid 5 minutes, single use) that opens the chart directly in the Datawrapper editor at a given step — for fine-tuning by hand. |
| Tool | What it does | |
|---|---|---|
| 📖 | find_basemap |
Search the 4,700+ basemaps for choropleth/symbol maps by place and level in any language ('Bundesländer', 'US counties', 'Bavaria districts 2024', 'world'). |
| 📖 | match_regions |
Check which region values (names or codes) match a basemap, pick the best key automatically, and list unmatched values with spelling suggestions. |
| Tool | What it does | |
|---|---|---|
| ⚠️ | publish_chart |
Publish (or republish) a chart so it is publicly visible at its URL and embeddable. |
| 📖 | get_embed_code |
Embed codes for a published chart — responsive iframe, fixed iframe, script embed (web component, no iframe), Google AMP or oEmbed — optionally with render flags (dark mode, plain without header/footer, static without interactivity, logo on/off, transparent background, fitchart, table search). |
| ⚠️ | unpublish_chart |
Take a published chart offline (public URL and embeds stop working). |
| 📖 | export_chart |
Export a chart as PNG, SVG or PDF (print quality, CMYK, transparent background, dark mode, custom size), or as a ZIP with index.html and the scripts to host the published chart yourself. |
| Tool | What it does | |
|---|---|---|
| ✏️ | copy_chart |
Duplicate a chart (data, settings, annotations) as a new draft, to make variants or update a chart for a new period without touching the original. |
| ✏️ | move_charts |
Move one or more charts into a folder, team or workspace (bulk, up to 1,000). |
| ✏️ | create_folder |
Create a folder (optionally inside another folder or a team) to organise charts. |
| ✏️ | update_folder |
Rename a folder and/or move it (with its subfolders and charts) under another folder, to the root, or into a team. |
| ✏️ | copy_folder |
Copy a folder with all its subfolders and charts (the charts become new drafts with new ids) into another folder, the root or a team. |
| ✏️ | delete_folder |
Delete a folder. |
| 📖 | list_folders |
Show the folder tree (personal, team and workspace folders) with folder ids and chart counts. |
| ⚠️ | delete_chart |
Move a chart to the trash (restorable for 30 days with restore_charts). |
| ✏️ | restore_charts |
Restore charts from the trash (deleted within the last 30 days). |
| 📖 | get_comments |
Read the comment threads on a chart (team feedback from the Datawrapper editor), with author names, dates, replies and resolved state. |
| ✏️ | add_comment |
Post a comment (or a reply to one) on a chart under the user's name; everyone with access to the chart sees it in the editor. |
Resources: datawrapper://chart-types, datawrapper://chart-types/{type}/schema, datawrapper://charts/{id}, datawrapper://charts/{id}/data · Prompts: chart_from_data, map_from_data, review_chart
🧠 Skills
The server ships expert guidance as skills over MCP (skill://datawrapper/…, SHA-256-verified). Clients without skills support read the same content through the get_guide tool.
| Skill | Use it for | Try |
|---|---|---|
choosing-a-chart |
Picking the right chart, map or table for a message | “How should I show these survey results?” |
building-charts |
Data shapes, the style field, update rules — plus a reference for all 25 types |
“Build a bar chart from this table.” |
annotations-and-highlights |
Labels, shaded ranges, reference lines, highlighting | “Mark the 2008 crisis on this chart.” |
choropleth-and-symbol-maps |
Basemaps, region matching, color scales | “Map this by US county.” |
locator-maps |
Points, routes, areas on a detailed map | “Show where the bridge closed.” |
tables |
Heatmaps, mini bars, sparklines, search | “Make this a searchable table.” |
tooltips-and-number-formats |
Number/date formats and tooltip templates | “Show values as millions with one decimal.” |
accessibility-and-publishing |
Alt text, colors, dark mode, publishing, export | “Is this ready to publish?” |
🪟 Chart viewer
In clients that support MCP Apps, chart tools open an interactive viewer right in the conversation. That includes claude.ai, Claude Desktop, ChatGPT, VS Code and Goose.
- Preview — the rendered chart, with desktop/mobile and light/dark toggles.
- Edit ↗ — opens the chart in the Datawrapper editor for fine-tuning by hand.
- PNG ↓ — exports the current view.
- Publish — asks for confirmation, then shows the embed code and a Live ↗ link.
Other clients get the same information as text plus a PNG preview.
💻 Run locally
The hosted server is the easiest way in. Run the server on your own machine instead when you want the token to stay local, write exports to disk (export_chart with save_to) or add house rules (DW_MCP_INSTRUCTIONS, see Configuration). It needs Node.js 22+; every client starts the same command with your token in DATAWRAPPER_API_KEY:
{
"mcpServers": {
"datawrapper": {
"command": "npx",
"args": ["-y", "datawrapper-mcp"],
"env": { "DATAWRAPPER_API_KEY": "your-token" }
}
}
}
Setup per client
Claude Code:
claude mcp add datawrapper --env DATAWRAPPER_API_KEY=your-token -- npx -y datawrapper-mcpClaude Desktop: Settings → Developer → Edit Config, add the JSON above to
claude_desktop_config.json, restart.Cursor: add the JSON above to
~/.cursor/mcp.json.VS Code: add to
.vscode/mcp.json— VS Code asks for the token and stores it securely:{ "inputs": [{ "type": "promptString", "id": "datawrapper_api_key", "description": "Datawrapper API token", "password": true }], "servers": { "datawrapper": { "command": "npx", "args": ["-y", "datawrapper-mcp"], "env": { "DATAWRAPPER_API_KEY": "${input:datawrapper_api_key}" } } } }Windsurf: add the JSON above to
~/.codeium/windsurf/mcp_config.json.Codex:
codex mcp add datawrapper --env DATAWRAPPER_API_KEY=your-token -- npx -y datawrapper-mcpGoose:
goose configure→ Add Extension → Command-line Extension → commandnpx -y datawrapper-mcp, environment variableDATAWRAPPER_API_KEY.
🌐 Self-host a remote server
For your own domain or a private team deployment, run the same server over Streamable HTTP behind a public HTTPS URL. Users connect once through OAuth: the consent page asks for their own Datawrapper token, which is kept only inside encrypted, stateless access tokens — it never reaches the model and no database is needed.
docker build -t datawrapper-mcp .
docker run -p 3000:3000 \
-e PUBLIC_URL=https://dw-mcp.example.com \
-e OAUTH_SECRET="$(openssl rand -base64 32)" \
datawrapper-mcp
Then add https://dw-mcp.example.com/mcp as a custom connector (claude.ai: Settings → Connectors).
| OAuth (recommended) | Local single user |
|---|---|
|
|
Endpoints: /mcp, /.well-known/oauth-protected-resource/mcp, /.well-known/oauth-authorization-server, /authorize, /token, /register, /server-card, /privacy, /healthz. On Fly.io, fly.toml is a ready config (one always-on machine; fly deploy --ha=false).
⚙️ Configuration
For local and self-hosted servers (the hosted server uses the defaults).
| Variable | Default | Description |
|---|---|---|
DATAWRAPPER_API_KEY |
— | Datawrapper API token (stdio and MCP_AUTH=none) |
DW_MCP_INSTRUCTIONS |
— | House style added to the server instructions, e.g. “Always use theme X, byline Data Team” |
DW_PREVIEW |
auto |
PNG preview after create/update: auto, always, never |
DW_REQUIRE_ELICITATION |
false |
true = publish/unpublish/delete, comments and external data URLs only through the client's confirmation dialog |
DW_EXPORT_DIR |
./exports |
Where export_chart(save_to) writes files (stdio only) |
PUBLIC_URL |
http://HOST:PORT |
Public base URL of the HTTP server (OAuth issuer and resource) |
OAUTH_SECRET |
ephemeral on localhost | ≥ 32-byte secret for token encryption; keep it stable across restarts and instances |
HOST / PORT |
127.0.0.1 / 3000 |
Bind address (0.0.0.0 in Docker) |
TRUST_PROXY_HOPS |
0 |
Number of reverse proxies in front of the server (for client-IP rate limits) |
RATE_LIMIT_PER_MINUTE |
240 |
Requests per minute per token on /mcp |
ALLOW_RAW_TOKENS |
false |
Accept a Datawrapper token directly as Bearer — private deployments only |
ALLOWED_HOSTS |
— | Extra Host header names (reverse proxies) |
IMPRINT_URL |
— | Operator's imprint / legal notice, linked from every page (HTTP) |
PRIVACY_URL |
built-in /privacy |
Your own privacy policy; /privacy then redirects there (HTTP) |
STATS_TOKEN |
— | Enables GET /stats (anonymous daily usage counts) with this Bearer token (HTTP) |
STATS_FILE |
— | JSON file that keeps the daily counts across restarts (HTTP) |
STATS_MIN_COUNTRY_USERS |
5 |
Countries with fewer users per day are reported as other (HTTP) |
GEOIP_DB |
geoip/dbip-country-lite.mmdb |
DB-IP country database (npx tsx scripts/fetch-geoip.ts; the Docker image includes it) |
Usage statistics (HTTP). The server counts per UTC day: requests, tool calls (per tool), distinct users, and distinct users per MCP client and per country. Users are counted through a daily-salted hash that never leaves memory, so nobody can be followed across days; no IP addresses or per-user records are stored. The country comes from the browser IP at sign-in (offline lookup, IP Geolocation by DB-IP) and travels only inside the encrypted tokens — claude.ai and ChatGPT call the server from their own data centers, so the request IP would not say where users are. A summary line is logged at the end of each day; curl -H "Authorization: Bearer $STATS_TOKEN" https://…/stats?days=30 returns the counts as JSON. Without STATS_FILE they live only in memory; the public instance instead has them collected hourly and before every deploy by .github/workflows/stats.yml into an encrypted file on the stats branch (node scripts/collect-stats.ts show with STATS_ENC_KEY decrypts it).
🏗️ Architecture
flowchart LR
client["MCP client<br/>Claude · VS Code · Cursor …"] -- "stdio or Streamable HTTP + OAuth" --> server["Datawrapper MCP V2"]
server -- "REST API v3" --> dw[("Datawrapper")]
server -- "ui:// resource" --> viewer["Chart viewer<br/>(MCP App)"]
server -- "skill://" --> skills["8 skills"]
The option catalog in src/catalog/ comes from Datawrapper's own defaultMetadata per chart type plus key usage in public charts (scripts/harvest-catalog.ts); styling, validation, describe_chart_type and the skill references are all generated from it.
🔒 Security
[!IMPORTANT]
Your Datawrapper token never appears in tool schemas, results or logs. On a remote server it exists only inside AES-256-GCM-encrypted tokens.
- Confirmation for consequential actions — publish, unpublish, delete, comments and new external data URLs (which Datawrapper's servers then fetch) need the user's OK: an explicit
user_confirmedflag after they agreed in the chat, otherwise the client's confirmation dialog (MCP elicitation). Permanent deletion accepts only the dialog; deleting goes to the trash first. - Prompt injection — chart data, comments and charts shared by others can contain text aimed at the AI. The
user_confirmedflag is set by the model, so on a self-hosted serverDW_REQUIRE_ELICITATION=truemakes every consequential action wait for a human in the client's dialog (clients without dialogs can then not publish or delete). - Least privilege — the token only needs
chart:readchart:writefolder:readfolder:write;auth:write(one-time sign-in links) andauth:readare optional. - OAuth 2.1 — PKCE (S256), single-use codes, audience-bound 1 h access tokens, refresh tokens re-checked against Datawrapper, connections end 180 days after sign-in, Client ID Metadata Documents and dynamic registration. The consent page names a client by the domain that published its metadata; self-chosen names of registered clients are marked unverified.
- Hardening — Host/Origin validation (DNS rebinding), per-token and per-IP rate limits (claude.ai's shared egress gets its own tier), strict CSP on the consent page, no token passthrough by default, metadata documents fetched only from public addresses with the checked DNS answer pinned.
- Limits of the stateless design — refresh-token reuse is not detected, and single-use codes are tracked per instance. Revoke access any time by deleting the token in Datawrapper.
Found a vulnerability? Please report it privately — see SECURITY.md.
❓ FAQ
How is this different from palewire/datawrapper-mcp?
It covers all 25 chart types (not 8), maps and tables, maps semantic styling to each type, adds annotations, basemap search, region matching, dry runs, a chart viewer, skills and a self-hostable OAuth server — and it is written in TypeScript on the MCP 2026-07-28 SDK.
Hosted or local?
Hosted (https://datawrapper-mcp.alpacatools.org/mcp) for almost everyone: no install, works in web and mobile clients, always up to date. Run locally to keep the token on your machine, save exports to disk or add house rules; self-host for your own domain.
Does it cost anything?
No. The hosted server and the code (MIT) are free. Datawrapper's API is free for 500 chart creations, 1,000 publishes and 3,000 exports per workspace and month; previews count as exports. The server validates before calling the API and caches previews, so failed calls cost nothing.
My map shows grey regions.
Those regions didn't match the basemap. Run match_regions — it shows unmatched values with suggestions — or use codes (ISO, AGS, FIPS) instead of names.
Can I use my team's theme and folders?
Yes: new charts use your team's default theme; ask for another one or a folder by name (see list_themes, list_folders). Fixed house rules for every chart go into DW_MCP_INSTRUCTIONS on a local or self-hosted server.
The assistant can't publish.
Publishing needs a confirmation. In clients without a confirmation dialog, tell the assistant explicitly that it may publish.
🧑💻 Development
npm install
npm run dev # stdio server from source
npm test # unit + in-process integration tests
npm run e2e # live tests against Datawrapper (reads .env, cleans up after itself)
npm run build # MCP App (single HTML file) + server
npx tsx scripts/gen-readme-tools.ts # refresh the tools section above
npx tsx scripts/gen-readme-gallery.ts # re-render the gallery (uses API quota)
npx vite --config app/harness/vite.config.ts # chart-viewer dev harness (http://localhost:5199)
The harness replays a sample result by default. Open http://localhost:5199/?live=<chart_id> to drive the viewer against your local server and a real chart: every button calls the real tools (Publish really publishes), and the token from .env stays in the Vite process. ?n=2 mounts two viewers (supersession), ?theme=dark starts dark, ?fs=0 hides the fullscreen control.
Releasing. Set the new version in package.json (npm version X.Y.Z --no-git-tag-version) and in both places in server.json, add a ## X.Y.Z — date section to the CHANGELOG, commit and push, then publish a GitHub release vX.Y.Z. That release deploys the hosted server (deploy.yml) and publishes to npm and then to the MCP Registry (release.yml) — through GitHub's OIDC identity, without stored tokens. The workflow stops before publishing if the versions or the CHANGELOG do not match. gh workflow run release.yml (dry run by default) checks it all without publishing.
Contributions are welcome — please run npm run lint && npm test before opening a pull request. See CHANGELOG.md for releases.
📄 License
MIT © Jonathan Hornung
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi











