oJo — HTML to image and PDF

so.ojo由 ojo.so 发布官方发布者v0.9.0更新于 Oct 30, 2026

Fill an HTML template with JSON and get a hosted PDF or image link. Free previews, no key.

已验证Streamable HTTP可网页运行开发者工具媒体与设计

概览

AI 生成的概览

oJo 把 HTML/Handlebars 模板渲染成托管链接的 PNG 图片和 PDF,并提供无需账号的免费全分辨率预览链接。

可以做什么
  • 生成免费、自包含的预览链接,在浏览器中以全分辨率实时渲染 HTML/Handlebars 草稿
  • 把 HTML 或已有模板渲染为托管 PNG 图片并返回公开链接
  • 把 HTML 或模板渲染为最多 100 页的 PDF,可将多个模板与 HTML 合并为一个文档
  • 列出、获取、创建和更新账号中的可复用模板
  • 可选返回缩小缩略图,用于确认渲染是否成功
适用场景
适合需要把 HTML 或模板加 JSON 数据变成可分享的图片或 PDF 的场景,例如社交卡片、发票或报表;也适合先用免费预览反复调整设计,再花额度做最终渲染。
运行要求
可作为远程端点连接 mcp.ojo.so 并登录,也可通过 npx @ojodotso/mcp-server 以 stdio 在本地运行。oJo 账号与 OJO_API_KEY 中的 API 密钥为可选项,没有时只能使用预览链接。可选 OJO_API_BASE_URL 与 OJO_WEB_BASE_URL 覆盖 API 与网页主机。需要能访问 oJo API 的网络。
安装前请注意
带密钥渲染图片和 PDF 会消耗账号额度(PDF 每 20 页 1 额度),反复渲染会产生费用。更新模板会覆盖原模板,并立即影响 API 渲染结果。预览草稿编码在 URL 片段中、不存于服务器,但拿到链接的人都能查看。API 密钥是机密,通过 OJO_API_KEY 传入。

安装

在 SourceWeft 中

  1. 打开 控制台中的 oJo — HTML to image and PDF,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/so.ojo%2Fmcp-server/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "ojo-html-to-image-and-pdf": {
      "type": "http",
      "url": "https://mcp.ojo.so/mcp"
    }
  }
}

README

@ojodotso/mcp-server

oJo turns an HTML template and your JSON data into a PDF or PNG at a hosted link, from the REST API, any MCP client or the editor. This package is oJo's Model Context Protocol server. Live previews are free and need no account; an oJo API key adds hosted PNG and PDF links and reusable templates through the user's own account. Transport is local stdio; the API boundary is HTTP to https://api.ojo.so/v1 only.

Most clients can connect to https://mcp.ojo.so/mcp directly and sign in, without installing anything: see https://ojo.so/docs/mcp-server. This package is the local alternative.

Quick start — no account needed

Point your MCP client at the package. With no API key the server starts in preview-only mode: create_preview_link renders HTML into a live, full-resolution image preview, free and unlimited, with no oJo account.

json
{  "mcpServers": {    "ojo": {      "command": "npx",      "args": ["-y", "@ojodotso/mcp-server"]    }  }}
bash
claude mcp add ojo -- npx -y @ojodotso/mcp-server

Adding a key

A key unlocks the permanent PNG or PDF URL — the thing you can put in an email, a social card or an API response — plus reusable templates. Create one at https://ojo.so/dashboard/api and pass it as OJO_API_KEY:

json
{  "mcpServers": {    "ojo": {      "command": "npx",      "args": ["-y", "@ojodotso/mcp-server"],      "env": { "OJO_API_KEY": "sk_..." }    }  }}
bash
claude mcp add ojo -e OJO_API_KEY=sk_... -- npx -y @ojodotso/mcp-server

Works the same for Claude Desktop, Cursor, and Claude Code.

Tools

Only create_preview_link is registered without an API key; the rest talk to the oJo API, so advertising them keyless would offer tools that can only fail.

ToolPurposeCreditNeeds a key
create_preview_linkBuild a free, full-resolution /preview link for an HTML/Handlebars draft.—no
generate_image_from_htmlRender plain HTML (with inline CSS) to a PNG; returns its public URL.1yes
generate_image_from_templateRender an existing template, optionally overriding variables via modify.1yes
generate_pdf_from_htmlRender plain HTML (with inline CSS) to a PDF of up to 100 pages, A4 unless a CSS @page rule sets the size; returns its public URL, page count and credits spent. A longer document is refused and costs nothing.1 per 20 pagesyes
generate_pdf_from_templateRender an existing template to a PDF, optionally overriding variables via modify, or build one PDF of up to 100 pages from many templates and HTML with pages.1 per 20 pagesyes
list_templatesList the templates available to the account.—yes
get_templateFetch one template's HTML and variable defaults.—yes
create_templateCreate a reusable template from plain HTML/Handlebars.—yes
update_templateReplace a template's HTML, and its variable defaults when given, under the same ID. Overwrites: API renders use the new version at once.—yes

The design loop

Iterate with create_preview_link, then render. It returns an https://ojo.so/preview#draft=… URL that renders the draft live in the browser through the same engine as the final PNG, at full resolution. The draft is gzipped into the URL hash, so it never reaches a server and nothing is stored — the link is self-contained and shareable with a human reviewer. For a PDF the preview shows the screen rendering, not the page breaks.

Both image tools also accept inspect: true, which returns a 512px-wide downscaled thumbnail alongside the URL. That is a confirmation that the render succeeded, not a design surface — it is too small to judge layout or typography.

Guiding prompt

author_ojo_template — teaches the Handlebars helper catalog, the Template Variables (schema/defaults) vs Modify Payload (per-render data) model, viewport conventions, and the preview-first design loop.

Configuration

  • OJO_API_KEY (optional) — your oJo API key. Without it the server runs in preview-only mode; with it the full tool surface is registered.
  • OJO_API_BASE_URL (optional) — defaults to https://api.ojo.so/v1.
  • OJO_WEB_BASE_URL (optional) — the web app that serves /preview for create_preview_link. Defaults to https://ojo.so; point it at a local http://localhost:3000 when developing against a self-hosted web app.

Develop

bash
pnpm installpnpm buildpnpm testpnpm check

来源:README.md,提交 96e00b8

工具

1

版本历史

6
  1. v0.9.0最新Oct 30, 2026
  2. v0.8.0Oct 20, 2026
  3. v0.7.0Oct 8, 2026
  4. v0.6.0Oct 7, 2026
  5. v0.5.0Sep 29, 2026
  6. v0.4.0Sep 16, 2026

评分

已满足适用检查项的 100%

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

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分