Skip to main content
Glama

PDF 工具 MCP

一套使用模型上下文协议 (MCP) 框架构建的全面的 PDF 操作工具。

特征

本地 PDF 操作

  • 显示:将 PDF 页面渲染为图像

  • 合并:将多个页面合并为一个长页面

  • 元数据:提取文档元数据

  • 文本:提取文本块和详细的文本信息

  • 片段:从 PDF 页面创建自由格式或全宽片段

  • Fuse :将多个文档的页面合并为一个文档

远程 PDF 操作

  • 显示:将远程 PDF 页面渲染为图像

  • 下载:从 URL 获取 PDF 到本地存储

Related MCP server: pdf-mcp

安装

# Clone the repository
git clone https://github.com/yourusername/pdf-tools-mcp.git
cd pdf-tools-mcp

# Install dependencies
uv pip install -e .

用法

启动 MCP 服务器:

python -m src.main

服务器通过MCP协议提供PDF操作端点。

发展

  • 需要 Python 3.12+

  • 使用 MCP 框架进行工具注册

  • 出于安全考虑,PDF 文档使用 UUID4 文件名存储

# Update dependencies
uv pip install -e . --upgrade

# Commit changes (uses conventional commit format)
cz commit

依赖项

  • MCP框架

  • PyMuPDF

  • aiohttp/aiofiles 用于异步操作

  • python-magic-bin 用于文件类型检测

执照

请参阅许可证。

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that provides tools for reading, writing, and manipulating PDF files, including text extraction, metadata retrieval, and merging or splitting documents. It also enables users to create PDFs from plain text and convert specific pages or entire documents into images.
    89 npm
    ISC
  • A
    license
    A
    quality
    B
    maintenance
    A comprehensive MCP server with 37 tools for PDF operations including reading, searching, creating, merging, splitting, watermarking, form filling, and more, built on open-source libraries.
    37
    70 npm
    2
    MIT