Skip to main content
Glama
TemplateFoxPDF

TemplateFox MCP Server

Official

TemplateFox MCP Server

MCP(Model Context Protocol)服务器,用于 TemplateFox PDF 生成 API。你可以通过 Claude、Cursor 和 Windsurf 等 AI 助手直接从模板生成 PDF。

安装

Claude Desktop

在 macOS 上,将以下内容添加到 Claude Desktop 的配置(~/Library/Application Support/Claude/claude_desktop_config.json)中:

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

Claude Code

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

然后,在你的 shell 中设置环境变量 TEMPLATEFOX_API_KEY

Cursor / Windsurf

在 MCP 服务器配置中使用相同的 npx -y @templatefox/mcp-server 命令,并将 TEMPLATEFOX_API_KEY 加入环境中。

全局安装(备选)

npm install -g @templatefox/mcp-server

然后使用 templatefox-mcp-server 作为命令,而不是 npx

Related MCP server: @docujson/mcp

配置

环境变量

必填

说明

TEMPLATEFOX_API_KEY

你的 API 密钥(以 sk_ 开头)。可在 app.templatefox.com/dashboard/api-keys 获取

TEMPLATEFOX_BASE_URL

覆盖 API 基础 URL(默认:https://api.templatefox.com

可用工具

工具

说明

generate_pdf

使用模板和动态数据生成 PDF(1 积分)

generate_pdf_async

提交异步 PDF 生成任务,并可设置 webhook(1 积分)

get_pdf_job_status

检查异步 PDF 任务的状态

list_pdf_jobs

列出异步 PDF 生成任务

list_templates

列出所有可用模板

get_template_fields

获取模板的字段/变量

get_account_info

查看剩余积分和账户信息

list_transactions

查看积分交易记录

远程服务器(HTTP)

该 MCP 服务器还支持通过 Streamable HTTP 进行 HTTP 传输,适用于远程和云部署。

通过 URL 连接

https://mcp-server-599407781746.us-central1.run.app/mcp

MCP 客户端必须通过 HTTP 请求头传递 API 密钥:

Authorization: Bearer sk_your_api_key_here

或:

x-api-key: sk_your_api_key_here

自托管

通过设置 PORT 环境变量,以 HTTP 模式运行服务器:

PORT=8080 TEMPLATEFOX_API_KEY=sk_your_key node dist/index.js

或者使用 Docker:

docker build -t templatefox-mcp .
docker run -p 8080:8080 templatefox-mcp

MCP 端点为 http://localhost:8080/mcp,健康检查端点为 http://localhost:8080/health

使用示例

配置完成后,你可以让 AI 助手执行:

“列出我的 PDF 模板,并使用“Invoice Template”模板生成一张发票,客户姓名为“John Doe”,金额为 150.00。”

该助手将:

  1. 调用 list_templates 查找可用的模板

  2. 调用 get_template_fields 获取必填字段

  3. 使用模板 ID 和数据调用 generate_pdf

  4. 返回 PDF 下载 URL

链接

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
6dRelease cycle
17Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Generate PDFs from templates via AI chat. Works with Claude, ChatGPT, Cursor, and any MCP client.

  • Turn a description into a shareable, editable PDF — invoices, certificates, reports, resumes.

  • Generate PDF reports from Re:port Flow templates via Claude and other AI agents.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TemplateFoxPDF/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server