
Pdf Mcp
io.github.wesseltl由 GitHub 帳號 wesseltl 發布v0.1.2更新於 Oct 24, 2026
Extract text and tables from PDFs for an agent: invoices, reports, statements.
概覽
從本機 PDF 與 Word 文件中擷取文字與表格,並匯出成 Excel、CSV 或 JSON 供助理使用。
- 可以做什麼
- 此伺服器為助理提供讀取本機 PDF 與 DOCX 檔案的工具:頁數、逐頁文字、附來源座標的原始表格列,以及單一表格的 CSV 輸出。它能把整份文件匯出為 .xlsx、.csv 或 .json,並提供依設定檔(profile)檢查的擷取:將表格對應到具名欄位、保留儲存格層級證據,並回傳 accepted、needs_review 或 rejected 判定。儲存格的值來自文件解析器,而非模型生成。
- 適用情境
- 當助理需要從同一台機器上的原生數位 PDF 與 Word 檔案取出表格或文字時適用,例如發票、報告或對帳單,並將其轉成試算表或結構化紀錄。也適合需要版本化設定檔與明確複核判定的重複性文件流程。
- 執行需求
- 以本機 stdio 程序執行,從 PyPI 套件 pdf-agent-mcp 安裝,因此需要 Python;README 另說明了適用於 Windows、Apple 晶片 macOS 與 Linux 的打包瀏覽器應用程式。本機版未宣告需要帳號或 API 金鑰。選用的託管測試版使用環境變數 PDF_MCP_CLOUD_URL 與 PDF_MCP_CLOUD_API_KEY。可用 PDF_MCP_ALLOWED_DIR 限制檔案存取範圍。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Pdf Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
pdf-mcp
Turn tables in PDF and Word documents into Excel, CSV, or JSON. Use the simple browser app with no agent setup, or connect the same deterministic extraction tools to an AI agent through MCP.
The browser app is for direct table conversion. It previews the extracted rows, highlights basic
structure warnings, and keeps files on your computer. Advanced profile checking can additionally
validate named fields, preserve source evidence, and return accepted, needs_review, or
rejected for a recurring document workflow. Cell values come from document parsers, not generated
model output.
Need a profile and measured baseline for real documents? See the
Document Reliability Pilot.
Agents can use the structured offer at
offers/document-to-excel-pilot.json.
Website: simple conversion, local tools, and the free hosted agent beta.
Current limitation: PDF extraction supports born-digital documents. Scanned or image-only PDFs require OCR, which is not included. An
accepteddecision means the configured checks passed; it does not prove that the source document itself is correct.
Simple browser app
This is the easiest way to use pdf-mcp. It requires no Python, terminal, MCP client, or agent configuration after downloading the app.
- Open the v0.4.0 release.
- Download the
pdf-mcp-appZIP for 64-bit Windows, an Apple silicon Mac, or 64-bit Linux. - Unzip it and open
pdf-mcp-app. - Your browser opens. Drop in a PDF or Word document, choose Excel, CSV, or JSON, and select Convert document.
Use Stop app in the browser when finished. The app listens only on your computer. Temporary document copies are deleted immediately after conversion, and prepared downloads expire after 30 minutes or when the app stops. The community beta downloads are currently unsigned, so the operating system may ask you to confirm that you want to open them.
If Python is already installed, the same interface can be started with:
The simple app performs raw table extraction. “No basic structure problems detected” is not an accuracy guarantee. Check important values before using them, or use a profile-checked pilot for a recurring business workflow.
For agents: local or free hosted beta
The normal pdf-agent-mcp command remains local, MIT licensed, network-free, and telemetry-free.
For people who explicitly want a measured agent beta, pdf-agent-cloud-mcp uploads only the selected
document for one authenticated operation.
Profile checking and evaluation currently run in the local edition or as part of the paid pilot. The free hosted beta currently exposes raw text, table, and CSV extraction only.
The free hosted beta includes 25 operations per calendar month. Temporary uploads are deleted when each request completes. Usage metrics exclude filenames, document contents, extracted text, and table cells. Applications are open while endpoint deployment is completed. Apply without attaching a document; invitations begin only after the endpoint is verified:
Apply for free agent beta access
After acceptance, install and configure the separate bridge with the endpoint and key you receive:
Use only redacted or non-sensitive files. See the free beta terms,
privacy notice, and machine-readable
beta/free-hosted-beta.json.
What it turns a document into
A PDF or Word table like this:
can be checked against invoice-lines-v1 and returned as canonical records with an explicit decision:
The tools it gives an agent
MCP setup for Claude Desktop
The fastest way to use this is with an MCP client like Claude Desktop. Three steps:
1. Install it
2. Add it to your client's config
Claude Desktop's config lives here:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the server:
3. Restart Claude Desktop. You'll see a tools icon appear, meaning the server is connected.
That's it. Now ask about any .pdf or .docx on your machine:
The agent must route needs_review and rejected results to a person instead of treating them as
trusted business data.
Restricting file access: to stop the agent reading anything outside one folder, set
PDF_MCP_ALLOWED_DIR. See SECURITY.md.
Use it with other MCP clients
The same server works in any MCP client, only the config differs. Use pdf-agent-mcp as the command.
Cursor — ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project). Same shape as Claude
Desktop, and it hot-reloads (no restart):
VS Code / GitHub Copilot — .vscode/mcp.json. Note the different key (servers, not mcpServers)
and the required type. Tools only run in Copilot Agent mode:
Windsurf — ~/.codeium/windsurf/mcp_config.json (create it if missing). Same shape as Claude
Desktop:
Cline — add it from the extension's MCP settings panel in VS Code (command: pdf-agent-mcp).
Profile-checked extraction
The package includes lab-coa-v1 and invoice-lines-v1 as reference profiles:
Exit status is 0 for accepted, 2 for needs_review, and 3 for rejected. XLSX output contains
Review, Data, and Evidence sheets. Formula-like document values are escaped in spreadsheet
exports rather than executed.
Profiles are ordinary, versioned JSON contracts. See the profile format and machine-readable schema. Results follow the versioned extraction result schema.
Measure a profile
Measure exact field and record accuracy against local, customer-approved expected rows:
The report contains document hashes and aggregate metrics, not document or expected cell values. The included sample is synthetic; build a representative private set before claiming accuracy for a real document family. See the evaluation guide.
For a larger demonstration, the repository includes an 18-document fictional workflow simulation. It exercises accepted, review, and rejected outcomes across PDF and DOCX variants. It is regression coverage authored by the product developer, not customer validation or evidence of demand.
Raw export
For a direct document-to-file workflow, use the CLI:
Raw Excel exports include a Review sheet with table locations and parser warnings. Use profile-based
export when a workflow needs canonical fields and an acceptance decision.
Understanding the output
extract_tables returns raw rows and lightweight parser diagnostics:
looks_clean—trueonly means these basic diagnostics found no red flag. It is not an accuracy score or acceptance decision.column_count— the number of columns, if every row agrees on it (nullif rows disagree).empty_ratio— fraction of blank cells. A high value often means a bad extraction.has_merged_cells— Word-only flag for tables with merged cells. Word exposes those cells as repeated values, so the table is flagged for review.warnings— plain-language flags, e.g. "ragged: rows have [2, 3, 4] columns (grid may be misdetected)" or "66% of cells are empty". PDF tables are genuinely hard (nested/merged cells, multi-page), so instead of pretending, the tool tells you when a result is suspect.
Also usable from plain Python
Tests
License
MIT
來源:README.md,提交 fb9ae62
工具
0版本歷史
1- v0.1.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分