Skip to main content

PDF 加密 MCP 服务

仅提供一个工具:encrypt_pdf_file,用于为 PDF 设置密码与权限,或进行光栅化加密。

运行

uv run pdf-mcp-server

或:

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

工具:encrypt_pdf_file

  • input_path (str) 输入 PDF 文件路径
  • output_path (str) 输出 PDF 文件路径
  • user_password (str) 用户密码
  • owner_password (str, 可选) 所有者密码
  • allow_printing/modifying/copying/annotating/fillingForms (bool) 权限设置
  • mode (str) 加密模式:basic 或 rasterize
  • dpi/image_format/quality 光栅化参数(仅在 rasterize 模式)

示例

为 report.pdf 设置打开密码 123456,允许打印但禁止复制

依赖

  • fastmcp
  • pikepdf
  • pymupdf (fitz)

License

MIT

Metadata

Release files for pdf-mcp-encrypt 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdf-mcp-encrypt 0.1.4
File Size Uploaded
pdf_mcp_encrypt-0.1.4.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pdf-mcp-encrypt 0.1.4
File Interpreter ABI Platform
pdf_mcp_encrypt-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 16.4 kB

Release files / pdf_mcp_encrypt-0.1.4.tar.gz

Download URL pdf_mcp_encrypt-0.1.4.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4cc572156a9d45b3d86cb3b398c9c2e3ad37f8be97b817e9998bca4c7bbba5bb
BLAKE2b-256 checksum
How to use checksums
4e493c762ff83d9fadd745e718e09f46d8c08fafd9917270a6a241ad73f1c586
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / pdf_mcp_encrypt-0.1.4-py3-none-any.whl

Download URL pdf_mcp_encrypt-0.1.4-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b753e44ad77f0938a3725c07aaf98760d53036c895650c4e4354de81c7ab7e28
BLAKE2b-256 checksum
How to use checksums
4622f78e5c2305f6a050b138c1842ddde6444a14364f3dde1ca80913aa3e8974
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page