Skip to main content

MCP服务:PDF拆分,仅提供 split_pdf_file

Project description

PDF 拆分 MCP 服务

仅提供一个工具:split_pdf_file,用于按页面或页面范围拆分 PDF。

运行

uv run pdf-mcp-server

或:

$env:PYTHONPATH="src"; python -c "import pdf_mcp.server; pdf_mcp.server.main()"

工具:split_pdf_file

  • input_path (str) 输入 PDF 文件路径
  • output_dir (str) 输出目录路径
  • split_mode (str) 拆分模式:pagesranges
  • ranges (list[str], 可选) 页面范围,如 "1-3", "5", "7-10"
  • prefix (str, 可选) 输出文件名前缀

示例:

  • 每页一个文件:split_mode="pages"
  • 指定范围每页一个文件:split_mode="pages", ranges=["1-3", "7-9"]
  • 按范围生成多个文件:split_mode="ranges", ranges=["1-5", "10-15"]

依赖

  • fastmcp
  • pikepdf

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdf_mcp_split-0.1.2.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdf_mcp_split-0.1.2-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file pdf_mcp_split-0.1.2.tar.gz.

File metadata

  • Download URL: pdf_mcp_split-0.1.2.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for pdf_mcp_split-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4a4f2d712fae06a628bc39bdbb242bb0b9f52285941b0960a8aed37a96a9ce18
MD5 89b521cafd043fa608130fd8b8dce61f
BLAKE2b-256 8c68d02f11e4cdb91c0b0429ac1cd63224725f98da815e81fc97daedd57b9649

See more details on using hashes here.

File details

Details for the file pdf_mcp_split-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pdf_mcp_split-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for pdf_mcp_split-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0f806804219a13fe36bf1fc8d4badac643d79e9afb54758860e210c4c56cbc33
MD5 d2be1a588eede7c52afcc7ba6b99716d
BLAKE2b-256 e3fdadca44e3df0d5a2dc50d81db27688504a43d711c494d3a9f22c0d200c177

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page