# TemplateFoxPDF

> TemplateFoxPDF is an open-source MCP server for files and documents. MCP server that lets AI assistants generate PDFs from TemplateFox templates. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Self-hosted, macOS, Windows, Linux
- **Repository:** https://github.com/templatefoxpdf/mcp-server
- **MCP Registry name:** io.github.TemplateFoxPDF/mcp-server
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents)
- **Listing updated:** 2026-11-21

## About

The README says this server connects AI assistants such as Claude, Cursor and Windsurf to the TemplateFox PDF generation API. Once configured, an assistant can look up your templates, inspect the fields each one needs, and produce a PDF filled with the data you supply, then return a download link.

Setup runs through npm: the package is started with npx or installed globally, and it reads a TemplateFox API key from an environment variable. The README also describes an HTTP mode for remote or self-hosted deployment, including a Docker image and a health endpoint, along with a hosted endpoint that takes the key as a header.

It suits people who already keep document templates in TemplateFox and want to create invoices or similar files by describing them in plain language. Generation calls consume credits, and the README lists which tools cost one credit each.

## Features

- **Template-based PDF generation:** Creates a PDF from a chosen template using data passed in by the assistant.
- **Async jobs with webhooks:** Queues PDF generation and can notify a webhook, with tools to check job status and list jobs.
- **Template field discovery:** Lists templates and returns the variables each one expects before generating.
- **Credit and transaction checks:** Reports remaining credits and the history of credit transactions.
- **Stdio and HTTP transports:** Runs locally over stdio or as a Streamable HTTP server with a health check.
- **Self-hosting with Docker:** The README documents a Docker build and a PORT setting for running the server yourself.

## Good for

- Generate invoices from an AI chat by naming a template and supplying customer details
- Check which fields a template needs before filling it with data
- Queue large batches of PDFs and receive a webhook when each one finishes
- Monitor remaining TemplateFox credits from inside an assistant

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-server --env TEMPLATEFOX_API_KEY='<TEMPLATEFOX_API_KEY>' -- npx -y @templatefox/mcp-server
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@templatefox/mcp-server"
      ],
      "env": {
        "TEMPLATEFOX_API_KEY": "<TEMPLATEFOX_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@templatefox/mcp-server"
      ],
      "env": {
        "TEMPLATEFOX_API_KEY": "<TEMPLATEFOX_API_KEY>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@templatefox/mcp-server"
      ],
      "env": {
        "TEMPLATEFOX_API_KEY": "<TEMPLATEFOX_API_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@templatefox/mcp-server"
      ],
      "env": {
        "TEMPLATEFOX_API_KEY": "<TEMPLATEFOX_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@templatefox/mcp-server"
      ],
      "env": {
        "TEMPLATEFOX_API_KEY": "<TEMPLATEFOX_API_KEY>"
      }
    }
  }
}
```

## Tools

- `generate_pdf`: Generate a PDF from a template with dynamic data (1 credit)
- `generate_pdf_async`: Queue async PDF generation with optional webhook (1 credit)
- `get_pdf_job_status`: Check the status of an async PDF job
- `list_pdf_jobs`: List async PDF generation jobs
- `list_templates`: List all available templates
- `get_template_fields`: Get the fields/variables for a template
- `get_account_info`: Check remaining credits and account info
- `list_transactions`: View credit transaction history

## FAQ

### What do I need to run TemplateFoxPDF?

The README says you need a TemplateFox API key, which starts with sk_, and an MCP client such as Claude Desktop, Claude Code, Cursor or Windsurf.

### Can TemplateFoxPDF run on a server instead of my laptop?

Yes. The README describes an HTTP mode set by a PORT variable, a Docker image, and a hosted endpoint that accepts the API key in an Authorization or x-api-key header.

### Which tools does TemplateFoxPDF expose?

The README lists generate_pdf, generate_pdf_async, get_pdf_job_status, list_pdf_jobs, list_templates, get_template_fields, get_account_info and list_transactions.

### What license is TemplateFoxPDF under?

The README states the MIT license.

### Is TemplateFoxPDF free?

Yes. TemplateFoxPDF is open source, so you can use and self-host it for free.

### How do I add TemplateFoxPDF to Claude Code?

Run this command in your terminal: claude mcp add mcp-server --env TEMPLATEFOX_API_KEY='<TEMPLATEFOX_API_KEY>' -- npx -y @templatefox/mcp-server

### What are the best alternatives to TemplateFoxPDF?

The closest alternatives to TemplateFoxPDF are Bulkrender, PDF Generator, PDFik, html2pdfconverter and Carbone MCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Bulkrender](https://ai-powered.com/mcp/bulkrender): Bulkrender is a freemium MCP server for files and documents.
- [PDF Generator](https://ai-powered.com/mcp/pdf-generator): PDF Generator is an open-source MCP server for files and documents.
- [PDFik](https://ai-powered.com/mcp/pdfik): PDFik is a freemium MCP server for files and documents.
- [html2pdfconverter](https://ai-powered.com/mcp/html2pdfconverter): html2pdfconverter is an MCP server for files and documents.
- [Carbone MCP](https://ai-powered.com/mcp/carbone-mcp): Carbone MCP is a freemium MCP server for files and documents.
- [DocuQueue MCP](https://ai-powered.com/mcp/docuqueue-mcp): DocuQueue MCP is a freemium MCP server for files and documents.
- [Document Parser](https://ai-powered.com/mcp/document-parser): Document Parser is a freemium MCP server for files and documents.
- [aidocx](https://ai-powered.com/mcp/aidocx): aidocx is an MCP server for files and documents.

---
Source: https://ai-powered.com/mcp/templatefoxpdf
