# JustFill PDF Form Automation [Health: Active]

**Category:** 🏢 Workplace & Productivity  
**Repository:** https://github.com/mrmaciej1/justfill-mcp  
**GitHub Stars:** 0  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/justfill-pdf-form-automation

## Description
Detect, review and fill existing PDF forms from JSON or Excel; reuse saved templates

## Tools
Capabilities this server exposes over MCP:

- **open_pdf** — Open a PDF (or a scanned image: jpg/png/tiff) and detect its fillable fields.

    Images are converted to a single-page PDF automatically (deterministically,
    so a template saved for a photo matches the same photo next time).

    Resolution order (best source wins):
      1. Saved template matching this exact file (deterministic, confidence 1.0)
      2. Embedded AcroForm fields (deterministic, confidence 1.0)
      3. ML detection (each field carries a confidence score)

    force_detect=True skips steps 1-2 and re-runs ML detection from scratch —
    use it to rebuild a layout when the saved template is wrong or stale.
    min_confidence drops ML fields scored below it (templates/AcroForm are
    always kept). Returns a JSON summary + the field list.
    
- **list_fields** — List the current working fields (optionally one page only).
- **close_workspace** — Release the current PDF and field data when work is finished.

    Saved templates and output PDFs are not deleted. This operation is
    idempotent, which makes it safe to call from automation cleanup blocks.
    
- **render_preview** — Render a page with the working field boxes drawn on it.

    Look at this image to VERIFY placement: blue boxes are deterministic
    (template/AcroForm/agent-placed); green/orange/red are ML detections by
    confidence (>=0.7 / >=0.4 / <0.4). Each box is labeled with its field id.
    
- **render_filled_preview** — Preview how the filled page will look BEFORE generating the PDF.

    Draws `values` (field id -> text; checkboxes get an X) into their boxes on
    the rendered page. Costs nothing — no fill is consumed. Typography is an
    approximation of the final output (the server typesets the real PDF), so
    use it to verify placement, alignment and obvious overflow, then fill_pdf.
    
- **add_field** — Add a field the detector missed (a false negative).

    Coordinates are percentages of the page (0-100), top-left origin —
    read them off the render_preview image proportionally.
    align ('left'|'center'|'right') and vertical_align ('top'|'middle'|'bottom')
    control where the value sits inside the box when the PDF is filled.
    
- **update_field** — Move/resize/rename a field, or set its text alignment.

    align: 'left'|'center'|'right'; vertical_align: 'top'|'middle'|'bottom' —
    where the value sits inside the box in the filled PDF.
    
- **update_fields** — Update many fields in one call (batch version of update_field).

    Each item: {"field_id": "...", and any of x, y, w, h, name, field_type,
    align, vertical_align}. Items with an unknown field_id are reported back,
    the rest are still applied.
    
- **remove_field** — Delete a field that isn't a real input (a false positive).
- **remove_fields** — Delete many fields in one call (batch version of remove_field).
- **prune_fields** — Bulk-delete fields matching ALL given criteria (e.g. detection noise).

    field_type: exact type match (e.g. 'cell'); confidence_below /
    width_below / height_below: strictly-less-than thresholds (w/h in % of
    page); page_index: limit to one page; exclude_ids: always keep these.
    Returns the removed ids so the operation is auditable (and reversible
    via add_field if it cut too much).
    
- **fill_pdf** — Fill the PDF and save it.

    `values` maps field id -> text value (checkboxes: "true"/"yes"/"x" to tick).
    Fields not present in `values` stay empty. AcroForm fields are filled
    natively inside the PDF; everything else is drawn at its exact box.
    The response's `warnings` list flags values that will be shrunk or
    truncated to fit their box — fix those before delivering the document.
    
- **save_template** — Save the current (reviewed) field layout as a reusable template.

    Next time this exact PDF is opened — by you or another agent session on
    this account — open_pdf returns these fields with confidence 1.0 and no
    ML pass at all. This is what makes repeat filling deterministic.

    Before saving, give every field a short semantic name (update_fields with
    name=..., e.g. 'age_score', 'total_abcd2') — names are stored in the
    template, so the next session maps values by meaning instead of guessing
    from coordinates. Also remove false positives first (remove_fields).
    
- **list_templates** — List saved templates on this account (name + field count + hash).

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "justfill-pdf-form-automation": {
    "command": "uvx",
    "args": ["justfill-mcp"],
    "env": {
      "JUSTFILL_API_KEY": "",
      "JUSTFILL_EMAIL": "",
      "JUSTFILL_PASSWORD": ""
    }
  }
}
```

**Requires environment variables:** `JUSTFILL_API_KEY`, `JUSTFILL_EMAIL`, `JUSTFILL_PASSWORD` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What JustFill PDF Form Automation does

JustFill PDF Form Automation MCP server connects MCP clients to justfill.app for working with existing PDF forms. It can inspect a PDF, identify or load its fields, show a labeled preview, place supplied values into those fields, and produce a filled PDF. It also supports image inputs such as JPG, PNG, and TIFF by converting them to PDF before processing.

The service is intended for forms whose layout already exists. It does not describe a document-generation workflow from scratch. A reviewed field layout can be saved as a template and reused for later submissions of the same form.

## How it works

Field resolution follows a defined order: a saved template is preferred, then embedded AcroForm fields, followed by ML-based detection. Detection results include confidence information and the original raw score. Because ML detection can miss fields or identify irrelevant regions, the normal workflow is to inspect a preview, correct the field set, and save the reviewed layout.

The correction cycle can add, edit, remove, or prune fields. A second preview renders the supplied values in place, including checkbox marks, without performing a fill. The final fill operation accepts a mapping from field IDs to text and can flatten the output. It reports warnings when values may be shrunk or truncated to fit.

## Setup and configuration

The hosted endpoint is `https://justfill.app/api/mcp`. Clients that support remote MCP servers with OAuth can connect there, authenticate with a JustFill account, and approve access. This route does not require installing the Python package or placing an API key in the client configuration.

For local use, install the client with `uv tool install justfill-mcp`, then run `justfill-mcp login`. The login opens a browser authorization flow and stores credentials locally. A zero-install configuration can run the package through `uvx`. API-key authentication is also supported with `JUSTFILL_API_KEY`; the legacy fallback uses `JUSTFILL_EMAIL` and `JUSTFILL_PASSWORD`.

The repository includes importable n8n workflows that call the hosted endpoint with HTTP Request nodes. One workflow accepts a PDF and JSON payload, reuses reviewed field names for that form, and returns a temporary download link. Spreadsheet users can instead use the guided browser workflow to map XLSX or CSV columns to reviewed fields and export approved PDFs in a ZIP.

## Tools and capabilities

Documented operations include:

- Open PDFs and inspect fields with configurable page and confidence settings.
- Render detection and filled-value previews.
- List, add, update, remove, or batch-edit fields.
- Prune detection noise using field type, size, confidence, page, and ID filters.
- Fill PDFs from field-ID/value mappings and save reviewed layouts as templates.
- List saved templates and configure horizontal or vertical text alignment.

The Gemini CLI extension can be installed from the repository and includes PDF workflow guidance alongside the published package.

## Limitations and notes

ML detection is a draft that requires visual review; saved templates and native AcroForm fields provide deterministic handling. Processing uses the allowance associated with the JustFill account. Generated files and temporary download links follow that account's plan. The README recommends testing with a blank form and fictional values before processing real documents.

_Full upstream README: https://allmcps.com/mcp/justfill-pdf-form-automation/readme_

