PDF处理器MCP服务器
一个模型上下文协议 (MCP) 服务器,用于处理 PDF 文档,并具备 LaTeX 公式提取等高级功能。该服务器使 Claude 能够从 PDF 文档中获取、处理和提取信息,包括 LaTeX 数学公式。
特征
从 URL 获取 PDF
从 PDF 中提取文本
LaTeX 公式识别和提取
通过 MCP 与 Claude 集成
安装
标准安装
安装 Claude Desktop/Claude Code
要将此 MCP 服务器与 Claude Desktop 或 Claude Code 一起使用:
如果尚未安装,请安装 MCP CLI 工具:
pip install "mcp[cli]"使用 MCP CLI 工具安装服务器:
mcp install /path/to/pdf_tool_server.py --with-editable /path/to/mcp_pdf_processor例如,如果您已将此存储库克隆到
~/mcp_pdf_processor:mcp install ~/mcp_pdf_processor/pdf_tool_server.py --with-editable ~/mcp_pdf_processor使用 MCP Inspector 进行开发:
mcp dev /path/to/pdf_tool_server.py --with-editable /path/to/mcp_pdf_processor在 Claude Desktop 中,您现在可以通过以下命令在对话中使用 PDF_TOOLS 服务器:
/mcp PDF_TOOLS fetch_pdf url=https://example.com/document.pdf /mcp PDF_TOOLS process_pdf hash_id=<HASH_ID> extract_latex=true /mcp PDF_TOOLS read_processed_pdf filename=<FILENAME>
用法
独立运行
环境变量
OUTPUT_DIR:存储已处理 PDF 的目录(默认值:llm_output)PYTHONPATH:设置为包含 mcp_pdf_processor 包的目录
与 Claude 一起使用
当服务器注册完成后,你可以要求 Claude 执行以下操作:
“获取并分析 [URL] 处的 PDF”
“从 [URL] 处的 PDF 中提取 LaTeX 方程式”
“总结 [URL] 处的 PDF 内容”
要求
该服务器需要以下主要依赖项:
Python 3.9 或更高版本
pymupdf:PDF处理和文本提取mcp:模型上下文协议支持pydantic:数据验证和序列化aiohttp:异步 HTTP 客户端/服务器torch:用于 LaTeX 方程提取(可选)pix2tex:用于 LaTeX 方程式识别(可选)
请参阅pyproject.toml以获取依赖项和版本要求的完整列表。
使用示例
以下是使用 Claude Desktop 的 PDF 处理器的完整示例工作流程:
执照
麻省理工学院
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
模型上下文协议服务器使 Claude 能够从 PDF 文档中获取、处理和提取信息,包括 LaTeX 数学方程式。
Related MCP Servers
- Asecurity-licenseAqualityModel Context Protocol server that enables Claude Desktop (or any MCP client) to fetch web content and process images appropriately.Last updated -1106MIT License
- Asecurity-licenseAqualityA Model Context Protocol server that enables Claude to perform web research by integrating Google search, extracting webpage content, and capturing screenshots.Last updated -315,70416MIT License
- Asecurity-licenseAqualityA Model Context Protocol server that enables Claude to perform advanced web research with intelligent search queuing, enhanced content extraction, and deep research capabilities.Last updated -391MIT License
- Asecurity-licenseAqualityA Model Context Protocol (MCP) server that enables Claude or other LLMs to fetch content from URLs, supporting HTML, JSON, text, and images with configurable request parameters.Last updated -32MIT License