Open-source MCP server · MIT

Charts in.
Structured data out.

ChartDuck reads scientific figures and PDF pages, then returns panel boxes, chart types and data series in data coordinates. When it cannot calibrate an axis, it returns null — never a guessed table.

pip install chartduck-mcp Read the contract PyPI

01 / Demo

One figure, one extraction

The figure below was drawn for this page. The output next to it is a real response from the extraction engine — no mock-up, no hand-tuned numbers.

input · figure.png · 1152×827
Self-drawn line chart: Time in minutes on the x axis, Response in arbitrary units on the y axis, rising from about 12 to 56.
output · engine 1.3.0
{
  "panels": [{
    "box": [119.0, 25.0, 1139.0, 719.0],
    "chart_type": "line",
    "why": null,
    "axis": {
      "x": {"model": "lin", "a": 46.29, "b": 165.1},
      "y": {"model": "lin", "a": -11.524, "b": 719.113}
    },
    "axis_labels": {
      "x": null,
      "y": {"text": "Response (a.u.)", "score": 1.0}
    },
    "data": {
      "x_units": "value", "y_units": "value",
      "series": [{
        "kind": "line",
        "points": [[-0.1318, 12.0716], [-0.1102, 12.0716], ...]
      }]
    }
  }]
}

938 points were returned; the redraw samples 68 of them. The x-axis title was not recognized, so axis_labels.x is null — the engine reports the miss instead of inventing a label. Series values land within roughly 0.2 units of the plotted data.

02 / Why

Built around one rule: no invented numbers

01

Refuse, don't guess

If the axes cannot be calibrated, the panel comes back with data: null and a reason code. A missing value is recoverable; a plausible wrong one is not.

02

Made for real documents

Panels are located inside full pages and multi-panel figures, not just clean crops. PDFs are processed page by page; value-less panels return geometry only.

03

MCP-native

Two tools with typed inputs and structured errors, so Claude Code, Cursor and other MCP clients can call extraction without bespoke glue code.

03 / Integrate

Four ways in, one contract

The MCP server, CLI and SDK are thin clients over the same REST endpoints. Requests carry raw image bytes; the client guesses the content type from magic bytes.

Claude Code, then a generic JSON config for other MCP clients.

claude mcp add chartduck -- chartduck-mcp

{
  "mcpServers": {
    "chartduck": {
      "command": "chartduck-mcp",
      "env": {
        "CHARTDUCK_API_URL": "https://api.chartduck.com",
        "CHARTDUCK_TOKEN": "..."
      }
    }
  }
}

04 / Capabilities

What it reads, and what it refuses

Chart types are detected per panel. Values are returned in data coordinates when both axes calibrate; otherwise the panel is reported without numbers.

The notes column scrolls sideways on narrow screens.

Chart typeExtractionNotes
Vertical barYesSingle and grouped bars; category labels where legible
LineYesUp to 2000 points per series, evenly thinned
ScatterYesFilled and hollow markers
Vertical box plotYesQuartiles and whiskers
Horizontal barYesCategory names when legible
Scatter with a connecting linePartialOften read as one of the two pure types
Pie, heatmap, 3D, radarRefusedReported as unsupported rather than approximated
Panels without a value axisGeometrynormalized_box units, no fabricated values

Limits

  • Image up to 20 MB
  • PDF up to 100 MB and 200 pages
  • First 20 panels per page
  • 180 s client timeout

Formats

  • PNG, JPEG, WEBP, BMP, TIFF, GIF
  • PDF (page by page)
  • Content type detected from bytes

Error codes

invalid_input, unauthorized, quota_exceeded, too_large, unsupported_format, unreadable, rate_limited, upstream_error.

05 / Benchmarks

Measured on unseen documents

Numbers below come from a held-out set of public ICPR2022-style documents. They are published so you can decide whether the tool is good enough for your task.

65–70%of figures yield data automatically; the rest return data: null
91.7%x-axis title accuracy (beta, not covered by support)
76.9%y-axis title accuracy (beta, not covered by support)

The evaluation corpus is not redistributable; the methodology and per-category results are documented in the repository README. Axis titles are beta and excluded from any support commitment.

06 / FAQ

Questions that come up

Is the extraction engine open source?

No. The MCP server, CLI and Python client are MIT-licensed. The engine, the hosted service and the evaluation corpus are not part of the repository.

What happens when a panel cannot be read?

The panel is still returned, with its box, detected type and a why code, but data is null. Request-level failures use MCP isError results with a code: message text.

Which files can I send?

Images (PNG, JPEG, WEBP, BMP, TIFF, GIF) up to 20 MB, or PDFs up to 100 MB and 200 pages. The service decodes by content type, so extensionless files are fine.

Can I run it offline or self-host the engine?

Not currently. The client is local, but every extraction calls the hosted service. There is no self-hosted engine distribution.

What happens to my images?

They are sent to the hosted API for processing. During the pilot, treat uploads as non-confidential until a published data-retention policy says otherwise.

How do I get an API token?

The hosted API is not public yet. Tokens are issued directly during the pilot; the public endpoint and signup will be announced here.