MCP Integration

The Model Context Protocol (MCP) enables AI coding assistants to interact directly with docpenny’s PDF generation engine. Once configured, your assistant can list templates, submit jobs, check credits, and retrieve generated documents — all from your editor or terminal.

Prerequisites

  • A docpenny account with an active API key
  • An AI coding harness that supports the Streamable HTTP MCP transport

Creating an API Key

  1. Go to Settings → API Keys in the docpenny dashboard
  2. Click Create New Key, give it a descriptive name (e.g., “MCP Assistant”)
  3. Copy the key immediately — it will not be shown again

MCP Endpoint

The MCP server is available at:

  • Production: https://mcp.docpenny.com/mcp

Every request requires the x-api-key header:

x-api-key: <your_api_key>

Available Tools

Once connected, your assistant has access to six tools:

ToolDescription
list_templatesList available PDF templates with optional pagination. Use source="system" to see pre-built system templates.
get_templateGet detailed information about a specific template, including its variables and JSON schema.
submit_jobSubmit a new PDF generation job using a template and JSONL data. Each line in the data array produces one PDF.
get_jobGet the status and progress of a PDF generation job, including task counts.
get_creditsCheck the organization’s credit balance, including paid and promotional credits.
generate_previewGenerate a watermarked preview PDF (no credits consumed) for one-time download.

Harness Configuration

Select your AI coding assistant for step-by-step setup:

en