PDF Processor MCP Server

Integrations

  • Supports recognition and extraction of LaTeX mathematical equations from PDF documents

PDF处理器MCP服务器

一个模型上下文协议 (MCP) 服务器,用于处理 PDF 文档,并具备 LaTeX 公式提取等高级功能。该服务器使 Claude 能够从 PDF 文档中获取、处理和提取信息,包括 LaTeX 数学公式。

特征

  • 从 URL 获取 PDF
  • 从 PDF 中提取文本
  • LaTeX 公式识别和提取
  • 通过 MCP 与 Claude 集成

安装

标准安装

pip install -e .

安装 Claude Desktop/Claude Code

要将此 MCP 服务器与 Claude Desktop 或 Claude Code 一起使用:

  1. 如果尚未安装,请安装 MCP CLI 工具:
    pip install "mcp[cli]"
  2. 使用 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
  3. 使用 MCP Inspector 进行开发:
    mcp dev /path/to/pdf_tool_server.py --with-editable /path/to/mcp_pdf_processor
  4. 在 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>

用法

独立运行

python pdf_tool_server.py

环境变量

  • 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 处理器的完整示例工作流程:

# 1. Fetch a PDF without reading it /mcp PDF_TOOLS fetch_pdf url=https://arxiv.org/pdf/2505.05522 # This returns a hash_id, which you'll use in the next step # 2. Process the PDF with LaTeX extraction /mcp PDF_TOOLS process_pdf hash_id=<HASH_ID> extract_latex=true # This returns a filename for the processed output # 3. Read the processed content /mcp PDF_TOOLS read_processed_pdf filename=<FILENAME> # Now Claude can analyze the PDF content, including any LaTeX equations

执照

麻省理工学院

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

模型上下文协议服务器使 Claude 能够从 PDF 文档中获取、处理和提取信息,包括 LaTeX 数学方程式。

  1. 特征
    1. 安装
      1. 标准安装
      2. 安装 Claude Desktop/Claude Code
    2. 用法
      1. 独立运行
      2. 环境变量
      3. 与 Claude 一起使用
    3. 要求
      1. 使用示例
        1. 执照

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that allows Claude to create flashcards for Rember, helping users study and remember information through spaced repetition reviews.
            Last updated -
            88
            16
            TypeScript
            MIT License
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that integrates Claude with Blender, enabling users to analyze and interact with IFC (Industry Foundation Classes) building models through natural language commands.
            Last updated -
            5
            Python
            MIT License
            • Apple
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that allows Claude Desktop to perform document operations on Microsoft Word, Excel, and PDF files including creation, editing, and format conversion.
            Last updated -
            9
            Python
            • Apple
          • -
            security
            -
            license
            -
            quality
            A Model Context Protocol (MCP) server that converts LaTeX mathematical expressions to MathML format.
            Last updated -
            3
            JavaScript
            MIT License

          View all related MCP servers

          ID: nvzs48ghlz