oJo MCP Server

oJo MCP Server

Lets AI agents turn HTML into images, offering free live preview links and optional hosted PNG generation, reusable templates, and template management via the oJo API.

Category
访问服务器

README

@ojodotso/mcp-server

A Model Context Protocol server that lets an AI agent turn HTML into images. Live previews are free and need no account; an oJo API key adds hosted PNG URLs 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.

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.

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

Adding a key

A key unlocks the permanent PNG 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:

{
  "mcpServers": {
    "ojo": {
      "command": "npx",
      "args": ["-y", "@ojodotso/mcp-server"],
      "env": { "OJO_API_KEY": "sk_..." }
    }
  }
}
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.

Tool Purpose Credit Needs a key
create_preview_link Build a free, full-resolution /preview link for an HTML/Handlebars draft. — no
generate_image_from_html Render plain HTML (with inline CSS) to a PNG; returns its public URL. 1 yes
generate_image_from_template Render an existing template, optionally overriding variables via modify. 1 yes
list_templates List the templates available to the account. — yes
get_template Fetch one template's decoded HTML and variable defaults. — yes
create_template Create a reusable template from plain HTML/Handlebars. — 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.

Both generate 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

pnpm install
pnpm build
pnpm test
pnpm check

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选