Skip to main content
Glama

PDF 工具 MCP

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

特征

本地 PDF 操作

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

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

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

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

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

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

远程 PDF 操作

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

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

安装

# 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 用于文件类型检测

执照

请参阅许可证

-
security - not tested
-
license - not tested
-
quality - not tested

Related MCP Servers

View all related MCP servers

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/danielkennedy1/pdf-tools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server