[Go to site: main page, start]

Skip to content

MCP Server

MCP (Model Context Protocol) is an open standard that lets AI assistants discover and use external tools. The TemplateFox MCP server gives your AI assistant 8 tools to generate PDFs, manage templates, and check credits — all from natural language.

  1. Node.js 18+ installed on your machine (for npx)
  2. A TemplateFox API key — get one from your Dashboard (starts with sk_)

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

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

Restart Claude Desktop after saving the file.

Terminal window
claude mcp add templatefox -- npx -y @templatefox/mcp-server

Then set the TEMPLATEFOX_API_KEY environment variable in your shell:

Terminal window
export TEMPLATEFOX_API_KEY="sk_your_api_key_here"

Use the same npx command in your MCP server configuration:

npx -y @templatefox/mcp-server

Set TEMPLATEFOX_API_KEY in the environment variables.

Terminal window
npm install -g @templatefox/mcp-server

Then use templatefox-mcp-server as the command instead of npx.

After installation, ask your AI assistant:

“List my TemplateFox templates”

If the MCP server is configured correctly, the assistant will call list_templates and return your template list. If you see an error, check the Troubleshooting section below.

Environment VariableRequiredDescription
TEMPLATEFOX_API_KEYYesYour API key (starts with sk_). Get one from your Dashboard
TEMPLATEFOX_BASE_URLNoOverride API base URL (default: https://api.templatefox.com)

The MCP server exposes 8 tools that your AI assistant can call:

Generate a PDF from a template with dynamic data. Costs 1 credit per PDF.

What you can ask:

“Generate an invoice for John Doe, total $250, using my Invoice template”

“Create a certificate of completion for Jane Smith, course: Advanced React”

Queue async PDF generation with an optional webhook callback. Useful for large or batch jobs. Costs 1 credit per PDF.

What you can ask:

“Generate 10 certificates in the background and notify me when done”

Discover all available PDF templates in your account.

What you can ask:

“What templates do I have?”

“Show me all my PDF templates”

Get the fields and variables for a specific template. Useful to understand what data a template expects before generating.

What you can ask:

“What fields does my Invoice template need?“

Check the status of an async PDF generation job.

What you can ask:

“Is my PDF job finished yet?“

List all async PDF generation jobs and their statuses.

What you can ask:

“Show me my recent PDF jobs”

Check remaining credits and account information.

What you can ask:

“How many credits do I have left?“

View credit transaction history.

What you can ask:

“Show me my credit usage this month”

Ask your AI assistant to generate one PDF with specific data. The assistant discovers the template, checks the required fields, and generates the PDF in one flow:

“Generate a packing slip for order #1234, customer John Doe, 3x Widget Blue and 1x Gadget Pro”

Ask about your templates first, then generate once you know what’s available:

“List my templates, then show me the fields for the Receipt template”

Monitor your usage without leaving your AI assistant:

“How many credits do I have left? Show me my recent transactions”

A hosted HTTP MCP endpoint at https://api.templatefox.com/mcp is coming soon. This will let you connect without installing anything locally — just point your MCP client to the URL.

”MCP server not found” or connection errors

Section titled “”MCP server not found” or connection errors”
  • Make sure Node.js 18+ is installed: run node --version
  • Check that the npx command works: run npx -y @templatefox/mcp-server --help
  • Restart your AI assistant after updating the configuration

”Invalid API key” or authentication errors

Section titled “”Invalid API key” or authentication errors”
  • Verify your API key starts with sk_ and is not expired
  • Check the key in your Dashboard
  • Make sure TEMPLATEFOX_API_KEY is set in the correct environment (not just your shell, but the MCP server config)
  • Some clients cache MCP tool lists — restart the client
  • Check if other MCP servers are working to rule out a client-level issue