# API Keg — PDF Forge & Layout Diagnostics

> API Keg — PDF Forge & Layout Diagnostics is a freemium MCP server for files and documents. Markdown and HTML to themed multi-page PDFs, plus PDF inspection, for agents. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Starting price:** $5 a month
- **Platforms:** API, Web
- **Website:** https://pdf-forge.apikeg.com/llms.txt
- **MCP Registry name:** com.apikeg/pdf-forge
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents), [document processing](https://ai-powered.com/categories/document-processing)
- **Listing updated:** 2026-12-01

## About

Pass in Markdown or HTML and get back a styled PDF 1.7 file with running headers, page-numbered footers, repeated table headers across page breaks, and an optional diagonal watermark. Four built-in themes (executive, invoice, technical, memo) set the look without any template work.

Every render also returns a layout report that flags orphaned trailing pages, tables wider than the page, and broken images, so problems can be caught before a document goes out. A separate tool parses an existing Base64-encoded PDF and reports its version, page count, byte length, encryption status, form fields and Info dictionary metadata.

The server is aimed at AI agents and backend teams that need reports, invoices or memos generated on demand. It can be reached over streamable HTTP with pay-per-request x402 payments, or with a monthly API key, and a dry-run flag validates payloads without charge.

## Features

- **Markdown and HTML compilation:** Converts headings, lists, GFM tables, callouts and explicit page breaks into a multi-page PDF.
- **Built-in corporate themes:** Offers executive, invoice, technical and memo styles selectable per render.
- **Layout diagnostics:** Reports orphan trailing pages, wide tables and broken images alongside each render.
- **Table header continuation:** Repeats table headers automatically when a table breaks across pages.
- **PDF inspection:** Reads version, exact page count, encryption, form presence and Info metadata from a PDF.
- **Dry-run validation:** Checks any request payload at no cost before a paid call is made.

## Good for

- Generate an invoice PDF from structured data inside an agent workflow
- Produce a multi-page executive report from Markdown notes
- Check a generated PDF for clipped tables or a stranded last page before sending
- Verify page count and encryption status of PDFs received from users
- Add a watermark to draft memos rendered for review

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add --transport http pdf-forge https://pdf-forge.apikeg.com/mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "pdf-forge": {
      "type": "http",
      "url": "https://pdf-forge.apikeg.com/mcp"
    }
  }
}
```

### Claude Desktop (Customize → Connectors → Add → Add custom connector)

```text
https://pdf-forge.apikeg.com/mcp
```

Paste this URL, choose how to sign in, then click Add and Connect. On Team and Enterprise an Owner adds it in Organization settings → Connectors.

### Cursor (~/.cursor/mcp.json)

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

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "pdf-forge": {
      "type": "http",
      "url": "https://pdf-forge.apikeg.com/mcp"
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### ChatGPT (chatgpt.com → Plugins → + → Add custom MCP server)

```text
https://pdf-forge.apikeg.com/mcp
```

Paste this URL, set up sign-in, accept the warning and install the plugin. Then type @ in a chat to use it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add pdf-forge --url https://pdf-forge.apikeg.com/mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.pdf-forge]
url = "https://pdf-forge.apikeg.com/mcp"
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "pdf-forge": {
      "httpUrl": "https://pdf-forge.apikeg.com/mcp"
    }
  }
}
```

Or run: gemini mcp add -s user --transport http pdf-forge https://pdf-forge.apikeg.com/mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "pdf-forge": {
      "serverUrl": "https://pdf-forge.apikeg.com/mcp"
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "pdf-forge": {
      "url": "https://pdf-forge.apikeg.com/mcp",
      "transport": "http"
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "pdf-forge": {
      "type": "streamableHttp",
      "url": "https://pdf-forge.apikeg.com/mcp"
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "pdf-forge": {
      "url": "https://pdf-forge.apikeg.com/mcp"
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

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

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

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

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

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

Use .kiro/settings/mcp.json to add it to one workspace only.

### Grok Bot (Grok Bot desktop app → Connect apps → Add a custom connector)

```sh
https://pdf-forge.apikeg.com/mcp
```

Enter a Name (for example "API Keg — PDF Forge & Layout Diagnostics"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "pdf-forge": {
      "type": "http",
      "url": "https://pdf-forge.apikeg.com/mcp"
    }
  }
}
```

## Tools

The server marks 1 of 6 tools as able to delete data and 3 as able to change data. From the server's own tool labels and tool names; not verified by us.

- `render_document_pdf` (says read-only): 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 micropaymen
- `inspect_pdf_document` (says read-only): 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
- `account_send_verification_code` (says it can change data): 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).
- `account_verify_and_checkout` (says it can change data): 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).
- `account_create_checkout` (says it can change data): 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.
- `account_rotate_api_key` (says it can change data): 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.

## FAQ

### How is the service connected to an AI client?

It exposes a Streamable HTTP MCP endpoint at pdf-forge.apikeg.com/mcp, and a JSON config snippet for adding it to a client is published on the site.

### How much does a render cost?

Pay-per-request is $0.004 per rendered document and $0.001 per PDF inspection, paid in USDC on Base via x402. Monthly API key plans are listed at $5, $20 and $50 per product.

### Can I test a request without being charged?

Yes. Adding dry_run=true to the URL or sending an X-Dry-Run header validates the payload at no cost.

### Which PDF version is produced?

The renderer outputs spec-compliant PDF 1.7 documents.

### How do I add API Keg — PDF Forge & Layout Diagnostics to Claude Code?

Run this command in your terminal: claude mcp add --transport http pdf-forge https://pdf-forge.apikeg.com/mcp

### What are the best alternatives to API Keg — PDF Forge & Layout Diagnostics?

The closest alternatives to API Keg — PDF Forge & Layout Diagnostics are PDF Generator API, PodPDF, Makespdf, PDF Table & Document to JSON + Markdown MCP and pdfzen.

## Where this comes from

- Description: written from the project's website and its MCP Registry entry.
- Status and tools: checked automatically by AIPoweredBot on 3 December 2026.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [PDF Generator API](https://ai-powered.com/mcp/pdf-generator-api): PDF Generator API is a paid MCP server for files and documents.
- [PodPDF](https://ai-powered.com/mcp/podpdf): PodPDF is a freemium MCP server for files and documents.
- [Makespdf](https://ai-powered.com/mcp/makespdf): Makespdf is a freemium MCP server for browser automation.
- [PDF Table & Document to JSON + Markdown MCP](https://ai-powered.com/mcp/pdf-table-and-document-to-json-markdown-mcp): PDF Table & Document to JSON + Markdown MCP is a freemium MCP server for files and documents.
- [pdfzen](https://ai-powered.com/mcp/pdfzen): pdfzen is a paid MCP server for cloud and infrastructure.
- [PDF & Document to Markdown](https://ai-powered.com/mcp/pdf-and-document-to-markdown): PDF & Document to Markdown is a paid MCP server for files and documents.
- [boxpdf-html](https://ai-powered.com/mcp/boxpdf-html): boxpdf-html is an open-source MCP server for files and documents.
- [MintPDF](https://ai-powered.com/mcp/mintpdf): MintPDF is a freemium MCP server for files and documents.

---
Source: https://ai-powered.com/mcp/api-keg-pdf-forge-and-layout-diagnostics
