MCP 服务器

pdf-tools

com.pdfia/pdf-tools
开发者工具 公开且可连接 MCP 2026-07-28

此 MCP 可以做什么

Provides tools to merge, split, rotate, watermark, flatten, inspect, and modify PDF files.

add_page_numbers
Stamp page numbers onto every page of a PDF. Returns base64.
输入模式
{'type': 'object', 'required': ['file'], 'properties': {'file': {'type': 'string', 'description': 'The PDF file, base64-encoded (max 10 MB)'}, 'size': {'type': 'number', 'description': 'Font size 6–24, default 12'}, 'start': {'type': 'number', 'description': 'First number, default 1'}, 'format': {'enum': ['n', 'page-n', 'n-of-total'], 'type': 'string', 'description': 'Default n'}, 'position': {'enum': ['bottom-center', 'bottom-right', 'bottom-left', 'top-center'], 'type': 'string', 'description': 'Default bottom-center'}}}
extract_pages
Extract the given pages into a new PDF (original order). Returns base64.
输入模式
{'type': 'object', 'required': ['file', 'pages'], 'properties': {'file': {'type': 'string', 'description': 'The PDF file, base64-encoded (max 10 MB)'}, 'pages': {'type': 'string', 'description': 'Page list like "2, 5-7" (1-based)'}}}
flatten_pdf
Flatten fillable form fields into permanent page content so answers can't be edited. Returns base64.
输入模式
{'type': 'object', 'required': ['file'], 'properties': {'file': {'type': 'string', 'description': 'The PDF file, base64-encoded (max 10 MB)'}}}
get_pdf_metadata
Read a PDF's document properties (title, author, subject, keywords, creator, producer, dates, page count).
输入模式
{'type': 'object', 'required': ['file'], 'properties': {'file': {'type': 'string', 'description': 'The PDF file, base64-encoded (max 10 MB)'}}}
merge_pdfs
Merge multiple PDF files into one, in the order given. Returns the merged PDF as base64.
输入模式
{'type': 'object', 'required': ['files'], 'properties': {'files': {'type': 'array', 'items': {'type': 'string', 'description': 'The PDF file, base64-encoded (max 10 MB)'}, 'description': '2+ PDFs, base64-encoded, in merge order'}}}
remove_pages
Delete the given pages from a PDF. Returns the remaining document as base64.
输入模式
{'type': 'object', 'required': ['file', 'pages'], 'properties': {'file': {'type': 'string', 'description': 'The PDF file, base64-encoded (max 10 MB)'}, 'pages': {'type': 'string', 'description': 'Page list like "2, 5-7" (1-based)'}}}
rotate_pdf
Rotate pages clockwise by 90, 180, or 270 degrees. Rotates all pages unless a page list is given. Returns base64.
输入模式
{'type': 'object', 'required': ['file', 'degrees'], 'properties': {'file': {'type': 'string', 'description': 'The PDF file, base64-encoded (max 10 MB)'}, 'pages': {'type': 'string', 'description': 'Optional page list like "1, 3"; omit to rotate all'}, 'degrees': {'enum': [90, 180, 270], 'type': 'number'}}}
set_pdf_metadata
Rewrite a PDF's document properties. Pass empty strings to strip identifying metadata before sharing. Returns base64.
输入模式
{'type': 'object', 'required': ['file'], 'properties': {'file': {'type': 'string', 'description': 'The PDF file, base64-encoded (max 10 MB)'}, 'title': {'type': 'string'}, 'author': {'type': 'string'}, 'creator': {'type': 'string'}, 'subject': {'type': 'string'}, 'keywords': {'type': 'string', 'description': 'Comma-separated'}, 'producer': {'type': 'string'}}}
split_pdf
Split a PDF into parts. Provide ranges like "1-3, 5, 8-10" (each comma group becomes one output PDF), or omit ranges to get every page as its own PDF. Returns base64 files.
输入模式
{'type': 'object', 'required': ['file'], 'properties': {'file': {'type': 'string', 'description': 'The PDF file, base64-encoded (max 10 MB)'}, 'ranges': {'type': 'string', 'description': 'e.g. "1-3, 5, 8-10"; omit for one file per page'}}}
watermark_pdf
Stamp a diagonal text watermark (e.g. "CONFIDENTIAL", "DRAFT") across every page. Returns base64.
输入模式
{'type': 'object', 'required': ['file', 'text'], 'properties': {'file': {'type': 'string', 'description': 'The PDF file, base64-encoded (max 10 MB)'}, 'size': {'type': 'number', 'description': 'Font size in points, 8–200, default 60'}, 'text': {'type': 'string', 'description': 'Watermark text'}, 'color': {'enum': ['gray', 'red', 'blue'], 'type': 'string', 'description': 'Default gray'}, 'opacity': {'type': 'number', 'description': '0.02–1, default 0.15'}}}
已添加
flatten_pdf
2026年9月17日 12:36
已添加
set_pdf_metadata
2026年9月17日 12:36
已添加
get_pdf_metadata
2026年9月17日 12:36
已添加
add_page_numbers
2026年9月17日 12:36
已添加
watermark_pdf
2026年9月17日 12:36
已添加
rotate_pdf
2026年9月17日 12:36
已添加
remove_pages
2026年9月17日 12:36
已添加
extract_pages
2026年9月17日 12:36
已添加
split_pdf
2026年9月17日 12:36
已添加
merge_pdfs
2026年9月17日 12:36