Mac-letterhead

io.github.easytocloudPublished by GitHub account easytocloudv0.25.0Updated Oct 29, 2026

Letterhead PDF as digital stationery: prints Markdown without overprinting header, footer, or logo.

Overview

AI-generated overview

Local macOS MCP server that renders Markdown into branded PDFs on a company letterhead, keeping text inside the safe printable area.

What you can do
  • Convert Markdown documents into letterheaded PDFs, with typography from a brand CSS file
  • Merge an existing PDF onto the letterhead instead of Markdown
  • Preview the detected safe area as a PDF with cut marks and a colour-coded source label
  • Apply per-document options from YAML front matter such as title, output directory, page numbers, blend strategy and metadata
  • Handle multi-page letterheads, using different templates for first, even and odd pages
When to use it
Useful when you regularly produce proposals, reports, invoices or memos that must appear on a company or client letterhead and want an assistant to generate the finished PDF on request, without manual layout work in Word or a PDF editor.
Requirements
Runs locally on macOS only, started as a Python package (for example via uvx with the mcp extra). A letterhead PDF, by default under ~/.letterhead/ .pdf, and optionally a matching CSS file. WeasyPrint system libraries (pango, cairo, fontconfig, freetype, harfbuzz) are optional; without them a ReportLab fallback is used. No accounts, keys or network access.
Before you install
It writes PDF files to disk, by default to the Desktop or to a path given in the call or in the document's front matter, so check where output lands. Documents and letterheads are processed locally with no network calls or telemetry, but the assistant can read the Markdown you hand it. The style field in front matter is ignored on dedicated MCP servers.

Installation

In SourceWeft

  1. Open Mac-letterhead in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Mac-letterhead

[PyPI Version] [Homebrew] [Python] [macOS] [Build] [License] [MCP Registry] [Downloads]

[Mac-letterhead]

Turn any Markdown file into a professionally-branded PDF on your company's letterhead — with no manual formatting. Mac-letterhead treats your letterhead PDF as digital stationery: it prints your Markdown into the safe area of the page (never overlapping your header, footer, or logo) and applies your brand's typography from a small CSS file.

Runs entirely on your Mac. Same engine as a drag-and-drop droplet, a command-line tool, or a Model Context Protocol server that Claude and other AI clients can call directly.

[A plain report.md becomes a letterheaded PDF via Mac-letterhead]


What it does

You have a company letterhead — a PDF with your logo at the top, contact info at the bottom, maybe a subtle watermark. You have documents to write, and they need to be on that letterhead: proposals, reports, invoices, memos.

The traditional options are all painful: Word templates that never quite line up, copy-paste-adjust cycles into a designer's InDesign file, or manually placing text over the letterhead in a PDF editor. Or just giving up and sending unbranded.

Mac-letterhead does the whole thing automatically. It analyzes your letterhead PDF to find the safe printable area (the space around the header, footer, and logo), renders your Markdown into that area with your brand's typography (fonts and colors from a tiny CSS file), and hands you a finished PDF. Multi-page letterhead? First-page vs subsequent pages? Handled.

The same tool ships as three interfaces — a Mac drag-and-drop app (for you), a command-line utility (for scripting), and an MCP server (so Claude and other AI clients can produce your branded documents on request).

Install

Pick one:

Homebrew (recommended for everyday Mac use):

bash
brew tap easytocloud/tapbrew install mac-letterhead

uvx (no permanent install; uses uv's ephemeral env):

bash
uvx mac-letterhead --help

Claude Desktop (double-click install): Download the latest mac-letterhead-<version>.mcpb from the releases page and double-click it — Claude for macOS handles the rest.

System dependencies (optional but recommended)

For the best rendering quality (full CSS support via WeasyPrint), install the WeasyPrint system libraries once:

bash
brew install pango cairo fontconfig freetype harfbuzz

Without them, Mac-letterhead falls back to ReportLab automatically — simpler output, no external deps, everything still works.

Quick start (2 minutes)

  1. Put your letterhead somewhere Mac-letterhead can find it. The default convention is ~/.letterhead/<name>.pdf:

    bash
    mkdir -p ~/.letterheadcp /path/to/your-letterhead.pdf ~/.letterhead/company.pdf
  2. (Optional, but strongly recommended) Add typography. Create ~/.letterhead/company.css with your brand's fonts and colors:

    css
    body        { font-family: "Inter", "Helvetica Neue", sans-serif; color: #1f2937; }h1, h2, h3  { color: #0b3d91; font-family: "Merriweather", Georgia, serif; }h1          { border-bottom: 2px solid #0b3d91; padding-bottom: 0.25em; }a           { color: #0b3d91; }

    Skip this and Mac-letterhead uses a clean default.

  3. Create the droplet on your Desktop:

    bash
    mac-letterhead install --name "company"

    A company.app appears on your Desktop.

  4. Drop any .md or .pdf file onto the droplet. Choose where to save. You get a letterheaded PDF.

That's it. Every subsequent document is one drop.

Use it

Same engine, three interfaces.

🖱️ Drag-and-drop droplet

Best for human workflows on a Mac. One-time setup, then every future document is a drag onto a Desktop icon.

bash
mac-letterhead install --name "company"        # uses ~/.letterhead/company.{pdf,css}mac-letterhead install --name "personal"       # a second droplet for personal docsmac-letterhead install --name "client-acme"    # one droplet per client / brand

Each droplet is a full macOS .app bundle you can drag around, put in the Dock, or Automator-chain. Dropping a file on it opens a save dialog for the output location.

Double-click the droplet (without dropping anything) to see the safe-area preview for that droplet's letterhead — cut marks, colour-coded tint, source label, all in one PDF that opens in your default viewer. Handy for verifying "will Markdown land where I expect it" before committing to a merge.

⌨️ Command line

Best for scripting, CI, or one-shot conversions. No droplet needed.

bash
# Markdown → letterheaded PDFmac-letterhead merge-md ~/.letterhead/company.pdf "Q3 Report" ~/Desktop report.md
# Existing PDF → letterheaded PDFmac-letterhead merge ~/.letterhead/company.pdf "Contract" ~/Desktop contract.pdf
# Preview the safe area (cut marks + tint) as a PDFmac-letterhead preview ~/.letterhead/company.pdf

Full reference: mac-letterhead --help.

🤖 MCP server for AI clients

Best when you want Claude, Claude Code, Cursor, Windsurf, or another AI assistant to produce branded documents on demand.

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

json
{  "mcpServers": {    "letterhead": {      "command": "uvx",      "args": ["mac-letterhead[mcp]", "mcp"]    }  }}

Then in Claude: "Draft a Q3 investor update on our company letterhead." Mac-letterhead handles the formatting; the PDF lands in ~/Desktop.

Published on the official MCP Registry as io.github.easytocloud/mac-letterhead — visible on Glama and PulseMCP. For full MCP configuration (style-specific servers, multiple brands from one client), see README_MCP.md.

Configure & fine-tune

Preview and mark the safe area

Mac-letterhead needs to know where on your letterhead is safe to print content — the space between the header, footer, and any logos. It figures this out in three tiers:

  1. You mark it explicitly. Open your letterhead in Preview.app (Tools → Show Markup Toolbar → Rectangle), draw a box over the intended safe area, save. That's it — Preview.app doesn't offer any way to label annotations, so Mac-letterhead treats a single Square annotation on a page as the safe area even without a label. If you want to be unambiguous (or you're using a PDF editor that supports labeling), click your rectangle → sidebar → Description → type safe-area (or printable-area — case-insensitive, substring match). Then multiple rectangles per page work too — only the labeled one is used.
  2. Auto-detected. No annotation → Mac-letterhead analyses the letterhead's layout (text, drawings, logos) and derives a safe rectangle that avoids them, with a ~40 pt safety pad.
  3. Fallback default. No content detected → 1-inch margins on every side.

Preview the resolution any time:

bash
mac-letterhead preview ~/.letterhead/company.pdf# writes ~/.letterhead/company-preview.pdf

Colour code in the preview PDF — glance to see how confident the tool is:

ColourSourceWhat it means
GreenannotationYou marked it. Trusted verbatim.
Slate blueauto-detectedHeuristic derived it from the letterhead layout.
Amberfallback defaultNo content detected. Consider marking it.

Cut marks at each corner give print-native precision; a very subtle tint fills the region for gestalt. A tiny label at the bottom-left tells you which source drove the result and the safe area's exact dimensions.

Per-document options via YAML front matter

Any Markdown file can start with a YAML front-matter block declaring per-document overrides — the same convention Jekyll, Hugo, and Obsidian use. Mac-letterhead reads it, applies the options, and renders the body normally.

markdown
---title: Q3 Investor Updateoutput-dir: ~/Documents/investorpage-numbers: alternateblend-strategy: multiplyauthor: Erik---
# Q3 Investor Update
Executive summary…

Supported fields (all optional, kebab-case, unknown fields are logged and skipped):

FieldValuesEffect
titlestringPDF title metadata + auto-generated filename
output-dirpath (supports ~)Where the resulting PDF is written
page-numbersbottom-right | bottom-center | bottom-left | alternateSee below. Omit to disable page numbers entirely (the default).
blend-strategydarken | multiply | overlay | transparency | reverseOverrides the merge blend mode
stylestyle nameOverrides the letterhead style (ignored on dedicated MCP servers — see README_MCP.md)
author, subjectstringPDF metadata

page-numbers: alternate is designed for booklet-style multi-page letterheads: page 1 is treated as a title page (no number), subsequent left-hand pages get the number bottom-left, right-hand pages bottom-right. Requires the WeasyPrint backend.

Precedence (most-specific wins):

explicit CLI/MCP arg  >  front matter  >  server/droplet defaults  >  hard-coded

So if an MCP tool call passes output_path=… explicitly and the document says output-dir: …, the MCP arg wins. Front matter fills in what the caller left unspecified.

Brand your typography with CSS

The letterhead PDF supplies the visual identity (logo, header, footer). CSS supplies the typography: fonts, colors, spacing, table styling, heading treatment. Together they make one reusable brand identity that any Markdown document can be rendered through.

Full example — ~/.letterhead/company.css:

css
body        { font-family: "Inter", "Helvetica Neue", sans-serif; color: #1f2937; }h1, h2, h3  { color: #0b3d91; font-family: "Merriweather", Georgia, serif; }h1          { border-bottom: 2px solid #0b3d91; padding-bottom: 0.25em; }a           { color: #0b3d91; text-decoration: underline; }code, pre   { font-family: "JetBrains Mono", ui-monospace, monospace; background: #f5f7fa; }table th    { background: #0b3d91; color: white; }table td    { border-bottom: 1px solid #e5e7eb; }blockquote  { border-left: 3px solid #0b3d91; color: #4b5563; }

CSS is applied inside the safe area, so branded typography stays clear of your header, footer, and logo automatically. (CSS is applied by the WeasyPrint backend; the ReportLab fallback supports a reduced subset.)

Choose a blend strategy

Different letterheads need different overlay modes. Set with --strategy in the CLI, or when creating a droplet.

StrategyBest for
darken (default)Dark logo/artwork on light letterhead paper
multiplyWatermark-like effects on subtle designs
overlayBetter visibility across mixed contrasts
transparencySmooth blending with translucent layers
reverseLetterhead on top, content beneath

Multi-page letterheads

Different letterhead template per page position:

Letterhead PDF has…Applied to
1 pageEvery document page
2 pagesPage 1 → first document page; page 2 → all others
3 pagesPage 1 → first; page 2 → even; page 3 → odd

Advanced

  • Rendering backends. WeasyPrint (preferred, full CSS support) with a ReportLab fallback. Install brew install pango cairo fontconfig freetype harfbuzz to opt into WeasyPrint.
  • GitHub Flavored Markdown. Tables, task lists, strikethrough, code blocks with syntax highlighting — all supported when pycmarkgfm is available (it's a default dependency).
  • Custom overrides. mac-letterhead install --name X --letterhead /some/other.pdf --css /some/other.css for one-off droplets with non-conventional paths.
  • Publishing / release pipeline. Contributor-facing: docs/publishing.md.
  • Operator guide. For contributors: CLAUDE.md documents the architecture, release rules, and MCP registry constraints.

Privacy

Mac-letterhead runs entirely on your local machine. No network calls, no telemetry, no analytics, no cloud sync. See PRIVACY.md.

Contributing

See CONTRIBUTING.md.

License

MIT.

Source: README.md at commit 9ec6cb0

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

3
  1. v0.25.0LatestOct 29, 2026
  2. v0.24.4Oct 5, 2026
  3. v0.24.3Sep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts