pdf-agent-toolkit-mcp
PDF Agent Toolkit & MCP Server(灵感来自 ihatepdf.cv)
一个全面的、隐私优先的 PDF 处理套件,以及面向 AI 代理(Claude Desktop、Cursor、Windsurf、LangChain、Claude Code)的 Model Context Protocol (MCP) 服务器。
核心设计理念
零云端上传:所有 PDF 处理(压缩、页面重排、旋转、遮盖和文本提取)均在纯 TypeScript 和 WebAssembly 中 100% 本地执行。
代理 Token 优化:避免在提示词中直接转储原始 PDF base64,从而消除上下文膨胀;按需返回结构化大纲和页面片段。
通用兼容性:开箱即用,支持
stdioJSON-RPC 2.0。
Related MCP server: filewash
🛠️ 可用的 MCP 工具
工具名称 | 类别 | 描述 | 代理优化 |
| 优化 | 通过流碎片整理和 DPI 预设( | 将下游 OCR/视觉 Token 权重降低最多 70%。 |
| 智能 | 提取文档目录、大纲、字数统计和干净的 Markdown 文本。 | 与原始流转储相比,节省约 90% 的上下文 Token。 |
| 安全 | 检测 SSN、电子邮件、信用卡、Aadhaar 号码和自定义关键词,并盖上黑色遮盖框。 | 在将文档发送给外部 LLM 之前确保符合 GDPR/HIPAA 要求。 |
| 结构 | 复合工具:在一次原子操作中重排、删除、旋转(90/180/270°)并添加页码。 | 避免多轮往返。 |
| 结构 | 提取特定页面范围(例如 | 允许代理检查特定章节。 |
| 结构 | 将多个输入 PDF 合并为单个文档。 | 快速的多文件文档汇编。 |
| 安全 | 以自定义旋转和不透明度盖上视觉文本水印(例如 | 视觉状态盖章。 |
| 创建 | 将干净的 Markdown/文本格式化为带风格化页眉横幅的 A4 PDF。 | 轻量级文档生成,无需无头浏览器的臃肿。 |
| 表单 | 检查 AcroForm 字段并填写表单数据。 | 自动化发票、税务和合同处理。 |
🚀 面向代理的快速入门配置
1. Cursor IDE(.cursor/mcp.json)
{
"mcpServers": {
"pdf-agent-toolkit": {
"command": "npx",
"args": ["-y", "pdf-agent-toolkit-mcp@latest"]
}
}
}2. Claude Desktop(claude_desktop_config.json)
{
"mcpServers": {
"pdf-tools": {
"command": "npx",
"args": ["-y", "pdf-agent-toolkit-mcp"]
}
}
}3. LangChain 和 LangGraph(Python)
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_google_genai import ChatGoogleGenerativeAI
async def main():
async with MultiServerMCPClient({
"pdf_tools": {
"command": "npx",
"args": ["-y", "pdf-agent-toolkit-mcp"],
"transport": "stdio",
}
}) as client:
tools = client.get_tools()
model = ChatGoogleGenerativeAI(model="gemini-2.5-flash")
agent = create_react_agent(model, tools)
response = await agent.ainvoke({
"messages": [("user", "Compress ./financials.pdf and blackout sensitive SSNs")]
})
print(response)💻 在本地运行服务器
# Run MCP server on stdio
npm run mcp
# Start the interactive visual testing studio and playground
npm run devThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and users to process documents through natural language, supporting PDF operations like text extraction, redaction, splitting, form filling, annotations, and content search.20561MIT
- AlicenseNot gradedqualityBmaintenancePrivacy-first file tools for AI agents, enabling operations like PDF merge/split, image compression/convert, metadata stripping, and background removal without storing files.46MIT
- FlicenseNot gradedqualityCmaintenanceA local PDF manipulation server for AI agents that provides tools for merging, splitting, extracting info, and converting images to PDF, all without uploading files.
- AlicenseAqualityAmaintenanceEnterprise-grade PDF engine for AI agents. Pure TypeScript, zero-dependency, and local-first. Allows agents to generate ISO-compliant PDF/A documents, handle digital signatures (PKCS#7), and process high-performance layouts (800+ pages in seconds).288342MIT
Related MCP Connectors
Turn any PDF into structured JSON via AI + OCR: invoices, bank statements, contracts.
JSON/YAML, regex, diff, JWT, SQL dialects — the keyless millisecond ops an agent needs mid-task.
Generate PDFs from templates via AI chat. Works with Claude, ChatGPT, Cursor, and any MCP client.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/abhishektangudu/pdf-toolkit-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server