Skip to main content
Glama

mcp-pdf-utils

MCP-сервер для обработки PDF. Объединяйте, разделяйте, поворачивайте, добавляйте водяные знаки, извлекайте текст и многое другое.

Работает с Claude Desktop, Cursor, VS Code, ChatGPT и любым MCP-совместимым клиентом.

npm License: MIT


Зачем это нужно

Обработка PDF — одна из самых распространенных задач для разработчиков, однако до сих пор не было хорошего MCP-сервера для этого. Существующие варианты имеют 1 звезду. Этот действительно работает.

Все выполняется локально. Никаких API-ключей. Никаких облачных сервисов. Ваши PDF-файлы никогда не покидают ваш компьютер.

Related MCP server: PDF MCP Server

Инструменты

Инструмент

Описание

pdf_info

Получение метаданных, количества страниц, размера файла

pdf_extract_text

Извлечение текстового содержимого со страниц

pdf_merge

Объединение нескольких PDF в один

pdf_split

Разделение PDF на отдельные файлы страниц

pdf_extract_pages

Извлечение диапазона страниц в новый PDF

pdf_rotate

Поворот страниц на 90°, 180° или 270°

pdf_add_watermark

Добавление текстового водяного знака (например, DRAFT, CONFIDENTIAL)

pdf_delete_pages

Удаление определенных страниц

pdf_reorder

Изменение порядка страниц

pdf_set_metadata

Установка заголовка, автора, темы, ключевых слов

pdf_create

Создание нового PDF из обычного текста

Быстрый старт

Claude Desktop

Добавьте в ваш claude_desktop_config.json:

{
  "mcpServers": {
    "pdf-tools": {
      "command": "npx",
      "args": ["-y", "mcp-pdf-utils"]
    }
  }
}

Вот и все. Перезапустите Claude Desktop и начните просить его работать с PDF-файлами.

Claude Code

claude mcp add pdf-tools -- npx -y mcp-pdf-utils

Cursor

Добавьте в настройки MCP вашего Cursor:

{
  "mcpServers": {
    "pdf-tools": {
      "command": "npx",
      "args": ["-y", "mcp-pdf-utils"]
    }
  }
}

VS Code

Добавьте в конфигурацию MCP вашего VS Code:

{
  "mcp": {
    "servers": {
      "pdf-tools": {
        "command": "npx",
        "args": ["-y", "mcp-pdf-utils"]
      }
    }
  }
}

Примеры использования

После подключения просто общайтесь со своим ИИ естественным образом:

  • "Объедини invoice_jan.pdf и invoice_feb.pdf в combined.pdf"

  • "Извлеки страницы 3-7 из report.pdf"

  • "Добавь водяной знак CONFIDENTIAL в contract.pdf"

  • "Сколько страниц в presentation.pdf?"

  • "Поверни все страницы в scan.pdf на 90 градусов"

  • "Удали 5-ю страницу из моего документа"

  • "Извлеки весь текст из этого PDF"

  • "Измени порядок страниц: поставь страницу 3 первой, затем 1, затем 2"

Разработка

git clone https://github.com/zekovdev/mcp-pdf-utils.git
cd mcp-pdf-utils
npm install
npm run dev

Тестирование с помощью MCP Inspector

npm run inspect

Это откроет официальный MCP Inspector, где вы сможете визуально протестировать каждый инструмент.

Как это работает

Сервер использует pdf-lib для манипуляций с PDF и pdf-parse для извлечения текста. Оба работают локально без внешних зависимостей — никаких API-ключей, сетевых вызовов или облачных сервисов.

Для связи используется транспорт MCP stdio, что означает, что сервер запускается как локальный процесс, который ваш ИИ-клиент порождает и с которым общается через stdin/stdout.

Дорожная карта

  • [ ] Сжатие PDF (уменьшение размера файла)

  • [ ] Извлечение изображений из PDF

  • [ ] PDF в изображения (миниатюры страниц)

  • [ ] Добавление номеров страниц

  • [ ] Шифрование PDF / защита паролем

  • [ ] Заполнение полей форм PDF

  • [ ] OCR для отсканированных PDF (через Tesseract)

  • [ ] Конвертация изображений в PDF

Участие в разработке

PR приветствуются. Запустите npm run inspect для тестирования ваших изменений перед отправкой.

Лицензия

MIT

Available Tools

11 tools
pdf_add_watermarkC

Add a text watermark to all or specific pages of a PDF.

Inputs: file (required), output (required), text (required), fontSize, +3 more.

pdf_createC

Create a new PDF document from plain text content.

Inputs: output (required), text (required), title, fontSize.

pdf_delete_pagesC

Delete specific pages from a PDF.

Inputs: file (required), output (required), pages (required).

pdf_extract_pagesB

Extract a range of pages from a PDF into a new PDF file.

Inputs: file (required), output (required), startPage (required), endPage (required).

pdf_extract_textC

Extract text content from a PDF file. Optionally specify page range.

Inputs: file (required), startPage, endPage.

pdf_infoB

Get PDF metadata: page count, title, author, creator, creation date, file size.

Inputs: file (required).

pdf_mergeC

Merge multiple PDF files into a single PDF.

Inputs: files (required), output (required).

pdf_reorderB

Reorder pages of a PDF. Provide the desired page order.

Inputs: file (required), output (required), order (required).

pdf_rotateB

Rotate pages of a PDF by 90, 180, or 270 degrees.

Inputs: file (required), output (required), angle (required), pages.

pdf_set_metadataC

Set or update PDF metadata (title, author, subject, keywords, creator).

Inputs: file (required), output (required), title, author, +3 more.

pdf_splitA

Split a PDF into separate files. Extract specific pages or split into individual page files.

Inputs: file (required), outputDir (required), pages.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no significant overlap. For example, pdf_extract_pages creates a new PDF from a range, while pdf_split divides into separate files, and pdf_delete_pages removes pages without creating new files. The descriptions specify unique actions on PDFs, making misselection unlikely.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with the prefix 'pdf_' (e.g., pdf_add_watermark, pdf_extract_text). This uniform snake_case naming makes the set predictable and easy to understand, enhancing usability for agents.

    Tool Count5/5

    With 11 tools, the count is well-scoped for PDF manipulation tasks. It covers a comprehensive range of operations without being overwhelming, including creation, editing, extraction, merging, and metadata handling, which aligns perfectly with the server's purpose.

    Completeness5/5

    The tool set provides complete coverage for PDF manipulation, including CRUD-like operations (create, modify, delete pages), metadata management, and advanced features like watermarking and rotation. There are no obvious gaps; agents can perform all common PDF tasks without dead ends.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that provides comprehensive PDF processing capabilities including text extraction, image extraction, table detection, annotation extraction, metadata retrieval, page rendering, and document structure analysis.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      An MCP server for PDF form filling, basic editing, and OCR text extraction. It enables users to merge, rotate, annotate, and sign PDFs, while also supporting text extraction from both searchable and scanned image-based documents.
      15
      Apache 2.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that provides tools for reading, writing, and manipulating PDF files, including text extraction, metadata retrieval, and merging or splitting documents. It also enables users to create PDFs from plain text and convert specific pages or entire documents into images.
      1
      -
    • A
      license
      A
      quality
      B
      maintenance
      A comprehensive MCP server with 37 tools for PDF operations including reading, searching, creating, merging, splitting, watermarking, form filling, and more, built on open-source libraries.
      37
      42 npm
      2
      MIT