A Model Context Protocol (MCP) server for creating Datawrapper charts using AI assistants
Project description
A Model Context Protocol (MCP) server that enables AI assistants to create Datawrapper charts. Built on the datawrapper Python library with Pydantic validation.
Example Usage
Here's a complete example showing how to create, publish, update, and display a chart by chatting with the assistant:
"Create a datawrapper line chart showing temperature trends with this data:
2020, 15.5
2021, 16.0
2022, 16.5
2023, 17.0"
# The assistant creates the chart and returns the chart ID, e.g., "abc123"
"Publish it."
# The assistant publishes it and returns the public URL
"Update chart with new data for 2024: 17.2°C"
# The assistant updates the chart with the new data point
"Make the line color dodger blue."
# The assistant updates the chart configuration to set the line color
"Show me the editor URL."
# The assistant returns the Datawrapper editor URL where you can view/edit the chart
"Show me the PNG."
# The assistant embeds the PNG image of the chart in its contained response.
"Suggest five ways to improve the chart."
# See what happens!
Getting Started
Get Your API Token
- Go to https://app.datawrapper.de/account/api-tokens
- Create a new API token
- Add it to your MCP configuration as shown above
Installation
Using uvx (Recommended)
Configure your MCP client to run the server with uvx in claude_desktop_config.json:
{
"mcpServers": {
"datawrapper": {
"command": "uvx",
"args": ["datawrapper-mcp"],
"env": {
"DATAWRAPPER_ACCESS_TOKEN": "your-token-here"
}
}
}
}
Using pip
pip install datawrapper-mcp
Then configure your MCP client:
{
"mcpServers": {
"datawrapper": {
"command": "datawrapper-mcp",
"env": {
"DATAWRAPPER_ACCESS_TOKEN": "your-token-here"
}
}
}
}
Kubernetes Deployment
For enterprise deployments, this server can be deployed to Kubernetes using HTTP transport:
Building the Docker Image
docker build -t datawrapper-mcp:latest .
Running with Docker
docker run -p 8501:8501 \
-e DATAWRAPPER_ACCESS_TOKEN=your-token-here \
-e MCP_SERVER_HOST=0.0.0.0 \
-e MCP_SERVER_PORT=8501 \
datawrapper-mcp:latest
Environment Variables
DATAWRAPPER_ACCESS_TOKEN: Your Datawrapper API token (required)MCP_SERVER_HOST: Server host (default:0.0.0.0)MCP_SERVER_PORT: Server port (default:8501)MCP_SERVER_NAME: Server name (default:datawrapper-mcp)
Health Check Endpoint
The HTTP server includes a /healthz endpoint for Kubernetes liveness and readiness probes:
curl http://localhost:8501/healthz
# Returns: {"status": "healthy", "service": "datawrapper-mcp"}
Kubernetes Configuration Example
apiVersion: apps/v1
kind: Deployment
metadata:
name: datawrapper-mcp
spec:
replicas: 1
selector:
matchLabels:
app: datawrapper-mcp
template:
metadata:
labels:
app: datawrapper-mcp
spec:
containers:
- name: datawrapper-mcp
image: datawrapper-mcp:latest
ports:
- containerPort: 8501
env:
- name: DATAWRAPPER_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: datawrapper-secrets
key: access-token
livenessProbe:
httpGet:
path: /healthz
port: 8501
initialDelaySeconds: 5
periodSeconds: 30
readinessProbe:
httpGet:
path: /healthz
port: 8501
initialDelaySeconds: 5
periodSeconds: 10
---
apiVersion: v1
kind: Service
metadata:
name: datawrapper-mcp
spec:
selector:
app: datawrapper-mcp
ports:
- protocol: TCP
port: 8501
targetPort: 8501
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datawrapper_mcp-0.0.17.tar.gz.
File metadata
- Download URL: datawrapper_mcp-0.0.17.tar.gz
- Upload date:
- Size: 182.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0505c253404feeae50fa12017691c9ba052d0b32cd6b8be0927fa3cf7eb9168b
|
|
| MD5 |
3f7b1695dc754da70bf944e153bee2e3
|
|
| BLAKE2b-256 |
1482a22b6b300aab342b628d7517f52e7f609ac0eb6a48201082ea7b8d584511
|
Provenance
The following attestation bundles were made for datawrapper_mcp-0.0.17.tar.gz:
Publisher:
continuous-deployment.yaml on palewire/datawrapper-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datawrapper_mcp-0.0.17.tar.gz -
Subject digest:
0505c253404feeae50fa12017691c9ba052d0b32cd6b8be0927fa3cf7eb9168b - Sigstore transparency entry: 757599938
- Sigstore integration time:
-
Permalink:
palewire/datawrapper-mcp@b7c2ab9e63af7ec4f645cb27ba9f022fd77dd60c -
Branch / Tag:
refs/tags/0.0.17 - Owner: https://github.com/palewire
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
continuous-deployment.yaml@b7c2ab9e63af7ec4f645cb27ba9f022fd77dd60c -
Trigger Event:
push
-
Statement type:
File details
Details for the file datawrapper_mcp-0.0.17-py3-none-any.whl.
File metadata
- Download URL: datawrapper_mcp-0.0.17-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f734d5c6001fa323b2b72166a5250969ded4363d1c2fa4f7ef06f3db3662fef5
|
|
| MD5 |
eeff90efe56ace8cbf3e0a8ee61c1bfc
|
|
| BLAKE2b-256 |
f3fa3daa0cbe68ec224c055d2c5fc162f04964f9b1a9b5025646034d9a34eea1
|
Provenance
The following attestation bundles were made for datawrapper_mcp-0.0.17-py3-none-any.whl:
Publisher:
continuous-deployment.yaml on palewire/datawrapper-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datawrapper_mcp-0.0.17-py3-none-any.whl -
Subject digest:
f734d5c6001fa323b2b72166a5250969ded4363d1c2fa4f7ef06f3db3662fef5 - Sigstore transparency entry: 757599943
- Sigstore integration time:
-
Permalink:
palewire/datawrapper-mcp@b7c2ab9e63af7ec4f645cb27ba9f022fd77dd60c -
Branch / Tag:
refs/tags/0.0.17 - Owner: https://github.com/palewire
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
continuous-deployment.yaml@b7c2ab9e63af7ec4f645cb27ba9f022fd77dd60c -
Trigger Event:
push
-
Statement type: