CodePDF Model Context Protocol (MCP) Server, Skills & AI Plugins

Connect Claude, ChatGPT, Cursor and other AI agents to CodePDF over MCP (Streamable HTTP or stdio) to generate PDF templates, code and live previews.

Remote Streamable HTTP MCP Endpoint: https://codepdf.dev/api/mcp (zero local install required)

Sample Agent Prompt: “Use the CodePDF MCP server to create a modern SaaS invoice PDF template with KPI summary cards, a line-items table, and a QR payment code, detect my project tech stack, save the .pdftemplate and generated code, and ask me if I want to preview it.”

Copy-Paste Client Setup (Claude, ChatGPT, Codex, Gemini CLI, Cursor & VS Code)

Claude

# 1. Remote Streamable HTTP Connector (Claude Code)
claude mcp add --transport http codepdf https://codepdf.dev/api/mcp

# 2. claude.ai / Claude Desktop Custom Connector
# Settings -> Connectors -> Add custom connector -> https://codepdf.dev/api/mcp

# 3. Claude Code Plugin (Skill + /codepdf:generate-pdf + local stdio MCP)
claude --plugin-dir ./integrations/plugins/claude

ChatGPT & Codex

# 1. ChatGPT Apps SDK / Remote MCP Connector
MCP Server URL:  https://codepdf.dev/api/mcp
Widget Resource: ui://widget/codepdf-preview.html

# 2. Custom GPT Actions (OpenAPI 3.1.0 — hosted live)
Import from URL: https://codepdf.dev/.well-known/openapi.yaml
Action Endpoint: POST https://codepdf.dev/api/plugin/generate

# 3. OpenAI Codex Plugin (Agent Plugins 1.0)
# Load ./integrations/plugins/openai-codex (mcp.json + skills/codepdf/SKILL.md)

Gemini & Antigravity

# 1. Google Gemini CLI (Extension or Direct HTTP MCP)
gemini extensions link ./integrations/plugins/gemini-extension
# or add remote MCP directly:
gemini mcp add --transport http codepdf https://codepdf.dev/api/mcp

# 2. Google Antigravity (Plugin or mcp_config.json)
# Copy ./integrations/plugins/antigravity into .agents/plugins/codepdf/
# or add to ~/.gemini/config/mcp_config.json:
{
  "mcpServers": {
    "codepdf": {
      "url": "https://codepdf.dev/api/mcp"
    }
  }
}

Cursor, VS Code & Stdio

// 1. Zero-Install Remote Streamable HTTP (.cursor/mcp.json)
{
  "mcpServers": {
    "codepdf": {
      "url": "https://codepdf.dev/api/mcp"
    }
  }
}

// 2. VS Code / GitHub Copilot (.vscode/mcp.json)
{
  "servers": {
    "codepdf": {
      "type": "http",
      "url": "https://codepdf.dev/api/mcp"
    }
  }
}

// 3. Offline Local Stdio (requires cloned repo)
{
  "mcpServers": {
    "codepdf": {
      "command": "node",
      "args": ["/path/to/codepdf/bin/codepdf-mcp.mjs"]
    }
  }
}

OpenCode & Pi

// 1. OpenCode (opencode.json — Remote MCP + npm plugin)
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "codepdf": { "type": "remote", "url": "https://codepdf.dev/api/mcp", "enabled": true }
  }
}

# 2. Pi Coding Agent (pi.dev — native TypeScript extension + skill + prompt)
pi install ./integrations/packages/pi-codepdf
# Or after publishing to npm:
pi install npm:pi-codepdf

1-Call Creation JSON-RPC Example (create_template)

{
  "tool": "create_template",
  "arguments": {
    "documentType": "report",
    "layoutMode": "flow",
    "techStack": {
      "runtime": "Node.js",
      "framework": "react",
      "dependencies": [
        "react",
        "@react-pdf/renderer"
      ]
    },
    "folder": "templates",
    "companyName": "ACME CLOUD",
    "title": "Q4 Platform Reliability Report — {{quarter}}",
    "pills": [
      "Production",
      "SLA {{slaPercent}}"
    ],
    "qrValue": "https://status.example.com/q4",
    "kpis": [
      {
        "label": "Uptime",
        "value": "{{slaPercent}}",
        "subtext": "+0.04% QoQ"
      },
      {
        "label": "P95 Latency",
        "value": "{{p95Latency}}",
        "subtext": "Global Edge"
      }
    ],
    "fields": [
      {
        "name": "quarter",
        "label": "Quarter",
        "type": "string",
        "sampleValue": "Q4 2026"
      },
      {
        "name": "slaPercent",
        "label": "SLA Uptime",
        "type": "string",
        "sampleValue": "99.98%"
      },
      {
        "name": "p95Latency",
        "label": "P95 Latency",
        "type": "string",
        "sampleValue": "42 ms"
      }
    ],
    "sections": [
      {
        "heading": "Key Highlights",
        "bullets": [
          "Zero P0 incidents across 90 days",
          "Automated multi-region failover"
        ],
        "callout": {
          "title": "Note",
          "body": "Escape literal template syntax as \\{{var}}.",
          "tone": "info"
        }
      }
    ]
  }
}

All 3 Exposed MCP Tools

  • create_template (1-Call Create) — End-to-end template creation in 1 call: adapts to the current project codebase (language TS/JS, ESM/CJS, package manager, existing PDF imports, domain models, and test runner), classifies static vs. dynamic values, builds the multi-page Flexbox flow (or gallery) AST, infers dataModel & Draft 2020-12 jsonSchema, structures template code into one file (kept in the same folder as .pdftemplate) or one dedicated template folder, keeps any PDF tests in a separate folder (testsFolder), and never uploads automatically. Parameters: documentType?, templateSlug?, title?, subtitle?, companyName?, accentColor?, pills?, qrValue?, kpis?, fields?, table?, tables?, sections?, footerText?, pageSize?, orientation?, layoutMode?, library?, techStack?, projectContext?, codeStructure? ("file"|"folder"), folder?, templatePath?, codePath?, testsFolder?, includeTests?, compress?, fontFamily?, fonts?, disableBindings?, saveToProject?
  • edit_template (Edit or Bootstrap) — Edits an existing .pdftemplate incrementally (Path A) without losing untouched components — or supports inspectOnly: true to decrypt and inspect fields/outline first. If no .pdftemplate exists yet but existing PDF generation code is present (Path B), bootstraps a canonical .pdftemplate + project-aligned updated code + JSON Schema in the same folder (or dedicated template folder) and keeps any PDF tests strictly in a separate folder (never uploads automatically). Parameters: sourceMode? ("auto"|"pdftemplate"|"from_existing_code"), inspectOnly?, templatePath? | existingPdftemplate? | project?, sourceCodePath?, existingCode?, query?, library?, techStack?, projectContext?, codeStructure? ("file"|"folder"), title?, subtitle?, accentColor?, pills?, qrValue?, kpis?, fields?, table?, tables?, sections?, footerText?, removeSectionHeadings?, removeComponentIds?, edits?, folder?, codePath?, testsFolder?, includeTests?, regenerateCode?, saveToProject?
  • share_template (Opt-In Share) — Zero-knowledge AES-GCM encryption for live browser PDF previews (mode="preview", 1–7 days) and team share links (mode="share", 1–30 days). Only called when the user explicitly opts in; decryption passwords are never included in URLs. Parameters: mode? ("preview"|"share"), project? | existingPdftemplate? | templatePath? | templateSlug?, query?, passcode? (min 12 chars), ttlDays?, openBrowser?

MCP Resources, Guided Prompts & Discovery Endpoints

  • codepdf://templates/catalog (application/json) — Cacheable JSON catalog of all built-in CodePDF gallery templates, categories, and data models.
  • codepdf://libraries/matrix (application/json) — Capability matrix covering all 22 PDF targets, 8 runtimes, install commands, and flow-layout support.
  • ui://widget/codepdf-preview.html (text/html+mcp) — Sandboxed HTML UI card for ChatGPT Apps SDK & MCP Apps displaying code, encrypted preview link, password, and share CTA.
  • Prompt create-pdf-template (documentType (required), library?, folder?, codeStructure?) — Step-by-step creation workflow: inspect current project code, classify static vs. dynamic values, structure code into one file (same folder as .pdftemplate) or one folder, keep PDF tests in a separate folder, and offer opt-in preview/share.
  • Prompt edit-pdf-template (instruction (required), templatePath?) — Guided editing workflow: patch an existing .pdftemplate incrementally (Path A) or bootstrap one from existing PDF generation code (Path B), aligned with current project conventions and separate PDF test folder.
  • GET / POST https://codepdf.dev/api/mcp — Cloudflare Streamable HTTP MCP server (JSON-RPC 2.0 with 3 tools + CDN-cached GET discovery & resource reads).
  • GET https://codepdf.dev/api/mcp?resource=templates&query=invoice&limit=10 — Zero-auth cached catalog search (also supports ?resource=libraries&runtime=py and ?resource=codepdf://libraries/matrix).
  • POST https://codepdf.dev/api/plugin/generate — Direct REST action for ChatGPT Custom GPTs and HTTP agents (template + code + encrypted live preview).
  • GET https://codepdf.dev/.well-known/mcp.json — Machine-readable MCP server discovery manifest (transports, tools, runtimes, capabilities).
  • GET https://codepdf.dev/.well-known/openapi.yaml — OpenAPI 3.1.0 specification for ChatGPT Actions and automated HTTP tool generation.
  • GET https://codepdf.dev/.well-known/ai-plugin.json — Standard AI plugin manifest linking to OpenAPI spec and legal/brand metadata.
  • GET https://codepdf.dev/llms.txt — LLM index (plus /llms-full.txt for the full 100-template machine-readable catalog).

Consolidated Plugins, Skills & Agent Packages

  • Universal Agent Skill (integrations/skills/codepdf/ · Claude Code, Codex, Gemini CLI, Antigravity, Cursor, OpenCode, Pi) — Portable SKILL.md with 1-call MCP fast path + zero-dependency REST fallback script.
  • Claude Plugin (integrations/plugins/claude/ · Claude Code, Claude Desktop, claude.ai) — Plugin manifest, /codepdf:generate-pdf command, Skill, local stdio MCP & Cloudflare Worker.
  • ChatGPT Plugin (integrations/plugins/chatgpt/ · ChatGPT Apps SDK & Custom GPT Actions) — Interactive HTML preview widget, OpenAPI 3.1 schema, GPT instructions & Cloudflare Worker.
  • Gemini CLI Extension (integrations/plugins/gemini-extension/ · Google Gemini CLI) — gemini-extension.json, GEMINI.md context playbook, /codepdf:generate TOML command & remote MCP.
  • Antigravity Plugin (integrations/plugins/antigravity/ · Google Antigravity IDE & CLI) — plugin.json, Streamable HTTP mcp_config.json, rules/AGENTS.md & bundled codepdf skill.
  • OpenAI Codex Plugin (integrations/plugins/openai-codex/ · OpenAI Codex CLI & Agent Plugins 1.0) — Agent Plugins 1.0 manifest (+ .codex-plugin compat), mcp.json & bundled codepdf skill.
  • Cursor Plugin (integrations/plugins/cursor/ · Cursor IDE) — .cursor-plugin/plugin.json, Streamable HTTP mcp.json, .mdc rule & bundled codepdf skill.
  • VS Code / Copilot Pack (integrations/plugins/vscode-copilot/ · VS Code & GitHub Copilot Agent Mode) — .vscode/mcp.json HTTP server definition, copilot-instructions.md & bundled skill.
  • OpenCode Plugin Package (integrations/packages/opencode/ · OpenCode (opencode.ai)) — Publishable npm plugin (opencode-codepdf), remote MCP opencode.json & bundled skill.
  • Pi Coding Agent Package (integrations/packages/pi-codepdf/ · Pi Coding Agent (pi.dev)) — Publishable npm pi-package with native TypeScript ExtensionAPI tools, prompt & bundled skill.

Browse 100 Built-In Templates | Compare 22 PDF Libraries | LLMs Index | Full LLM Catalog