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"
}
}
]
}
}