API Keg — PDF Forge & Layout Diagnostics

Compile Markdown or HTML into themed multi-page PDFs with layout QA and inspect binary PDFs.

Should I use this

Quality & Safety

B
Description quality
95%
Schema completeness
97%
Naming quality
87%
Poisoning risk
40%
Permission match
100%
Protocol compliance
100%

Findings (5)

  • HIGHTool poisoning patterns detected
  • MEDIUMTool description contains URL to non-standard domainin render_document_pdf
  • MEDIUMTool description contains URL to non-standard domainin inspect_pdf_document
  • MEDIUMTool description contains URL to non-standard domainin account_create_checkout
  • LOWTool 'account_rotate_api_key' description lacks action verbin account_rotate_api_key

Based on automated analysis of tool definitions and protocol compliance.

Context Cost

~1,807Tokens (tool definitions)
~2.2 KBTypical response size
Moderate attention impact (1.41% of 128k context)

This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.

Install

One-Click Install

Add this to your `claude_desktop_config.json` file:

{
  "mcpServers": {
    "pdf-forge": {
      "url": "https://pdf-forge.apikeg.com/mcp"
    }
  }
}

Remote endpoints

https://pdf-forge.apikeg.com/mcpstreamable-http

What it can do

Tool inventory

Tools (6)

🟢 Read-only🟡 Write🔴 Delete⚪ Unknown
🟢render_document_pdf(content, contentFormat, title, subtitle, author, ...)

Compiles Markdown (headings, bold/italic/code, lists, GFM tables, callouts, '---pagebreak---') or HTML into both print-ready themed HTML and a spec-compliant multi-page PDF 1.7 binary with running headers, 'Page X of Y' footers, repeated table headers across page breaks, optional watermark, and deterministic layoutDiagnostics. Pricing: $0.004 USD per rendered PDF document (x402 instant micropayment). Defaults to HTTP 402 (x402); if your client lacks 402 support, sign in via MCP OAuth or subscribe at https://apikeg.com/account. Pass ?dry_run=true on REST to validate schema free.

Input Schema

{
  "type": "object",
  "properties": {
    "content": {
      "type": "string",
      "minLength": 1,
      "maxLength": 524288,
      "description": "Markdown (headings, bold/italic/code, lists, GFM tables, callouts, '---pagebreak---') or raw HTML body to compile."
    },
    "contentFormat": {
      "type": "string",
      "enum": [
        "markdown",
        "html"
      ],
      "default": "markdown",
      "description": "Input syntax format ('markdown' or 'html')."
    },
    "title": {
      "type": "string",
      "maxLength": 240,
      "description": "Optional document title rendered in the cover banner and stored in PDF /Title metadata."
    },
    "subtitle": {
      "type": "string",
      "maxLength": 320,
      "description": "Optional subtitle rendered below the title and stored in PDF /Subject metadata."
    },
    "author": {
      "type": "string",
      "maxLength": 160,
      "description": "Optional author or organization name rendered in the cover banner and PDF /Author metadata."
    },
    "theme": {
      "type": "string",
      "enum": [
        "executive",
        "invoice",
        "technical",
        "memo"
      ],
      "default": "executive",
      "description": "Corporate print styling theme ('executive', 'invoice', 'technical', or 'memo')."
    },
    "pageSize": {
      "type": "string",
      "enum": [
        "Letter",
        "A4",
        "Legal"
      ],
      "default": "Letter",
      "description": "Paper size ('Letter', 'A4', or 'Legal')."
    },
    "orientation": {
      "type": "string",
      "enum": [
        "portrait",
        "landscape"
      ],
      "default": "portrait",
      "description": "Page orientation ('portrait' or 'landscape')."
    },
    "headerText": {
      "type": "string",
      "maxLength": 180,
      "description": "Optional running header stamped at the top margin of every page."
    },
    "includePageNumbers": {
      "type": "boolean",
      "default": true,
      "description": "Include 'Page X of Y' running footers on every page."
    },
    "watermarkText": {
      "type": "string",
      "maxLength": 80,
      "description": "Optional diagonal watermark text rendered across every page (e.g. 'CONFIDENTIAL' or 'DRAFT')."
    },
    "apiKey": {
      "type": "string",
      "minLength": 10,
      "maxLength": 256,
      "description": "Optional API Keg Bearer key (ak_live_... or ak_oauth_...) returned by account_verify_and_checkout when your MCP client does not send an Authorization HTTP header."
    }
  },
  "required": [
    "content"
  ],
  "additionalProperties": false
}
🟢inspect_pdf_document(pdfBase64, apiKey)

Parses a Base64-encoded PDF binary to verify %PDF header/EOF integrity and extract pdfVersion, exact pageCount, byteLength, encryption status, AcroForm presence, and Info dictionary metadata. Pricing: $0.001 USD per PDF binary inspection (x402 instant micropayment). Defaults to HTTP 402 (x402); if your client lacks 402 support, sign in via MCP OAuth or subscribe at https://apikeg.com/account. Pass ?dry_run=true on REST to validate schema free.

Input Schema

{
  "type": "object",
  "properties": {
    "pdfBase64": {
      "type": "string",
      "minLength": 8,
      "maxLength": 5242880,
      "description": "Base64-encoded PDF binary (standard or URL-safe Base64, optional 'data:application/pdf;base64,' prefix)."
    },
    "apiKey": {
      "type": "string",
      "minLength": 10,
      "maxLength": 256,
      "description": "Optional API Keg Bearer key (ak_live_... or ak_oauth_...) returned by account_verify_and_checkout when your MCP client does not send an Authorization HTTP header."
    }
  },
  "required": [
    "pdfBase64"
  ],
  "additionalProperties": false
}
🟡account_send_verification_code(email)

Free ($0.00). Sends a 9-character verification code (AAA-AAA-AAA) to the user's email address to register, sign in, or view their current ak_live_... API key without rotating it. Ask for the email and resulting code using your built-in interactive question tool (AskUserQuestion / ask_question).

Input Schema

{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "minLength": 5,
      "maxLength": 254,
      "description": "User's email address to receive the 9-character verification code."
    }
  },
  "required": [
    "email"
  ],
  "additionalProperties": false
}
🟡account_verify_and_checkout(email, code, tierId, createCheckout, rotateApiKey)

Free ($0.00). Verifies the 9-character email code from account_send_verification_code, returns the user's current ak_live_... API key on the first call (even if already registered, without rotating their key!), and optionally creates a direct Stripe Checkout URL for "pdf-forge" ($5, $20, or $50/mo).

Input Schema

{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "minLength": 5,
      "maxLength": 254,
      "description": "The same email address passed to account_send_verification_code."
    },
    "code": {
      "type": "string",
      "minLength": 9,
      "maxLength": 16,
      "description": "9-character verification code (AAA-AAA-AAA) from the user's email."
    },
    "tierId": {
      "type": "string",
      "enum": [
        "starter_5",
        "growth_20",
        "scale_50"
      ],
      "default": "starter_5",
      "description": "Monthly plan for this API: starter_5 ($5/mo = $6 credit), growth_20 ($20/mo = $28 credit), or scale_50 ($50/mo = $80 credit)."
    },
    "createCheckout": {
      "type": "boolean",
      "default": true,
      "description": "Set false when the user only wants to view their current ak_live_... API key without generating a Stripe Checkout session."
    },
    "rotateApiKey": {
      "type": "boolean",
      "default": false,
      "description": "Leave false (default) to return the user's existing ak_live_... key unchanged. Set true only if the user explicitly wants to revoke and replace their key."
    }
  },
  "required": [
    "email",
    "code"
  ],
  "additionalProperties": false
}
🟡account_create_checkout(tierId, apiKey)

Free ($0.00). Generates a direct Stripe Checkout URL (https://checkout.stripe.com/...) for "pdf-forge" ($5, $20, or $50/mo) using either the connected Authorization header or an apiKey.

Input Schema

{
  "type": "object",
  "properties": {
    "tierId": {
      "type": "string",
      "enum": [
        "starter_5",
        "growth_20",
        "scale_50"
      ],
      "default": "starter_5",
      "description": "Monthly plan to activate or upgrade to: starter_5 ($5/mo = $6 credit), growth_20 ($20/mo = $28 credit), or scale_50 ($50/mo = $80 credit)."
    },
    "apiKey": {
      "type": "string",
      "minLength": 10,
      "maxLength": 256,
      "description": "Optional ak_live_... or ak_oauth_... key when no Authorization header is configured on the MCP client."
    }
  },
  "additionalProperties": false
}
🔴account_rotate_api_key(apiKey)

Free ($0.00). Rotates the user's ak_live_... API key immediately without requiring an email verification code, authenticating with either the connected Authorization header or the current apiKey.

Input Schema

{
  "type": "object",
  "properties": {
    "apiKey": {
      "type": "string",
      "minLength": 10,
      "maxLength": 256,
      "description": "Current ak_live_... or ak_oauth_... Bearer key when no Authorization header is configured on the MCP client."
    }
  },
  "additionalProperties": false
}

Community

Rate this Server

Evidence

Recent observations

verifiedversion not recorded6 tools