{
  "markdown": "# @pdfbroker/mcp-server\r\n\r\nGenerate PDFs from HTML using AI agents via [PdfBroker.io](https://www.pdfbroker.io).\r\n\r\nThis package connects Claude Desktop, Cursor, and other MCP clients to the\r\nPdfBroker.io cloud PDF generation API.\r\n\r\n## Setup\r\n\r\n1. Sign up at [pdfbroker.io](https://www.pdfbroker.io/signup)\r\n2. Go to **Members → API Credentials** and copy your Client ID and Client Secret\r\n3. Add to your Claude Desktop config (`Settings → Developer → Edit Config`):\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"pdfbroker\": {\r\n      \"command\": \"npx\",\r\n      \"args\": [\"-y\", \"@pdfbroker/mcp-server\"],\r\n      \"env\": {\r\n        \"PDFBROKER_CLIENT_ID\": \"pb_cid_your_id_here\",\r\n        \"PDFBROKER_CLIENT_SECRET\": \"pb_sec_your_secret_here\"\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n4. Restart Claude Desktop\r\n\r\n## Available Tools\r\n\r\n- **html_to_pdf** — Convert HTML/CSS to PDF using WeasyPrint (PDF/A, PDF/UA support)\r\n- **html_to_pdf_wk** — Convert HTML to PDF using wkhtmltopdf (JS support, free tier)\r\n\r\nBoth tools accept:\r\n\r\n- **`html` or `url`** — the document, either inline or as an https address PdfBroker fetches\r\n  for you. Exactly one is needed; `url` wins if both are given. Passing a URL keeps a large\r\n  template out of the conversation entirely.\r\n- **`pdfForms`** — set to `true` for a fillable PDF, where `<input>`, `<select>` and\r\n  `<textarea>` become interactive form fields. Works on both engines.\r\n- **`paperSize` / `orientation`** — both default to `Auto`, which leaves the page to the\r\n  document's own `@page { size: ... }` CSS on WeasyPrint (A4 portrait when it says nothing).\r\n  Name a size to override the document. Note that wkhtmltopdf does not honour CSS `@page`\r\n  geometry — use `html_to_pdf` when the stylesheet must decide.\r\n- **`extraArguments`** — a string-to-string map of engine flags for anything without a\r\n  dedicated parameter.\r\n- **`resources`** — base64-encoded files keyed by relative path, for embedded images and\r\n  custom fonts. Has no effect on a `url` render, where relative paths resolve against the\r\n  document's own URL.\r\n\r\nConnected clients can read the full argument list from the\r\n`docs://pdfbroker/api-reference` resource the server exposes.\r\n\r\n## Example\r\n\r\nAsk Claude: *\"Create a PDF invoice for Acme Corp with 3 line items\"*\r\n\r\nClaude will generate HTML, call the `html_to_pdf` tool, and return a download link for the PDF.\r\n\r\n## Cursor / VS Code\r\n\r\nAdd to `.vscode/mcp.json`:\r\n\r\n```json\r\n{\r\n  \"servers\": {\r\n    \"pdfbroker\": {\r\n      \"command\": \"npx\",\r\n      \"args\": [\"-y\", \"@pdfbroker/mcp-server\"],\r\n      \"env\": {\r\n        \"PDFBROKER_CLIENT_ID\": \"pb_cid_your_id_here\",\r\n        \"PDFBROKER_CLIENT_SECRET\": \"pb_sec_your_secret_here\"\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n## Claude Code\r\n\r\nClaude Code supports direct HTTP connections — no wrapper needed:\r\n\r\n```bash\r\nclaude mcp add-json pdfbroker '{\r\n  \"type\": \"http\",\r\n  \"url\": \"https://mcp.pdfbroker.io/\",\r\n  \"headers\": {\r\n    \"X-PdfBroker-ClientId\": \"pb_cid_your_id_here\",\r\n    \"X-PdfBroker-ClientSecret\": \"pb_sec_your_secret_here\"\r\n  }\r\n}'\r\n```\r\n\r\n## Requirements\r\n\r\n- Node.js 18+\r\n- PdfBroker.io account with API credentials\r\n\r\n## Environment Variables\r\n\r\n| Variable | Required | Description |\r\n|----------|----------|-------------|\r\n| `PDFBROKER_CLIENT_ID` | Yes | Your Client ID from pdfbroker.io |\r\n| `PDFBROKER_CLIENT_SECRET` | Yes | Your Client Secret from pdfbroker.io |\r\n\r\n> Note: earlier versions accepted a `PDFBROKER_MCP_URL` override. As of `1.1.0` the\r\n> server URL is fixed at `https://mcp.pdfbroker.io/` (the MCP server is hosted-only).\r\n> If the variable is still set in your environment the wrapper logs a warning and\r\n> ignores it.",
  "bytes": 3634,
  "sha": "caf1117976a3529affd898cd04c59bc3e7b130798ac76071731bb216248bc53a",
  "repo_slug": "",
  "fonte": "npm",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_pdfbroker_pdf_4dac89af/readme"
}