tsayles/branded-pdf-service
Self-hosted Docker service: Markdown → branded, print-ready PDF via Pandoc + Typst. REST API and MCP tool interface for AI agents and automation pipelines.
Platform-specific configuration:
{
"mcpServers": {
"branded-pdf-service": {
"command": "npx",
"args": [
"-y",
"branded-pdf-service"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
A self-hosted, agent-friendly Markdown-to-PDF rendering service with pluggable brand templates.
[](https://github.com/tsayles/branded-pdf-service/actions/workflows/ci.yml) [](LICENSE)
---
Primary users: AI agents and automation pipelines.
This service is designed to be called by agentic workers -- Claude, GPT-based agents, LangChain pipelines, CI/CD workflows -- that need to produce branded, print-ready PDFs from Markdown without human involvement. Every design decision optimizes for machine-friendly operation:
python -m app.mcp_server)POST /render returns the PDF bytes directlyHuman operators configure and maintain the service; agents are the primary callers at runtime.
---
# Build the image
docker build -t branded-pdf-service:latest .
# Run (open mode — no auth)
docker run -d \
--name branded-pdf \
-p 8100:8000 \
-v ./brands/acme-corp:/brands/acme-corp \
branded-pdf-service:latestRender a document (open mode — no auth header needed):
curl -s -X POST http://localhost:8100/render \
-H "Content-Type: application/json" \
-d '{"brand":"acme-corp","markdown":"# Hello World\n\nThis is a test."}' \
-o output.pdf# With auth enabled (PDF_API_KEYS set)
curl -s -X POST http://localhost:8100/render \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-api-key>" \
-d '{"brand":"acme-corp","markdown":"# Hello World\n\nThis is a test."}' \
-Loading reviews...