Skip to main content
Glama

MCP PDF Forms

A PDF form manipulation toolkit built with MCP and PyMuPDF.

Features

  • Find PDF files across multiple directories

  • Extract form field information from PDF files

  • Visualize form fields in PDF documents

Related MCP server: PDF MCP Server

Installation

# Install package from PyPI
pip install mcp_pdf_forms

# Or install from source
git clone https://github.com/Wildebeest/mcp_pdf_forms.git
cd mcp_pdf_forms
pip install -e .

Command Line Tool

After installation, you can use the mcp-pdf-forms command to start the server:

# Start the server with one or more directories to scan for PDFs
mcp-pdf-forms examples

You can also add it to Claude Code as an MCP:

claude mcp add pdf-forms mcp-pdf-forms .

Usage

Once installed, you can use the package to work with PDF forms. The package provides tools through the MCP interface.

PDF Discovery Tool

The PDF Discovery tool helps you find PDF files across specified directories.

  • Input: Directory paths to search for PDFs

  • Output: List of PDF files found in the specified directories

  • Usage: Use this to quickly locate all PDF files in your project or specified folders

Form Field Extraction Tool

The Form Field Extraction tool extracts information about all form fields in a PDF document.

  • Input: Path to a PDF file

  • Output: Detailed information about each form field including field name, type, position, and other properties

  • Usage: Use this to analyze form structure and understand the fields available for filling

Field Highlight Visualization Tool

The Field Highlight tool creates a visual representation of form fields in the PDF.

  • Input: Path to a PDF file

  • Output: Modified PDF with all form fields highlighted for easy identification

  • Usage: Use this to visually inspect the layout and position of form fields in your document

Libraries Used

  • MCP - Machine Conversation Protocol framework

  • PyMuPDF - Python bindings for MuPDF, a high-performance PDF library

License

MIT

Available Tools

6 tools
extract_form_fieldsC
Extract all form fields from a PDF

Args:
    pdf_path: Path to the PDF file

Returns:
    Dictionary of form field names and their properties

Inputs: pdf_path (required).

extract_textA
Extract text from PDF pages

Args:
    pdf_path: Path to the PDF file
    start_page: Page number to start extraction (0-indexed). If None, starts from first page.
    end_page: Page number to end extraction (0-indexed, inclusive). If None, ends at start_page if specified, otherwise extracts all pages.
    
Returns:
    If extracting a single page: string containing the page text
    If extracting multiple pages: dictionary mapping page numbers to page text

Inputs: pdf_path (required), start_page, end_page.

highlight_form_fieldA
Generate an image with the specified form field highlighted with a red box

Args:
    pdf_path: Path to the PDF file
    field_name: Name of the form field to highlight

Returns:
    Image of the page with the field highlighted

Inputs: pdf_path (required), field_name (required).

list_pdfsB
List PDF files in configured base paths

Args:
    path_filter: Optional string to filter PDF paths

Returns:
    List of PDF paths matching the filter

Inputs: path_filter.

render_pdf_pageB
Generate an image of a PDF page without any highlighting

Args:
    pdf_path: Path to the PDF file
    page_num: Page number to render (0-indexed)
    zoom: Zoom factor for rendering (higher values for better quality)
    
Returns:
    Image of the specified page

Inputs: pdf_path (required), page_num, zoom.

search_textA
Search for text pattern in a PDF file

Args:
    pdf_path: Path to the PDF file
    pattern: Regular expression pattern to search for
    case_sensitive: Whether to perform case-sensitive matching
    start_page: Page number to start search (0-indexed). If None, starts from first page.
    end_page: Page number to end search (0-indexed, inclusive). If None, searches all pages.
    
Returns:
    List of matches with page number, match text, and context

Inputs: pdf_path (required), pattern (required), case_sensitive, start_page, +1 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no ambiguity. extract_form_fields handles form-specific metadata, extract_text retrieves raw text, highlight_form_field visually marks form fields, list_pdfs enumerates files, render_pdf_page generates page images, and search_text performs pattern matching. The descriptions reinforce these unique roles, making tool selection straightforward.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with snake_case, such as extract_form_fields, highlight_form_field, and render_pdf_page. The naming is predictable and readable throughout, with no deviations or mixed conventions, enhancing clarity and usability.

    Tool Count5/5

    With 6 tools, the server is well-scoped for PDF form and content processing. Each tool earns its place by covering distinct aspects like extraction, rendering, listing, and searching, without being overly sparse or bloated. This count aligns well with the domain's typical operations.

    Completeness4/5

    The tool set provides strong coverage for PDF form and text operations, including extraction, rendering, listing, and searching. A minor gap exists in form field modification (e.g., fill_form or update_form_field), but agents can work around this by using other tools or external methods. Core workflows are well-supported.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    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
    • A
      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.
      39 npm
      1
      ISC
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server for local PDF manipulation including merging, splitting, rotating, watermarking, and text extraction. It works with various MCP-compatible clients and processes PDFs entirely on-device without cloud services.
      11
      18 npm
      MIT