Get the FREE Ultimate OpenClaw Setup Guide →

datawrapper

A Model Context Protocol (MCP) server for creating Datawrapper charts using AI assistants.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio palewire-datawrapper-mcp uvx datawrapper-mcp \
  --env DATAWRAPPER_ACCESS_TOKEN="your-token-here"

How to use

This MCP server integrates with Datawrapper to autonomously create and manage Datawrapper charts through natural language interactions. Built on the Datawrapper Python library, it validates requests with Pydantic and exposes capabilities to create new charts, publish them, update data or chart configuration (for example colors or styles), and retrieve viewer/editor links or embedded PNGs. Typical workflows include composing a data payload for a chart, then issuing commands like publish, update data, adjust visuals, and fetch representation assets. The server is designed to respond with chart IDs, public URLs, editor URLs, and embedded images as you chat with the assistant.

To use it, run the MCP client configured to launch the datawrapper-mcp server (via uvx as shown in the installation guide). Once connected, you can start by creating a chart with your data, then progressively refine the chart by issuing commands such as publishing the chart, adding or updating data points, changing line colors or other styling options, and requesting the editor URL or PNG image of the chart. The example interactions in the README demonstrate a typical flow: create a line chart with temperature data, publish to obtain a public URL, update data, tweak aesthetics (e.g., line color), and retrieve display assets like the PNG image.

The server expects a valid Datawrapper API token (DATAWRAPPER_ACCESS_TOKEN) via environment variables or configuration, and it will communicate with the Datawrapper service to perform the requested actions. For deployment in Kubernetes or other environments, you can expose a health endpoint and configure host/port using MCP environment variables.

How to install

Prerequisites:

  • Python 3.10 or higher
  • A Datawrapper account and a Datawrapper API token (DATAWRAPPER_ACCESS_TOKEN)
  • Optional: uvx installed for running MCP servers (recommended)

Option A: Run via uvx (recommended)

  1. Install uvx and ensure it's in your PATH
  2. Install the MCP package (datawrapper-mcp is installed via your MCP client, not as a Python package here). If you’re using uvx, ensure the datawrapper-mcp entrypoint is available in your environment.
  3. Configure your MCP client to launch the server:
    • Example (Claude Desktop): in claude_desktop_config.json { "mcpServers": { "datawrapper": { "command": "uvx", "args": ["datawrapper-mcp"], "env": { "DATAWRAPPER_ACCESS_TOKEN": "your-token-here" } } } }
  4. Run your MCP client; the server will start under the datawrapper-mcp entrypoint.

Option B: Run via pip for local testing (if you’re providing a CLI entrypoint named datawrapper-mcp)

  1. Install the MCP package:
    pip install datawrapper-mcp
    
  2. Run the MCP server directly with uvx (if installed) or via a script that invokes the datawrapper-mcp entrypoint, providing the token via environment:
    DATAWRAPPER_ACCESS_TOKEN=your-token-here uvx datawrapper-mcp
    

Option C: Docker/Kubernetes (advanced deployment)

  1. Build the Docker image as described in the Kubernetes deployment notes (not shown here).
  2. Run the container with required environment variables, e.g.:
    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
    

Prerequisites recap: ensure you have Python 3.10+, a Datawrapper API token, and a compatible MCP client (uvx or a CLI like Claude/OpenAI Codex) installed before configuring the client to launch the datawrapper-mcp server.

Additional notes

Tips and common considerations:

  • Always provide DATAWRAPPER_ACCESS_TOKEN securely via environment variables rather than plaintext in config files when possible.
  • The MCP server exposes a /healthz endpoint for Kubernetes health checks; use it to verify liveness/readiness.
  • In Kubernetes configurations, set MCP_SERVER_HOST and MCP_SERVER_PORT to the desired host/port, and ensure your secret tokens are mounted securely.
  • If you see authentication errors, verify that the Datawrapper API token has the necessary permissions for chart creation, updating, and publishing.
  • When updating chart data or styling, the server processes changes through the Datawrapper API; expect a short latency depending on API rate limits.
  • For best results, test interactions in a development environment before deploying to production, and consider securing token management with secret stores or environment passes.

Related MCP Servers

Sponsor this space

Reach thousands of developers