Documentation
MCP for AI agents
Connect Claude, Cursor or VS Code to PdfPilot24 through the Model Context Protocol.
PdfPilot24 runs an MCP server so an agent can generate invoices, reports and screenshots without custom integration code. There are two transports: a local stdio package for desktop clients, and a hosted Streamable HTTP endpoint.
Tools
| Tool | Does |
|---|---|
pdfpilot_render_html | HTML + CSS → PDF |
pdfpilot_render_url | Public URL → PDF |
pdfpilot_render_markdown | Markdown → PDF |
pdfpilot_screenshot | HTML or URL → PNG |
pdfpilot_account | Plan, balance and limits |
Install (Claude Desktop, Cursor, VS Code)
The stdio package is in packages/mcp of the repository. It is not on npm yet, so point the client at the checked-out entry file. The server writes PDFs to PDFPILOT_OUTPUT_DIR and returns the absolute path to the agent.
{
"mcpServers": {
"pdfpilot24": {
"command": "node",
"args": ["/path/to/pdfpilot24.com/packages/mcp/src/index.js"],
"env": {
"PDFPILOT_API_KEY": "pp24_live_...",
"PDFPILOT_OUTPUT_DIR": "/Users/you/Documents/pdfpilot"
}
}
}
}Claude Desktop uses claude_desktop_config.json; Cursor uses .cursor/mcp.json in the project. Restart the client after editing.
Hosted endpoint
Clients that support Streamable HTTP can skip the local process and call the API directly. The same API key authenticates the connection.
curl -X POST https://www.pdfpilot24.com/api/mcp \
-H "Authorization: Bearer $PDFPILOT_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"capabilities": {},
"clientInfo": { "name": "my-agent", "version": "1.0.0" }
}
}'curl -X POST https://www.pdfpilot24.com/api/mcp \
-H "Authorization: Bearer $PDFPILOT_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "pdfpilot_render_html",
"arguments": {
"html": "<h1>Invoice 1042</h1>",
"paper": "A4"
}
}
}'What comes back
A text summary (pages, credits charged, remaining balance, request id) and a resource block containing the file as base64. The local stdio server writes the file to disk instead, so agents can reference a real path.
Metering and safety
- Every render is charged per page, exactly like the REST API. Failed renders are free.
- Test keys work and are never charged — use them while wiring an agent.
- Rate limits and plan page limits apply to MCP calls.
- The remote endpoint is POST-only; there is no server-initiated SSE stream.
- Keep the API key in the MCP client config, never in a prompt or a repository.
Need something not covered? Contact support.