Datawrapper MCP

Datawrapper MCP

An MCP server that enables AI assistants to create, update, and publish Datawrapper charts through natural language. It provides tools for data synchronization, visual configuration, and retrieving chart images or editor links.

Category
访问服务器

README

A Model Context Protocol (MCP) server that enables AI assistants to create Datawrapper charts. Built on the datawrapper Python library with Pydantic validation.

<!-- mcp-name: io.github.palewire/datawrapper-mcp -->

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

Requirements

  • A Datawrapper account (sign up at https://datawrapper.de/signup/)
  • An MCP client such as Claude or OpenAI Codex
  • Python 3.10 or higher
  • A Python package installer such as pip or uvx

Get Your API Token

  1. Go to https://app.datawrapper.de/account/api-tokens
  2. Create a new API token
  3. Add it to your MCP configuration as shown below

Installation

Claude Code

Using uvx (recommended)

Configure your MCP client in claude_desktop_config.json:

{
  "mcpServers": {
    "datawrapper": {
      "command": "uvx",
      "args": ["datawrapper-mcp"],
      "env": {
        "DATAWRAPPER_ACCESS_TOKEN": "your-token-here"
      }
    }
  }
}

Using pip

First install the package:

pip install datawrapper-mcp

Then configure your MCP client in claude_desktop_config.json:

{
  "mcpServers": {
    "datawrapper": {
      "command": "datawrapper-mcp",
      "env": {
        "DATAWRAPPER_ACCESS_TOKEN": "your-token-here"
      }
    }
  }
}

OpenAI Codex

CLI with uvx

Add this to ~/.codex/config.toml:

[mcp_servers.datawrapper]
args = ["datawrapper-mcp"]
command = "uvx"
startup_timeout_sec = 30

[mcp_servers.datawrapper.env]
DATAWRAPPER_ACCESS_TOKEN = "your-token-here"

CLI with pip

First install the package:

pip install datawrapper-mcp

Then add this to ~/.codex/config.toml:

[mcp_servers.datawrapper]
command = "datawrapper-mcp"
startup_timeout_sec = 30

[mcp_servers.datawrapper.env]
DATAWRAPPER_ACCESS_TOKEN = "your-token-here"

Secure secrets

For enhanced security, you can configure a pass-through environment variable by ensuring that DATAWRAPPER_ACCESS_TOKEN is set in your environment, and replacing this in your config.toml:

[mcp_servers.datawrapper.env]
DATAWRAPPER_ACCESS_TOKEN = "your-token-here"

With this:

env_vars = ["DATAWRAPPER_ACCESS_TOKEN"]

This ensures that the value set for DATAWRAPPER_ACCESS_TOKEN in your environment is passed through to Codex without having to store the secret as text in a config file.

Desktop application

If you're using the Codex Desktop Application, you can set up the MCP in your settings under MCP servers:

  1. Under Custom servers, click Add server
  2. Under Name, enter datawrapper-mcp
  3. Select STDIO
  4. Under Command to launch, type uvx (you must have uv installed)
  5. Under Arguments, add datawrapper-mcp
  6. Under Environment variables, add DATAWRAPPER_ACCESS_TOKEN as the key and your token as the value
  7. Click Save

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选