
Mac-letterhead
io.github.easytocloud由 GitHub 帳號 easytocloud 發布v0.25.0更新於 Oct 29, 2026
Letterhead PDF as digital stationery: prints Markdown without overprinting header, footer, or logo.
概覽
本機 macOS MCP 伺服器,把 Markdown 渲染成套用公司信紙抬頭的 PDF,內文只落在安全可列印區域內。
- 可以做什麼
- 把 Markdown 文件轉成套用信紙抬頭的 PDF,並依品牌 CSS 套用字型與配色
- 把既有 PDF 合併到信紙上,而非從 Markdown 產生
- 產生安全區域預覽 PDF,含裁切標記與顏色標示的來源
- 讀取 YAML front matter 的單一文件選項,如標題、輸出目錄、頁碼、混合策略與中繼資料
- 支援多頁信紙,首頁、偶數頁與奇數頁可套用不同範本
- 適用情境
- 適合經常需要把提案、報告、發票或備忘錄排在公司或客戶信紙上的情況,希望助理依需求直接產出成品 PDF,而不必在 Word 或 PDF 編輯器裡手動排版。
- 執行需求
- 僅在 macOS 本機執行,以 Python 套件方式啟動(例如透過 uvx 加上 mcp 擴充)。需要一份信紙 PDF,預設放在 ~/.letterhead/ .pdf,可選配同名 CSS 檔案。WeasyPrint 系統函式庫(pango、cairo、fontconfig、freetype、harfbuzz)為選用,缺少時會自動退回 ReportLab。不需帳號、金鑰或網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mac-letterhead,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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
- Install
- Quick start (2 minutes)
- Use it — droplet · CLI · MCP server
- Configure & fine-tune — brand CSS · blend strategies · multi-page
- Advanced · Privacy · License
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):
uvx (no permanent install; uses uv's ephemeral env):
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:
Without them, Mac-letterhead falls back to ReportLab automatically — simpler output, no external deps, everything still works.
Quick start (2 minutes)
-
Put your letterhead somewhere Mac-letterhead can find it. The default convention is
~/.letterhead/<name>.pdf: -
(Optional, but strongly recommended) Add typography. Create
~/.letterhead/company.csswith your brand's fonts and colors:Skip this and Mac-letterhead uses a clean default.
-
Create the droplet on your Desktop:
A
company.appappears on your Desktop. -
Drop any
.mdor.pdffile 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.
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.
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):
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:
- 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(orprintable-area— case-insensitive, substring match). Then multiple rectangles per page work too — only the labeled one is used. - 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.
- Fallback default. No content detected → 1-inch margins on every side.
Preview the resolution any time:
Colour code in the preview PDF — glance to see how confident the tool is:
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.
Supported fields (all optional, kebab-case, unknown fields are logged and skipped):
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):
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 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.
Multi-page letterheads
Different letterhead template per page position:
Advanced
- Rendering backends. WeasyPrint (preferred, full CSS support) with a ReportLab fallback. Install
brew install pango cairo fontconfig freetype harfbuzzto opt into WeasyPrint. - GitHub Flavored Markdown. Tables, task lists, strikethrough, code blocks with syntax highlighting — all supported when
pycmarkgfmis available (it's a default dependency). - Custom overrides.
mac-letterhead install --name X --letterhead /some/other.pdf --css /some/other.cssfor one-off droplets with non-conventional paths. - Publishing / release pipeline. Contributor-facing:
docs/publishing.md. - Operator guide. For contributors:
CLAUDE.mddocuments 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.
來源:README.md,提交 9ec6cb0
工具
0版本歷史
3- v0.25.0最新Oct 29, 2026
- v0.24.4Oct 5, 2026
- v0.24.3Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分