Model Context Protocol
Connect Leafwright to your AI tools.
The Leafwright MCP server lets Claude, ChatGPT, Cursor, and Codex render PDFs, build templates, and debug failed renders from logs — no headless Chrome, no code to deploy. The agent calls a tool and gets a real signed PDF URL back.
Leafwright’s Claude and OpenAI plugin directory submissions are awaiting approval (last checked October 10, 2026). You can connect now using the direct MCP options below, or install the Claude Code plugin from its public GitHub marketplace.
Claude — add a custom connector
Connect to Leafwright’s hosted MCP server directly. Add it manually in Claude; a marketplace listing is not required.
https://leafwright.co/mcp- Open Customize → Connectors → + Add → Add custom connector in Claude.
- Name it Leafwright and enter https://leafwright.co/mcp as the remote MCP server URL.
- Choose OAuth authentication. If Claude shows an OAuth client choice, select Register automatically; leave custom client ID and client secret empty.
- Finish adding the connector, then connect and sign in to Leafwright. Choose your organization and default project, and approve access.
- Enable Leafwright for your conversation from + → Connectors.
On Team and Enterprise plans, an owner first adds the connector in Organization settings → Connectors. Follow Claude’s custom connector guide for your account’s available setup options.
ChatGPT — add a custom MCP plugin
- Open ChatGPT → Plugins, select +, then Add custom MCP server.
- Name it Leafwright, add a description, and enter https://leafwright.co/mcp as the public server URL.
- Choose OAuth authentication, review the access notice, and create the custom plugin.
- Review the discovered tools, install the custom plugin, and sign in to Leafwright when prompted. Choose your organization and default project.
- Start a new conversation, type @, and select your Leafwright custom plugin.
Custom MCP access depends on your account and workspace permissions. If Add custom MCP server is unavailable, ask your workspace admin. Follow the OpenAI setup guide for the options available to your account.
What the agent can do
Auth and context
leafwright_login— Start browser login.leafwright_auth_status— Complete or check browser login.leafwright_logout— Revoke and clear local MCP auth.leafwright_list_organizations— List the token's organization.leafwright_list_projects— List projects in the organization.leafwright_select_project— Set the active project.
ReadAvailable after auth, no side effects.
leafwright_list_templates— List the project's templates.leafwright_get_template— Fetch one template with drafts and versions.leafwright_validate_template— Validate a template before rendering.leafwright_get_job— Render job status and metadata.leafwright_get_job_logs— Render logs — failed assets, fonts, timeouts, overflow.leafwright_get_usage— Credits used and remaining this period.leafwright_estimate_usage_cost— Estimate credits and overage for a planned batch.
WriteHidden when LEAFWRIGHT_MCP_READ_ONLY=true.
leafwright_render_html— Render raw HTML to a PDF (signed URL).leafwright_render_url— Render a public URL to a PDF (SSRF-protected).leafwright_render_template— Render a published template with JSON data.leafwright_create_template— Create a draft template.leafwright_update_template_draft— Update a draft's HTML, CSS, or sample data.leafwright_ai_generate_template— Generate a draft template from a prompt.leafwright_ai_revise_template— Revise a draft from an instruction.leafwright_ai_fix_from_logs— Repair a template from a failed render's logs.
The debugging loop
A code-only agent can't see its PDF. This server closes that loop:
- The agent renders a template — it fails or looks wrong.
- It calls
leafwright_get_job_logsand reads the real cause: a font that 404'd, an asset that timed out, a rule that overflowed the page. - It calls
leafwright_ai_fix_from_logs, gets a corrected template, re-renders, and confirms it's clean.
Safe by design
The server only calls the public Leafwright API. It runs no shell commands from agent input, stores tokens in the OS keychain when possible, and supports a read-only mode. AI drafts and revises templates; publishing always requires a human in the dashboard.