# pdf-mcp [Health: Active]

**Category:** 🔎 Search & Data Extraction  
**Repository:** https://github.com/wesseltl/pdf-mcp  
**GitHub Stars:** 1  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/pdf-mcp-2

## Description
Extract text and tables from PDFs for an agent: invoices, reports, statements.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/wesseltl/pdf-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
python -m pip install "pdf-agent-mcp @ https://github.com/wesseltl/pdf-mcp/releases/download/v0.4.0/pdf_agent_mcp-0.4.0-py3-none-any.whl"
```

2. Start the server:

```sh
pdf-mcp-app
```

3. Install:

```sh
python -m pip install "pdf-agent-mcp[cloud] @ https://github.com/wesseltl/pdf-mcp/releases/download/v0.4.0/pdf_agent_mcp-0.4.0-py3-none-any.whl"
```

4. Install:

```sh
python -m pip install "pdf-agent-mcp[mcp] @ https://github.com/wesseltl/pdf-mcp/releases/download/v0.4.0/pdf_agent_mcp-0.4.0-py3-none-any.whl"
```

## Documentation

## What pdf-mcp MCP server does

The pdf-mcp MCP server connects an MCP client to local PDF and Word documents. Agents can inspect page counts, read page text, extract tables, convert individual tables to CSV, and export document tables as `.xlsx`, `.csv`, or `.json` files. Word support includes paragraph extraction and table extraction from `.docx` files.

For recurring document workflows, the server also provides profile-based extraction. Built-in reference profiles include `lab-coa-v1` and `invoice-lines-v1`. A profile can define expected fields and return canonical records, source-cell evidence, validation issues, and one of three decisions: `accepted`, `needs_review`, or `rejected`. Profile exports can create workbooks containing Review, Data, and Evidence sheets.

## How it works

The local `pdf-agent-mcp` command runs through standard input/output and keeps documents on the local machine. Install the package, register the command in an MCP client, and let the agent pass a document path to the relevant tool. Extraction values come from document parsers rather than generated model output.

Raw table extraction returns rows, source coordinates, and basic parser warnings. Multi-page tables can be merged when the relevant option is enabled. Profile extraction adds field mapping and validation; its decision describes whether the configured checks passed, not whether the original document is factually correct. Applications should send `needs_review` and `rejected` results to a person instead of treating them as trusted business data.

The optional hosted bridge uses a separately supplied endpoint and API key. It uploads the selected document for one authenticated operation, deletes temporary uploads after completion, and is intended for redacted or non-sensitive files. The free beta exposes raw text, table, and CSV extraction and allows 25 operations per calendar month.

## Setup and configuration

Install the local package with the MCP extra from the v0.4.0 release, then configure an MCP client to start `pdf-agent-mcp` with no required environment variables. Claude Desktop, Cursor, VS Code with Copilot Agent mode, Windsurf, and Cline are documented as clients. Cursor can hot-reload its configuration; other clients may require their documented restart or settings flow.

Set `PDF_MCP_ALLOWED_DIR` when the agent should be restricted to one directory. This provides a file-access boundary for the local server. The hosted bridge instead requires `PDF_MCP_CLOUD_URL` and `PDF_MCP_CLOUD_API_KEY` supplied with beta access.

## Tools and capabilities

The pdf-mcp MCP server exposes these documented operations:

- `list_extraction_profiles()` lists profile IDs, versions, fields, and hashes.
- `extract_with_profile(path, profile)` returns records, evidence, issues, and a decision.
- `export_with_profile(input_path, profile, output_path)` writes checked XLSX, CSV, or JSON output.
- `page_count(path)` reports the number of PDF pages.
- `extract_text(path, page)` reads one page or the complete PDF.
- `extract_tables(path, page, merge_multipage)` extracts rows and parser assessments.
- `table_to_csv(path, page, index)` converts one PDF table to CSV text.
- `extract_docx_text(path)` reads DOCX paragraphs.
- `extract_docx_tables(path)` reads DOCX table cells and reports merged-cell warnings.
- `docx_table_to_csv(path, index)` converts one Word table to CSV text.
- `export_document_tables(input_path, output_path, merge_multipage)` exports PDF or DOCX tables.

## Limitations and notes

PDF extraction supports born-digital documents. Scanned or image-only PDFs need OCR, which is not included. Basic structure checks and an `accepted` result do not guarantee accurate source values, so important outputs still require review.

The local edition is MIT licensed, network-free, and telemetry-free. The hosted beta has different data-handling characteristics because selected documents leave the local machine. The browser application is another local option for direct table conversion, but it does not require an MCP client and is separate from agent setup.

_Full upstream README: https://allmcps.com/mcp/pdf-mcp-2/readme_

