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 分