Pdf Chart Parser
БесплатноНе проверенAn MCP server that extracts energy-usage charts from utility-bill PDFs, returning structured time-series data and annotated images.
Описание
An MCP server that extracts energy-usage charts from utility-bill PDFs, returning structured time-series data and annotated images.
README
An MCP server and Python library that extracts energy-usage charts from utility-bill PDFs. It locates the chart, calibrates the axes from the PDF's text layer, and returns structured time-series data alongside an annotated PNG for visual verification — entirely deterministic, no LLM required.
Features
- Bar, line, and hybrid (bar + line, dual y-axis) chart types
- Vector-first extraction via PyMuPDF
get_drawings()/get_text("dict"); OpenCV raster fallback for scanned PDFs - Scanned-PDF support via an OCRmyPDF text-layer step (optional
[ocr]extra): image-only pages get a searchable text layer so they flow through the same high-accuracy text-layer calibration as digital PDFs - Full page text returned as LLM-friendly Markdown (via
pymupdf4llm) - MCP tool (
extract_usage_chart) compatible with Claude and other MCP-aware LLMs - Supports
stdiotransport (local) andstreamable-http(containerized deployment) - Returns structured JSON + annotated PNG; numeric data is always text content
Installation
Prerequisites
- Python 3.12+
- uv package manager
- Tesseract OCR (required only for the
[raster]extra):apt-get install tesseract-ocrorbrew install tesseract - OCRmyPDF system tools (required only for the
[ocr]extra, which adds a searchable text layer to scanned PDFs):apt-get install ghostscript qpdf unpaper pngquant tesseract-ocrorbrew install ocrmypdf
Quickstart
# Install (vector path only)
uv sync
# Install with raster fallback
uv sync --extra raster
# Install with the OCR text-layer step for scanned PDFs
uv sync --extra ocr
# Install everything
uv sync --extra raster --extra ocr
# Run the CLI
uv run pdf-chart-parser --help
# Run the MCP server (stdio)
uv run python -m pdf_chart_parser.server
Usage
Python library
from pdf_chart_parser.pipeline import extract_usage_chart
result = extract_usage_chart(pdf_path="bill.pdf", return_annotated_image=True)
print(result["chart_type"]) # "bar" | "line" | "hybrid"
for series in result["series"]:
print(series["label"], series["points"])
CLI
uv run pdf-chart-parser extract bill.pdf --output result.json
MCP server
Add to your MCP config (~/.claude/claude_desktop_config.json or similar):
{
"mcpServers": {
"pdf-chart-parser": {
"command": "uv",
"args": ["run", "python", "-m", "pdf_chart_parser.server"],
"cwd": "/path/to/pdf-chart-parser"
}
}
}
The server exposes the extract_usage_chart tool. It returns:
- Page text — full page as Markdown
- Chart reading — structured JSON (series, axes, confidence, warnings)
- Annotated PNG — cropped chart with calibrated gridlines and data-point markers
Docker / ECR deployment
# Build and run locally
./scripts/run_local_server.sh
# Build and push to ECR (set ECR_REPO first)
export ECR_REPO=<account>.dkr.ecr.<region>.amazonaws.com/pdf-chart-parser
./scripts/build_and_push.sh
The container starts the server on streamable-http at port 8000. A local PDF directory can be bind-mounted to /data for ad-hoc testing (see docker/docker-compose.yml).
Manual testing (no LLM)
# In-process test against fixtures
uv run python scripts/run_manual_tests.py
# Against a running HTTP server
uv run python scripts/run_manual_tests.py --http http://localhost:8000
Output is written to manual_test_output/.
License
AGPL-3.0-or-later. This license is required because the project links against PyMuPDF, which is itself AGPL-3.0 licensed.
Установка Pdf Chart Parser
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/haoxinm/pdf-chart-parserFAQ
Pdf Chart Parser MCP бесплатный?
Да, Pdf Chart Parser MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Pdf Chart Parser?
Нет, Pdf Chart Parser работает без API-ключей и переменных окружения.
Pdf Chart Parser — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Pdf Chart Parser в Claude Desktop, Claude Code или Cursor?
Открой Pdf Chart Parser на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Unyly Deploy
Deploy sites and MCP servers to Unyly straight from your AI agent
автор: UnylyAmap Maps Mcp Server
MCP server for using the AMap Maps API
автор: duxiaohuiPayMCP
Lightweight payments layer for MCP servers: turn tools into paid endpoints with a two-line decorator. [PyPI](https://pypi.org/project/paymcp/) · [npm](https://w
автор: blustAITemplate MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectSupabase
Database, auth and storage
автор: SupabaseEverything
Reference / test server with prompts, resources, and tools.
Git
Tools to read, search, and manipulate Git repositories.
Compare Pdf Chart Parser with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
