ChartDuck MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ChartDuck MCP Extract the chart data from this image: https://example.com/figure.png"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ChartDuck MCP
Open-source MCP server and CLI for ChartDuck — chart data extraction from scientific figures and document pages. The extraction engine runs on the hosted service; this repository is the thin client (MCP + CLI + Python SDK).
Status: pre-release (0.1.x). The hosted API is live at
https://api.chartduck.com, so the client listed here does reach a working service. It is a shared public endpoint with a daily quota and no uptime commitment — if it answers429/rate_limited, wait and retry. The contract, code and error semantics below are implemented and tested against a mock, a local engine and the hosted endpoint.
What it does
Given a chart image (or a PDF page), return structured data per panel:
panel box, chart type (
bar/barh/line/scatter/box)data series (values in data coordinates when the axes can be calibrated)
geometry for panels without a value axis (
normalized_boxunits)recognized axis titles (beta)
{
"panels": [
{
"box": [100.0, 19.0, 474.0, 393.0],
"chart_type": "line",
"axis_labels": {
"x": {"text": "Baseline Fgas", "score": 0.98},
"y": {"text": "Change in Fgas", "score": 1.0}
},
"data": {"series": [{"kind": "line", "points": [[0.5022, -0.0007], "..."]}]}
}
],
"meta": {"engine_version": "1.4.0", "elapsed_ms": 2640}
}Related MCP server: pdf-chart-parser
Honest capability statement
Measured on public ICPR2022-style documents (unseen distribution):
~65-70% of figures yield data automatically; the rest return
data: null.Supported types: vertical bar, line, scatter, vertical box, horizontal bar.
scatter-lineis partially supported. Other types are refused, not guessed.If the extractor is not confident, it returns
nullinstead of a wrong table. This is a design choice: a missing value is recoverable, a plausible wrong value is not.Axis titles are beta: x-axis content accuracy 91.7%, y-axis 76.9% — not covered by any support commitment.
Full benchmark methodology: https://chartduck.com/#benchmarks.
Install
Requires Python 3.10+.
pip install chartduck-mcp # 0.1.1: hosted API is live
# or from source
git clone https://github.com/MoDongla/chartduck-mcp && cd chartduck-mcp && pip install -e .Configure
export CHARTDUCK_API_URL="https://api.chartduck.com" # hosted service base URL
export CHARTDUCK_TOKEN="..." # optional: only for a private deploymentUse as an MCP server
Claude Code:
claude mcp add chartduck -- chartduck-mcpClaude Desktop / generic JSON config:
{
"mcpServers": {
"chartduck": {
"command": "chartduck-mcp",
"env": {
"CHARTDUCK_API_URL": "https://api.chartduck.com",
"CHARTDUCK_TOKEN": "..."
}
}
}
}Streamable HTTP mode (for hosting):
chartduck-mcp --http # listens on 0.0.0.0:8000/mcp by defaultTools
Tool | Input | Returns |
|
|
|
|
|
|
Tool failures come back as MCP isError results with text code: message
(invalid_input, unauthorized, quota_exceeded, unreadable, rate_limited, ...);
full table in docs/mcp-contract.md.
Use as a CLI
chartduck extract figure.png -o figure.json
chartduck extract-pdf paper.pdf --pages 1-3 -o paper.json
chartduck healthAdd --mock to parse examples/sample_response.json without a service
(useful for wiring integrations).
SDK
from chartduck_client import ChartDuck
client = ChartDuck() # reads CHARTDUCK_API_URL / CHARTDUCK_TOKEN
result = client.extract_image_file("figure.png")
for panel in result["panels"]:
print(panel["chart_type"], panel.get("data"))Layout
chartduck_client.py # REST client (stdlib urllib; the only third-party dep is `mcp`)
mcp_server.py # MCP server (FastMCP, stdio or streamable HTTP)
cli.py # command line
docs/mcp-contract.md # tool contract, error codes, limits (English; 中文版 mcp-contract.zh.md)
examples/ # sample responseLicense
MIT. The hosted ChartDuck service, extraction engine, and evaluation corpus are not part of this repository.
Available Tools
2 toolsextract_chartA
Extract chart data from an image.
Provide exactly one of image_base64 (raw base64, no data: prefix) or image_url. Returns {panels: [{box, chart_type, axis, data, geometry, axis_labels}], meta}. When the extractor is not confident a panel returns data: null — never guessed.
Inputs: image_url, image_base64, include_geometry.
extract_chart_pdfA
Extract chart data from a PDF.
Provide exactly one of pdf_base64 or pdf_url. pages accepts "1-5", "3", or "1,3,7".
Returns {pages: [{page, panels: [...]}], meta}.
Inputs: pages, pdf_url, pdf_base64.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools are cleanly separated by input medium: extract_chart handles images and extract_chart_pdf handles PDFs. Their required parameter sets are mutually exclusive, so an agent can select the correct tool purely from the source file type.
Both names follow the same snake_case verb_noun convention, with extract_chart_pdf being a predictable specialization of extract_chart. There is no mixing of casing or verb styles.
Two tools are lean but directly correspond to the two supported input media, so the surface is appropriate for a focused chart-extraction server. It is slightly under what might be expected if batch extraction or auxiliary discovery operations were included.
The server covers the core extraction paths for both images and PDFs, including base64/URL inputs and page selection for PDFs. Minor gaps remain around batch processing or schema/format discovery, but the primary workflows are covered.
Maintenance
Related MCP Connectors
Hosted MCP server: convert PDFs to clean, LLM-ready Markdown with tables, formulas and OCR.
High-fidelity PDF to structured Markdown conversion and document field extraction.
Extract custom JSON schemas and Excel/CSV tables from PDFs, invoices, statements, and receipts.
Extract text, tables and metadata from every PDF linked in a dataset, CSV or Google Sheet.
Related MCP Servers
- AlicenseAqualityBmaintenancePDF extraction that actually works. The only extractor that audits every page. #2 on opendataloader-bench. 5 MCP tools for AI agents: metadata, convert, analyze, batch, structured extraction.7217 PyPI88MIT
- AlicenseAqualityDmaintenanceAn MCP server that extracts energy-usage charts from utility-bill PDFs, returning structured time-series data and annotated images.1AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceMCP server that extracts clean text, tables, and structured data from documents, images, code, and audio files, supporting 97 formats with OCR, transcription, and code intelligence.MIT
- AlicenseAqualityBmaintenanceModular OCR MCP server supporting Apple Vision, PaddleOCR, and PaddleOCR-VL backends. Enables text, layout, table, formula, and chart extraction from images via natural language.151MIT