paperpress
Detects GitHub's brand assets from github.com and renders markdown as a PDF in GitHub's brand.
Detects Linear's brand assets from linear.app and renders markdown as a PDF in Linear's brand.
Detects Railway's brand assets from railway.com and renders markdown as a PDF in Railway's brand.
Detects Stripe's brand assets (logo, colors, and fonts) from stripe.com and renders markdown as a PDF in Stripe's brand.
Detects Vercel's brand assets from vercel.com and renders markdown as a PDF in Vercel's brand.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
paperpress
Give it a company's URL and some markdown. Get back a PDF in that company's brand.
One HTTP call. No signup, no API key. REST API plus a hosted MCP server, so AI agents can use it too.
The same markdown, four times. The logo, color and font in each were detected live from the URL underneath.
Try it
Paste this into a terminal. It detects Stripe's brand and renders a sample report in it:
curl -X POST https://paperpress.up.railway.app/v1/demo \
-H "Content-Type: application/json" \
-d '{"url":"https://stripe.com"}'You get back what was detected, plus a link to the PDF:
{
"detected": {
"primaryColor": "#533afd",
"logoUrl": "https://images.stripeassets.com/.../favicon.png",
"fontFamily": "sohne-var, \"SF Pro Display\", sans-serif",
"fontStyle": "sans"
},
"pdf": { "url": "https://paperpress.up.railway.app/pdf/...", "bytes": 59496 },
"elapsedMs": 1484
}Swap in any company's URL. To render your own markdown instead of the sample, use /v1/documents:
curl -X POST https://paperpress.up.railway.app/v1/documents \
-H "Content-Type: application/json" \
-d '{"markdown":"# Q4 report\n\nRevenue up 14%.","brandFromUrl":"https://stripe.com"}'Related MCP server: Brand Registry
Use it from an AI agent (MCP)
The server speaks MCP over Streamable HTTP at:
https://paperpress.up.railway.app/mcpAdd that URL to any MCP client. There's nothing else to configure: no key, no headers, no install. For clients that use an mcpServers config file:
{
"mcpServers": {
"paperpress": { "url": "https://paperpress.up.railway.app/mcp" }
}
}It exposes one tool, generate_pdf, with the same inputs as /v1/documents. Ask your agent something like "write a one-page board update and make it a PDF in Linear's brand", and it will call the tool with brandFromUrl: "https://linear.app" and hand you the link.
It's the standard transport, so it isn't tied to one vendor or model: it should work with Claude Desktop, Claude.ai connectors, Cursor, Claude Code, or an agent running a local model. It's verified against the raw @modelcontextprotocol/sdk client; the server never knows which model is on the other end.
How it works
Detect (
src/render/detect.ts). Opens the URL in headless Chromium and reads what the browser actually rendered:theme-color, brand CSS custom properties, the background color of call-to-action buttons, the computedfont-family, and header<img>candidates scored by position, size and format. Near-white, near-black and gray noise is filtered out, and a WCAG contrast check stops a too-light brand color from making text unreadable. Results are cached for 24 hours per site.Render (
src/render/). Markdown becomes HTML viaunified/remark/rehype, styled by one of five themes plus the brand kit, then printed to PDF by Playwright. Typically 100-400 ms once Chromium is warm.Serve. PDFs are written to disk behind HMAC-signed links that expire after 7 days.
One Fastify process. No queue, no worker, no Redis, no database.
Why it's built this way
It reads the live page, not a database. Brand-data APIs like Brandfetch work from a crawled index, so they only know companies they've already seen. This reads the page at request time, so it works on any URL, including ones nobody has indexed. It also returns the exact font stack (
"sohne-var, SF Pro Display"), not justserif/sans/mono, because it reads what the browser renders.Detect and render happen in one call. Normally you'd call a brand API, take the JSON, then call a separate PDF API with it: two round trips, two vendors, glue code in between.
brandFromUrldoes both in a single synchronous request, in about a second.
API reference
Base URL: https://paperpress.up.railway.app. Every endpoint is anonymous.
Method | Path | What it does |
|
| Markdown → PDF. Returns a signed link. |
|
| URL → detected brand kit, as JSON. |
|
| URL → detected brand kit plus a sample report rendered in it. |
|
| MCP endpoint, one |
|
| Download a rendered PDF (signed link). |
|
|
|
POST /v1/documents
Field | Type | |
| string, required | Up to 500 KB. Headings, lists, tables, code blocks, blockquotes, links. |
| URL | Detect a brand from this page and apply it. |
| object | Set brand fields directly: |
| string |
|
| string | Goes in the PDF metadata, and in the page header when a brand is applied. |
| string |
|
| boolean | Default |
| string | Raw CSS applied last, for one-off overrides. |
Response:
{ "id": "bc79fc99-...", "url": "https://paperpress.up.railway.app/pdf/bc79fc99-...?exp=...&sig=...", "pages": 1, "bytes": 57139, "renderTimeMs": 101 }POST /v1/detect
Send { "url": "https://linear.app" }. Results are cached for 24 hours per site; add "refresh": true to skip the cache. You get back primaryColor, palette, logoUrl, favicon, fontFamily, headingFontFamily and fontStyle. You can pass these straight back as a brandKit, adjusted if you like.
Limits
Per IP address:
30 renders an hour, shared between
/v1/documentsand the MCP tool.30 an hour each for
/v1/detectand/v1/demo.60 requests a minute across everything.
Over a limit, the API returns 429 with a Retry-After header, and the MCP tool returns an error saying when to retry. A single document is capped at 200 pages.
Themes
The same markdown in each built-in theme, with no brand applied:
Every sample, including PDFs with inline brand kits, is in samples/. Regenerate them with npx tsx scripts/preview.ts, or try detection on any URL with npx tsx scripts/detect.ts <url>.
Run it yourself
Needs Node 20+.
cp .env.example .env # set SIGNING_SECRET, e.g. `openssl rand -base64 32`
npm install # also downloads Chromium for Playwright
npm run dev # http://localhost:3000curl -X POST http://localhost:3000/v1/documents \
-H "Content-Type: application/json" \
-d '{"markdown":"# Hello\n\nWorld."}'Variable | Default | |
| required | Signs PDF download links. At least 16 characters. |
|
| Used to build PDF links. |
|
| Where PDFs are written. Mount a volume here in production. |
|
| |
|
| Browser contexts in the pool, i.e. concurrent renders. |
|
| Hard limit for any single page load or render. |
|
| Per-IP render budget. |
|
| Larger documents are rejected with |
Deploy
The Dockerfile builds a single image on Microsoft's Playwright base, and railway.json adds a health check. On Railway:
railway init --name paperpress
railway add --service paperpress \
--variables "SIGNING_SECRET=$(openssl rand -base64 32)" \
--variables "PUBLIC_BASE_URL=https://your-app.up.railway.app" \
--variables "STORAGE_DIR=/data/storage" \
--variables "NODE_ENV=production"
railway service paperpress
railway volume add --mount-path /data/storage # so PDFs survive restarts
railway domain --port 3000
railway up --detach -cKeep the Playwright version in the Dockerfile base image in step with the playwright npm package. If they drift apart, the browser binary won't be found and every render fails.
Rate limits key on Railway's X-Real-IP header (src/lib/client-ip.ts). Behind a different proxy, check that it sets that header and doesn't pass a client-supplied one through.
Security
SSRF. Every caller-supplied URL (
brandFromUrl,logoUrl,/v1/detect,/v1/demo) is resolved, and private, loopback and link-local addresses are rejected. Because a public host can redirect to a private one, the address is checked again on every redirect hop and after the page finishes loading. One gap remains: the first connection to a redirect target happens before that check can reject it, so a blind outbound request is possible, though nothing from a rejected target is ever read or returned. Closing that fully would need IP pinning at the network layer.Script injection. Markdown is rendered with raw HTML disabled. The
cssfield rejects anything that could close the<style>block and inject a script into the browser.Hung pages. Some sites never finish loading (
airbnb.comhung for over 60 seconds in testing), and Playwright'spage.evaluate()has no timeout of its own. Every browser page is therefore raced againstRENDER_TIMEOUT_MS, and on timeout its browser context is killed and replaced, so one bad site can't tie up the pool.No accounts, no data. There are no keys, emails or user records to leak. The trade-off is an open browser pool, which is why the per-IP limits exist.
Known limitations
Pages that build their UI in JavaScript. Detection reads the page as soon as the HTML has loaded, before client-side code runs. Server-rendered marketing sites work well. A single-page app like
open.spotify.comgives you the logo but not the brand color, because its colored buttons don't exist yet at that point. Waiting longer fixed it but made every request 3-10x slower, so it was reverted. The commit history has the details.No automated tests. Everything was verified by hand against a running instance.
Single instance. Rate limits and the detection cache live in memory, so they reset on restart and wouldn't be shared across replicas.
PDFs aren't cleaned up. Links expire after 7 days, but the files stay on disk.
About this project
paperpress was built and briefly run as a real service, with a plan to charge for it. Before investing further I looked hard at the market: Claude now generates PDFs natively, and Brandfetch already sells a brand-data API built for AI agents, with real customers. So I'm not pursuing it as a business.
It's public as a working reference: a Playwright brand detector, a synchronous render pipeline, an SSRF-hardened URL fetcher and a hosted MCP server, small enough to read in an afternoon. The hosted instance stays up for anyone to try. It isn't maintained as a product.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Generate PDF, Word (.docx) and PowerPoint (.pptx) documents from Markdown over MCP.
Render on-brand images, PDFs and videos from templates; create and edit templates and brands.
Render HTML, Markdown, or URLs to images, PDF, or branded artifacts; extract and watch pages.
Make branded PDFs and images from reusable templates, brand kits, and your data.
Related MCP Servers
AlicenseAqualityCmaintenanceRender branded PDF documents (invoices, reports, certificates) and PNG social images directly from any MCP client using DocJet templates or raw HTML with JSON data.335 npmMIT- FlicenseNot gradedqualityCmaintenanceMCP server that exposes brand identity guidelines (visual look and voice) as markdown, enabling LLMs to produce on-brand content.-
- AlicenseNot gradedqualityDmaintenanceEnables generating designed, publish-ready PDF ebooks and reports from Markdown through natural language, with reusable brand themes, AI-generated covers, and editable saved projects.MIT
- AlicenseAqualityCmaintenanceEnables generation of PDF documents from JSON specs or Markdown, supporting themes, tables, images, and other rich blocks.3MIT