# FolioPDF MCP Server [](https://github.com/foliopdf/foliopdf-mcp/actions/workflows/ci.yml) [](https://github.com/foliopdf/foliopdf-mcp/releases/latest) [](LICENSE) PDF generation, manipulation, and extraction for AI agents. Single binary, renders locally, works offline. ## Install **Homebrew** ```bash brew install foliopdf/tap/foliopdf-mcp ``` **Go** ```bash go install github.com/foliopdf/foliopdf-mcp@latest ``` **Direct download** ```bash # macOS (Apple Silicon) curl -L https://github.com/foliopdf/foliopdf-mcp/releases/latest/download/foliopdf-mcp-darwin-arm64.tar.gz | tar xz sudo mv foliopdf-mcp /usr/local/bin/ # macOS (Intel) curl -L https://github.com/foliopdf/foliopdf-mcp/releases/latest/download/foliopdf-mcp-darwin-amd64.tar.gz | tar xz sudo mv foliopdf-mcp /usr/local/bin/ # Linux curl -L https://github.com/foliopdf/foliopdf-mcp/releases/latest/download/foliopdf-mcp-linux-amd64.tar.gz | tar xz sudo mv foliopdf-mcp /usr/local/bin/ ``` ## Setup Add to Claude Desktop (Settings → Developer → Edit Config): ```json { "mcpServers": { "foliopdf": { "command": "foliopdf-mcp" } } } ``` Restart Claude Desktop. Ask it to generate a PDF. ## Tools | Tool | What it does | |------|-------------| | `render_html` | HTML to PDF with Tailwind CSS v3, headers/footers, template variables | | `render_markdown` | Markdown to PDF with themes and syntax highlighting | | `manipulate_pdf` | Merge, split, or rotate PDFs | | `extract_pdf` | Extract text and metadata from a PDF | Every response includes the PDF as base64 data and a local file path. ## Features ### Tailwind CSS v3 Set `tailwind: true`. The full stylesheet is bundled in the binary — works offline. ```json {"html": "
Amount: {{.amount}}
", "data": {"company": "Acme Corp", "amount": "$1,234"} } ``` Supports `{{.variable}}`, `{{range .items}}...{{end}}`, `{{if .condition}}...{{end}}`. ### Headers and footers Repeating content on every page. Use `` and `` for page numbers. ```json { "header_html": "