# pdf-letter-mcp [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/bitterdev/pdf-letter-mcp  
**GitHub Stars:** 2  
**npm Downloads (last month):** 228  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/pdf-letter-mcp

## Description
Renders letters as print ready PDFs, DIN 5008 compliant for German window envelopes.

## Tools
Capabilities this server exposes over MCP:

- **create_letter** — Renders a letter as a PDF file in the fixed house layout (DIN 5008 address field, 25 mm writing margin, fold and punch marks, bold subject block). Pass content only, the layout is fixed. The signature image intentionally overlaps the closing line. Returns the absolute file path, the page count, layout metrics and warnings.
- **preview_letter** — Renders the letter in memory and returns layout metrics and warnings without writing a file. Use it to check whether the address fits the address field or the letter runs onto a second page.
- **prepare_signature** — Cleans up a scanned signature: crops white borders, turns the paper background transparent and optionally recolours the ink. Writes a PNG that can be passed to create_letter as signature.path. Needs the optional sharp dependency.
- **list_profiles** — Lists the sender profiles configured on this machine. Each profile carries the address and the signature of one person, so create_letter only needs the profile key.
- **get_din5008_spec** — Returns the millimetre geometry of the layout: address field, remark zone, writing margins, subject position, fold and punch marks.
- **list_locales** — Lists the supported languages together with their fixed texts (salutation, closing, enclosures, page numbering).
- **list_fonts** — Lists the built-in font families and resolves a font name against the installed system fonts, so you can check what create_letter would embed.

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

```json
"mcpServers": {
  "pdf-letter-mcp": {
    "command": "npx",
    "args": ["-y","pdf-letter-mcp"]
  }
}
```

## Documentation

## What pdf-letter-mcp MCP server does

The pdf-letter-mcp MCP server renders structured correspondence as a fixed-layout PDF. Its primary format follows DIN 5008 geometry: a return-address line, recipient block, right-aligned place and date, subject and references, salutation, body, closing, signature, and enclosures. The address area is positioned for DL and C6/C5 window envelopes, with fold and punch marks included in the form.

The renderer supports German and several other locales, including English, French, Spanish, Italian, Dutch, Portuguese, Polish, Turkish, Danish, Swedish, and Czech. Locale data controls fixed texts, date formatting, and address rules. Body content can contain paragraphs, line breaks, bullets, numbered lists, bold or italic markup, and explicit page breaks.

## How it works

The server communicates through MCP over stdio and performs rendering on the local machine. `create_letter` writes a PDF and reports its path, page count, layout measurements, and warnings. `preview_letter` runs the same layout process without creating a file, which is useful for checking address fit and pagination before saving the result.

Long letters receive continuation headers containing recipient, date, and page number. The closing, signature, printed name, and enclosures remain together across page breaks. A debug layout mode can show the DIN 5008 zones for physical envelope checks.

Signatures may be supplied as image paths. They are placed as an overlay above the printed name without changing the surrounding text positions. Scanned signatures can be trimmed, made transparent, and recolored. The `prepare_signature` tool can perform that cleanup once, allowing the resulting PNG to be reused.

## Setup and configuration

Install dependencies with `npm install`, then build with `npm run build`. Start the compiled entry point with Node and register that command in an MCP client.

No environment variable is mandatory. `PDF_LETTER_OUTPUT_DIR` selects the default PDF directory and otherwise the system temporary directory is used. `PDF_LETTER_FONT_DIR` adds a font search location, while `PDF_LETTER_FONT` and `PDF_LETTER_FONT_SIZE` set typography for the installation. `PDF_LETTER_PROFILES` changes the sender-profile file location, and `PDF_LETTER_PROFILE` selects the fallback profile.

Sender profiles store identity, address, place, locale, and an optional signature path outside the prompt. A letter can name a profile rather than repeating those values. If neither a profile nor a sender is available, rendering is refused instead of fabricating sender data.

## Tools and capabilities

The pdf-letter-mcp MCP server exposes these tools:

- `create_letter`: Render and save a PDF.
- `preview_letter`: Render without saving and return layout information.
- `prepare_signature`: Produce a cleaned PNG from a scanned signature.
- `get_din5008_spec`: Return form geometry in millimetres.
- `list_locales`: Show supported languages and fixed texts.
- `list_fonts`: List bundled families and resolve names against installed fonts.

Typography uses bundled DejaVu fonts by default, with support for installed system fonts or a `.ttf` path. The MCP interface intentionally exposes content and document fields rather than arbitrary margin, spacing, image-position, or font-size controls; font settings are installation-wide.

## Limitations and notes

The layout is intentionally fixed, with one letter format and no per-letter controls for margins, spacing, signature dimensions, or image offsets. Library building blocks for company letterheads, information blocks, and footers are not exposed through MCP. Signature cleanup options such as trimming, background removal, and ink recoloring depend on the optional `sharp` package, which the project installs by default. A PNG that already has transparency does not require those operations.

_Full upstream README: https://allmcps.com/mcp/pdf-letter-mcp/readme_

