MCP Server
Create PDFs from a conversation in Claude, Codex, Cursor, Antigravity or GitHub Copilot. Your assistant finds a starting design, edits the content and previews the result; BonniePDF handles layout and rendering.
Follow the MCP tutorial to customise an invoice and reuse it in TypeScript.
Connect your assistant
Choose your assistant. Fully quit and reopen it afterwards, then approve BonniePDF if prompted.
Run this in a terminal, then start a new Claude Code session.
claude mcp add --scope user bonniepdf -- npx -y --package https://github.com/bonniepdf/BonniePDF-MCP/releases/latest/download/bonniepdf-mcp.tgz bonniepdf-mcpDownload the extension and open it. Claude Desktop asks you to confirm, then BonniePDF is ready to use.
Prefer to edit the configuration yourself? Use the entry under Other clients.
Run this in a terminal, then restart Codex.
codex mcp add bonniepdf -- npx -y --package https://github.com/bonniepdf/BonniePDF-MCP/releases/latest/download/bonniepdf-mcp.tgz bonniepdf-mcpInstall in one click, then approve BonniePDF when Cursor asks.
Or add this to ~/.cursor/mcp.json:
{
"mcpServers": {
"bonniepdf": {
"command": "npx",
"args": [
"-y",
"--package",
"https://github.com/bonniepdf/BonniePDF-MCP/releases/latest/download/bonniepdf-mcp.tgz",
"bonniepdf-mcp"
]
}
}
}Install in one click, then trust the server and enable its tools in agent mode.
Or from a terminal:
code --add-mcp '{"name":"bonniepdf","command":"npx","args":["-y","--package","https://github.com/bonniepdf/BonniePDF-MCP/releases/latest/download/bonniepdf-mcp.tgz","bonniepdf-mcp"]}'Add this to ~/.zcode/cli/config.json, then start a new ZCode session. Local servers connect automatically.
{
"mcp": {
"servers": {
"bonniepdf": {
"command": "npx",
"args": [
"-y",
"--package",
"https://github.com/bonniepdf/BonniePDF-MCP/releases/latest/download/bonniepdf-mcp.tgz",
"bonniepdf-mcp"
]
}
}
}
}For a single project, put the same entry in .zcode/config.json in the repository instead.
Add this entry to your client’s MCP configuration. It works with Antigravity, Copilot CLI, Gemini CLI, Windsurf and any client that starts local MCP servers. Visual Studio uses a servers key instead of mcpServers; ZCode nests the entry under mcp.servers in ~/.zcode/cli/config.json.
{
"mcpServers": {
"bonniepdf": {
"command": "npx",
"args": [
"-y",
"--package",
"https://github.com/bonniepdf/BonniePDF-MCP/releases/latest/download/bonniepdf-mcp.tgz",
"bonniepdf-mcp"
]
}
}
}No Node.js or terminal needed. The installer includes everything the server needs and connects Claude Code, Claude Desktop, Codex, Antigravity, ZCode and Copilot (VS Code, Visual Studio and CLI) in one step. It installs for the current user without administrator rights, and existing settings are preserved.
Use Connect assistants in the Start menu to add another assistant later, or Test connection to check the server.
Command and one-click options need Node.js 24 or later. The Windows installer includes it.
Using Claude? Use a local session: a cloud session cannot launch the server installed on your PC. You do not need to attach the source repository.
For development or a source build, see Build from source.
Try your first request
Paste this into a new conversation:
AI prompt
Use the BonniePDF MCP tools to find an editable invoice example. Clone it, change the customer to Northwind Traders, then show me a PNG preview and save the PDF. If BonniePDF tools are unavailable, stop and tell me.
You can then ask for changes to the customer, line items, colours or layout. Ask the assistant to export the JSON definition when you want to reuse the document in your application.
Use with TypeScript
Export your finished layout as JSON and load it with fromDefinition in your TypeScript application. The invoice tutorial covers the complete workflow.
Ask your assistant to export native TypeScript code when you want to continue with BonniePDF’s document-building API. The export includes your edits and embedded resources. See native code export for details.
Your files and connection
Connections save documents and sessions beneath %LOCALAPPDATA%/BonniePDF/MCP/clients/ on Windows. Ask your assistant to list saved documents to continue after restarting.
The installer and setup commands back up existing configuration files before changing them. Uninstall removes unchanged connections managed by BonniePDF and preserves your documents, sessions, backups and other servers.
If tools are missing, check that the correct assistant was configured and fully restart it. Installer users can run Test connection. A successful server test does not confirm the assistant has approved the connection.
Go further
- Invoice tutorial: edit, preview and export a complete document.
- Advanced usage: fewer tool calls, smaller-model profiles, tool reference, configuration and troubleshooting.
- Examples gallery: explore starting designs.
The server runs locally over stdio and needs no BonniePDF account or AI API key. Content and previews are shared with your chosen assistant. The MCP server is Apache-2.0 licensed; rendering uses the applicable BonniePDF library licence.