PDF Tools MCP 是一个轻量级本地 PDF 工具服务器,通过 MCP 暴露常用 PDF 操作,适合 Claude Code、Codex 以及其他支持 MCP 的 AI 编程助手调用。
它专注于最常见、最稳定的 PDF 页级操作,不做厚重 GUI,也不绑定某一个 AI 客户端。
pdf_inspect: 查看页数、加密状态、元数据、页面尺寸和旋转角度pdf_merge: 合并多个 PDFpdf_extract_pages: 提取指定页面pdf_delete_pages: 删除指定页面pdf_rotate_pages: 旋转页面pdf_reorder_pages: 重排页面pdf_split: 按页码范围拆分 PDFpdf_encrypt: 生成加密 PDF
所有页码参数都使用 1-based 页码,也就是第 1 页传 1。
打开网页体验。这个仓库也包含一个 Cloudflare Pages 版网页 demo,代码在 web/。
- PDF 预览和处理全部在浏览器本地完成
- 后端只负责把自然语言指令解析成 JSON 操作
- 匿名用户每天最多 10 次免费 AI 解析
- 部署前只需要在 Cloudflare 配置 Workers AI 和 KV binding
git clone https://github.com/dabidabi/pdf-tools-mcp.git ~/.pdf-tools-mcp && claude mcp add --transport stdio --scope user pdf-tools-mcp -- python3 "$HOME/.pdf-tools-mcp/plugins/pdf-tools-mcp/scripts/run_mcp.py"codex plugin marketplace add dabidabi/pdf-tools-mcp --ref main && codex plugin add pdf-tools-mcp@pdf-tools-mcp-marketplacecd plugins/pdf-tools-mcp && printf '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}\n' | python3 scripts/run_mcp.py.agents/plugins/marketplace.json
plugins/pdf-tools-mcp/
PDF Tools MCP is a lightweight local PDF tool server that exposes common PDF operations through MCP for Claude Code, Codex, and other MCP-compatible AI coding agents.
It focuses on common, stable page-level PDF operations without a heavy GUI and without being tied to one AI client.
pdf_inspect: inspect page count, encryption status, metadata, page sizes, and rotationspdf_merge: merge multiple PDFspdf_extract_pages: extract selected pagespdf_delete_pages: delete selected pagespdf_rotate_pages: rotate pagespdf_reorder_pages: reorder pagespdf_split: split a PDF by page rangespdf_encrypt: create an encrypted PDF
All page arguments are 1-based, so page 1 is passed as 1.
Open the web demo. This repo also includes a Cloudflare Pages web demo in web/.
- PDF preview and edits run locally in the browser
- The backend only parses natural language commands into JSON operations
- Anonymous visitors get 10 free AI parses per day
- Deployment only needs Cloudflare Workers AI and KV bindings
git clone https://github.com/dabidabi/pdf-tools-mcp.git ~/.pdf-tools-mcp && claude mcp add --transport stdio --scope user pdf-tools-mcp -- python3 "$HOME/.pdf-tools-mcp/plugins/pdf-tools-mcp/scripts/run_mcp.py"codex plugin marketplace add dabidabi/pdf-tools-mcp --ref main && codex plugin add pdf-tools-mcp@pdf-tools-mcp-marketplacecd plugins/pdf-tools-mcp && printf '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}\n' | python3 scripts/run_mcp.py.agents/plugins/marketplace.json
plugins/pdf-tools-mcp/