Docjet Mcp

io.github.docjet-dev由 GitHub 账号 docjet-dev 发布v1.0.1更新于 Oct 24, 2026

Render branded PDFs and PNG images from templates or raw HTML via the DocJet API. Free tier.

已验证STDIO仅桌面开发者工具媒体与设计

概览

AI 生成的概览

DocJet MCP 让助手通过 DocJet API 用模板或原始 HTML 渲染品牌化 PDF 和 PNG 图片,并返回签名下载链接。

可以做什么
根据模板 ID 或原始 HTML 加 JSON 数据渲染品牌化 PDF 文档(如发票、报告、证书),返回签名下载链接。以同样方式渲染 PNG 图片(如社交或 OG 卡片)。列出可用模板及其 ID、名称、描述和输出类型。模板 ID 在发起网络请求前会在本地校验,API 错误以带 DocJet 错误码的 MCP 错误内容返回。
适用场景
适合希望助手按需生成成品文档或分享图片(发票、证书、报告、社交卡片)而无需自建渲染流程的场景。适用于输出为可下载文件而非纯文本的工作流。
运行要求
通过 stdio 在本地运行,通常用 npx 启动,因此需要 Node.js。需要在 DOCJET_API_KEY 环境变量中提供 DocJet API 密钥,可从 DocJet 获取免费密钥。可选的 DOCJET_BASE_URL 变量可覆盖默认 API 地址。渲染需要访问 DocJet API 的网络;列出模板无需密钥。
安装前请注意
API 密钥以 Bearer 令牌形式发送给 DocJet API,渲染时会把模板或 HTML 及数据发送给该第三方。README 公布了一个共享的公开演示密钥,有速率限制且由所有人共用,不适合真实或私密内容。渲染会消耗配额,可能出现 QUOTA_EXCEEDED 或 RATE_LIMITED 等错误。仅限桌面客户端。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Docjet Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

docjet-mcp

MCP server for DocJet — render branded PDF documents (invoices, reports, certificates) and PNG social images directly from any MCP client (Claude Desktop, Claude Code, Cursor, Windsurf, ...).

Send a template ID or raw HTML plus JSON data; get back a signed download URL. Runs locally over stdio via npx — nothing to host.

Quick start

Add to your MCP client configuration:

json
{  "mcpServers": {    "docjet": {      "command": "npx",      "args": ["docjet-mcp"],      "env": {        "DOCJET_API_KEY": "binfra_your_key_here"      }    }  }}

Get an API key at docjet.dev. To try it without signing up, use the public demo key (rate-limited to 3 req/min, 50 renders/month, shared by everyone):

binfra_9afb57dbb6478c441ad101129fca65847f5745403f9d718b3de6d934c9b63f88

Tools

ToolWhat it does
render_pdfRender a branded PDF. Input: template_id (or raw html) + data object. Returns a signed download URL.
render_imageRender a PNG image (e.g. OG/social card). Input: template_id (or raw html) + data object. Returns a signed download URL.
list_templatesList available templates: id, name, description, outputType. No API key needed.

Example prompt once connected:

"List the DocJet templates, then render the invoice-ro template with client 'Demo SRL' and total 1000 as a PDF."

Environment variables

VariableRequiredDescription
DOCJET_API_KEYYesYour DocJet API key (binfra_ prefix). Sent as a Bearer token; never logged.
DOCJET_BASE_URLNoOverride the API base URL (default https://api.docjet.dev).

How it works

  • Stdio transport using the official @modelcontextprotocol/sdk (v1).
  • render_pdf → POST /v1/render?response=url, render_image → POST /v1/image?response=url, list_templates → GET /v1/templates.
  • Template IDs are validated locally against ^[a-z0-9][a-z0-9-]{0,63}$ before any network call.
  • API errors surface as MCP error content with the DocJet error code (e.g. QUOTA_EXCEEDED, RATE_LIMITED).

Links

License

MIT

来源:README.md,提交 03044f6

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.1最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。