Skip to main content

MCP服务:PDF 加密,仅提供 encrypt_pdf_file

Project description

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) 加密模式:basicrasterize
  • dpi/image_format/quality 光栅化参数(仅在 rasterize 模式)

示例

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

依赖

  • fastmcp
  • pikepdf
  • pymupdf (fitz)

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_encrypt-0.1.4.tar.gz (7.4 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_encrypt-0.1.4-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file pdf_mcp_encrypt-0.1.4.tar.gz.

File metadata

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

File hashes

Hashes for pdf_mcp_encrypt-0.1.4.tar.gz
Algorithm Hash digest
SHA256 4cc572156a9d45b3d86cb3b398c9c2e3ad37f8be97b817e9998bca4c7bbba5bb
MD5 7c91acfe76b798e50ee02d46294d7810
BLAKE2b-256 4e493c762ff83d9fadd745e718e09f46d8c08fafd9917270a6a241ad73f1c586

See more details on using hashes here.

File details

Details for the file pdf_mcp_encrypt-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for pdf_mcp_encrypt-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b753e44ad77f0938a3725c07aaf98760d53036c895650c4e4354de81c7ab7e28
MD5 37f1c0f4b910192e231f5d32847257fc
BLAKE2b-256 4622f78e5c2305f6a050b138c1842ddde6444a14364f3dde1ca80913aa3e8974

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