DP

danielkennedy1/pdf-tools-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

32 stars 13 forks 质量 49 趋势 11MIT

danielkennedy1/pdf-tools-mcp 是从 https://github.com/danielkennedy1/pdf-tools-mcp. 导入的 MCP 服务器候选

概览

danielkennedy1/pdf-tools-mcp 是从 https://github.com/danielkennedy1/pdf-tools-mcp. 导入的 MCP 服务器候选

概述(AI 翻译)

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

特色

地方防卫队行动

  • 显示:将PDF页面渲染为图片
  • 合并:将多个页面合并成一个长页面
  • 元数据:提取文档元数据
  • 文本:提取文本块和详细文本信息
  • 片段:从PDF页面创建自由形式或全尺寸摘要
  • Fuse:将多个文档的页面合并为单一文档

远程PDF操作

  • 显示:将远程PDF页面渲染为图像
  • 下载:从URL获取PDF到本地存储

安装

通过Smithery安装

通过Smithery自动安装Claude Desktop的PDF工具:

手动安装

用途

启动MCP服务器:

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

发展

  • Python 3.12+ 要求
  • 使用MCP框架进行工具注册
  • PDF 文档以 UUID4 文件名存储以保证安全

依赖关系

  • MCP框架
  • PyMuPDF
  • aioHTTP/aiofiles 用于异步操作
  • 用于文件类型检测的 python-magic-bin

许可证

麻省理工学院。参见执照。

本页由 AI 翻译,技术细节请以原文为准。

README

PDF Tools MCP

A comprehensive set of PDF manipulation tools built with the Model Context Protocol (MCP) framework.

Features

Local PDF Operations

  • Display: Render PDF pages as images
  • Merge: Combine multiple pages into a single long page
  • Metadata: Extract document metadata
  • Text: Extract text blocks and detailed text information
  • Snippets: Create freeform or full-width snippets from PDF pages
  • Fuse: Combine pages from multiple documents into a single document

Remote PDF Operations

  • Display: Render remote PDF pages as images
  • Download: Fetch PDFs from URLs to local storage

Installation

Installing via Smithery

To install PDF Tools for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @danielkennedy1/pdf-tools-mcp --client claude

Manual Installation

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

# Install dependencies
uv pip install -e .

Usage

Start the MCP server:

python -m src.main

The server provides PDF manipulation endpoints through the MCP protocol.

Development

  • Python 3.12+ required
  • Uses the MCP framework for tool registration
  • PDF documents are stored with UUID4 filenames for security
# Update dependencies
uv pip install -e . --upgrade

# Commit changes (uses conventional commit format)
cz commit

Dependencies

  • MCP Framework
  • PyMuPDF
  • aiohttp/aiofiles for async operations
  • python-magic-bin for file type detection

License

MIT. See LICENSE.

在 GitHub 查看完整 README

安装

npx -y @smithery/cli install @danielkennedy1/pdf-tools-mcp --client claude
新手?先看 mcpskill.org 教程 →