关于 Customjs
Customjs 是托管式远程 MCP 服务,为 AI Agent 提供 HTML 托管、PDF 生成、网页截图与抓取及沙盒代码执行。适合需要在一个服务中调用这些网页处理工具的用户。
主要功能
- 01发布并管理公开 HTML 页面
- 02将 HTML 或 Markdown 转为 PDF
- 03截取整页网站截图
- 04抓取渲染后的 HTML
- 05在安全沙盒中运行 JavaScript
适用场景
- 01发布静态 HTML 页面并获取公开链接
- 02从 HTML 或 Markdown 生成 PDF
- 03截取网页或提取渲染后的内容
- 04运行隔离的 JavaScript 代码
MCP 相关
该远程 MCP 服务通过 Streamable HTTP 提供工具,使用 `x-customjs-api-key` 请求头认证。客户端连接 `https://mcp.customjs.space/customjs/mcp` 即可调用。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://mcp.customjs.space/customjs/mcpclaude mcp add --transport http customjs https://mcp.customjs.space/customjs/mcp{"mcpServers":{"customjs":{"type":"http","url":"https://mcp.customjs.space/customjs/mcp"}}}在 Cursor 中打开{"servers":{"customjs":{"type":"http","url":"https://mcp.customjs.space/customjs/mcp"}}}在 VS Code 中打开{"mcpServers":{"customjs":{"type":"http","url":"https://mcp.customjs.space/customjs/mcp"}}}{"mcpServers":{"customjs":{"serverUrl":"https://mcp.customjs.space/customjs/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
https://mcp.customjs.space/customjs/mcp需要授权工具
详细介绍
CustomJS MCP 服务
一个远程 Model Context Protocol 服务,为 AI agents 提供网页超能力——通过你自己的 CustomJS API 密钥托管 HTML 页面并生成公开 URL、生成 PDF、截取屏幕截图、抓取网站内容以及运行沙盒代码。
| 端点 | https://mcp.customjs.space/customjs/mcp |
| 传输方式 | Streamable HTTP |
| 身份验证 | x-customjs-api-key 标头(每位用户的 API 密钥) |
无需安装或自行托管——这是一个托管式远程 MCP 服务。准备好你的 CustomJS API 密钥并进行连接即可。
工具
| 工具 | 功能 |
|---|---|
customjs_host_html_page | 发布静态 HTML 并获取公开的 lp.customjs.space URL(按名称更新或插入) |
customjs_list_html_pages | 列出你托管的页面(名称、URL、pageId) |
customjs_delete_html_page | 按名称或 pageId 删除托管的页面 |
customjs_html_to_pdf | 将 HTML 转换为 PDF(Nunjucks 模板) |
customjs_markdown_to_pdf | 将 Markdown 转换为 PDF |
customjs_screenshot | 截取完整网页的屏幕截图 |
customjs_scrape_html | 提取完全渲染后的 HTML(支持 JavaScript) |
customjs_run_code | 在安全沙盒中运行 JavaScript |
customjs_help | 内置用法示例(主题:页面、PDF、屏幕截图、抓取、代码) |
获取 API 密钥
访问 https://www.customjs.space/integration/native-api/api-key 创建免费密钥。每次请求都会通过 x-customjs-api-key 标头发送你的密钥,连接器不会存储密钥。
连接
Claude Code — 插件(推荐)
/plugin marketplace add customjs/claude-plugin
/plugin install customjs@customjs-tools
系统只会提示你输入 API 密钥。(参见 customjs/claude-plugin。)
Claude Code — 不使用插件
claude mcp add --transport http \
--header "x-customjs-api-key: <your-key>" \
customjs https://mcp.customjs.space/customjs/mcp
Claude Desktop(通过 mcp-remote 使用 JSON 配置)
{
"mcpServers": {
"customjs": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"https://mcp.customjs.space/customjs/mcp",
"--header", "x-customjs-api-key:${CUSTOMJS_API_KEY}"
],
"env": { "CUSTOMJS_API_KEY": "your-key" }
}
}
}
其他 MCP 客户端(Cursor、VS Code 等)
添加一个指向 https://mcp.customjs.space/customjs/mcp 的远程 / HTTP MCP 服务,并设置标头 x-customjs-api-key: <your-key>。
托管 HTML 页面
customjs_host_html_page 会发布静态 HTML,并返回一个公开的 https://lp.customjs.space/<shortId> URL。使用相同的 name 再次托管时,会更新现有页面(按名称更新或插入)。
注意:公开 URL 通过 CloudFront 提供服务,因此更新后可能会短暂显示之前的内容,直到缓存刷新。
官方 MCP 注册表
此服务已发布到官方 MCP 注册表,名称为 space.customjs/customjs-mcp(已通过 customjs.space 的 DNS 验证)——参见 server.json。有关发布方式和完整目录列表,请参见 PUBLISHING.md。
链接
- 网站 — https://www.customjs.space
- 获取 API 密钥 — https://www.customjs.space/integration/native-api/api-key
- Claude Code 插件 — https://github.com/customjs/claude-plugin
- MCP 协议 — https://modelcontextprotocol.io
许可证
本仓库的内容(文档和注册表清单)依据 MIT License 发布。CustomJS 服务本身需要有效的 API 密钥,并受 CustomJS 服务条款约束,详见 https://www.customjs.space。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。