Let an AI Agent Render a Branded PDF from Markdown
Add the Rendex MCP server to Claude, Cursor, or Claude Code and the agent gains a render_artifact tool. When it finishes writing a report or proposal in Markdown, it calls the tool once and returns a branded PDF, a PNG, and a hosted share link — no export step, no headless browser, no file handling in the conversation.
Last updated 2026-07-15
The Problem
AI agents are fluent in Markdown — it's how they naturally emit reports, summaries, and proposals — but Markdown in a chat window isn't something you can send to a client or drop into a deck. Getting to a real deliverable usually means the user copies the text out, pastes it into a doc, restyles it, and exports a PDF by hand, breaking the agentic flow entirely. Wiring the agent to do it itself means giving it a headless-browser or PDF-toolchain step, which is exactly the infrastructure an MCP client is trying to avoid.
The Solution
The Rendex MCP server exposes render_artifact: the agent passes the content it already wrote (Markdown or HTML) plus a small branding theme — accent color, logo URL, footer — and Rendex renders it to a branded PDF and PNG on the edge, returning a hosted share link. The agent hands the shareUrl straight back in the conversation, so a Markdown draft becomes a client-ready document in one tool call. GitHub-flavored Markdown, code blocks, tables, and web fonts all render; no export, no browser, and it runs on the free tier.
How the Workflow Runs
Agent writes content
Claude/Cursor generates Markdown or HTML — a status report, a proposal, a meeting recap.
render_artifact
One MCP tool call with the content + a small branding theme (accent color, logo, footer).
Share link back
Rendex returns pdfUrl, pngUrl, and a hosted shareUrl the agent drops straight into the chat.
Input → Rendered Output

Rendered by Rendex
What You Need
- A Rendex API key — the free tier includes 100 renders/month with no card required.
- An MCP client: Claude Desktop, Claude Code, or Cursor.
- The Rendex MCP server configured with your API key (remote at mcp.rendex.dev, or the stdio server) — see /docs/mcp.
- Optional branding assets: a logo URL, an accent color hex, and header/footer text.
What This Recipe Uses
One tool call, full document
render_artifact takes the Markdown or HTML the agent wrote and returns a branded PDF, a PNG, and a hosted share link — no export step or file handling in the conversation.
Branding without CSS
Pass a small theme — accentColor, logo, header, footer — and Rendex styles the document. The agent describes the brand; it never has to author layout or stylesheets.
Hosted share link back
The response includes a shareUrl (plus pdfUrl and pngUrl) the agent pastes straight into the chat — the user opens a real, branded document, not raw Markdown.
Built for the agentic loop
Markdown is what models emit natively, so the render step drops into the agent's own workflow — GFM, tables, code blocks, and web fonts all render faithfully.
Build It
// The agent invokes the Rendex MCP tool with the content it just wrote.
{
"tool": "render_artifact",
"arguments": {
"content": "# Q2 Status Report\n\n**Owner:** Platform team\n\n| Metric | Q1 | Q2 |\n| --- | --- | --- |\n| Uptime | 99.94% | 99.98% |\n| p95 latency | 210ms | 180ms |\n\n- Shipped segmented Watch diff\n- Cut cold-start renders to sub-3s",
"inputFormat": "markdown",
"formats": ["pdf", "png"],
"branding": {
"accentColor": "#EA580C",
"logo": "https://yourcompany.com/logo.png",
"footer": "Confidential — Acme Robotics, Inc."
}
}
}
// -> { "data": { "pdfUrl": "...", "pngUrl": "...", "shareUrl": "...", "expiresAt": "..." } }# render_artifact wraps POST /v1/artifact under the hood.
curl -X POST https://api.rendex.dev/v1/artifact \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "# Q2 Status Report\n\n- Shipped segmented Watch diff",
"inputFormat": "markdown",
"formats": ["pdf", "png"],
"branding": { "accentColor": "#EA580C", "footer": "Confidential" }
}'
# -> { "data": { "pdfUrl": "...", "pngUrl": "...", "shareUrl": "...", "expiresAt": "..." } }100 free API calls/month — no credit card required. Get your API key and start building.
Reach for this when an agent's output should leave the chat as a real document — a weekly status report the user forwards to leadership, a proposal sent to a client, a meeting recap archived in a wiki. The friction it removes is the manual copy-paste-restyle-export loop that breaks every agentic workflow at the last step: the model can write the content perfectly but can't turn it into something shareable. render_artifact closes that gap with a single tool call, keeping the agent in control of the whole task. Because it takes the Markdown or HTML the model already produced plus a tiny branding object, the model doesn't have to think about layout or CSS — it describes the brand and Rendex handles the pixels, returning a hosted link it can paste back immediately. GFM, tables, code blocks, and web fonts all render faithfully, and it runs on the free 100 renders a month, so you can prove the flow before scaling it.