关于 openunfurl
OpenUnfurl 是无需注册或 API 密钥的链接预览 API,可为公开 URL 返回 JSON 元数据。它也提供远程 MCP 服务,供 Agent 将链接展开作为工具调用。
主要功能
- 01提取标题、描述和图片等元数据
- 02返回 Open Graph、Twitter Card 和 oembed 信息
- 03提供 REST 与远程 MCP 接口
- 04拒绝本机、私有及保留 IP 地址
适用场景
- 01为公开链接生成预览信息
- 02让 Agent 获取网页标题和描述
- 03在无需账号的情况下调用链接展开工具
MCP 相关
它通过无状态 Streamable HTTP 提供远程 MCP 服务,公开一个 unfurl 工具,输入 URL 并返回链接预览 JSON。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://openunfurl.vercel.app/api/mcpclaude mcp add --transport http solvohq-openunfurl https://openunfurl.vercel.app/api/mcp{"mcpServers":{"solvohq-openunfurl":{"type":"http","url":"https://openunfurl.vercel.app/api/mcp"}}}在 Cursor 中打开{"servers":{"solvohq-openunfurl":{"type":"http","url":"https://openunfurl.vercel.app/api/mcp"}}}在 VS Code 中打开{"mcpServers":{"solvohq-openunfurl":{"type":"http","url":"https://openunfurl.vercel.app/api/mcp"}}}{"mcpServers":{"solvohq-openunfurl":{"serverUrl":"https://openunfurl.vercel.app/api/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
1| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| url | string | 是 | 要展开预览的 http(s) URL |
详细介绍
OpenUnfurl
无需注册的链接展开/链接预览 API。无需账户,无需 API 密钥,只需发送一个 GET 请求。
提供任意公开 URL,即可获取整洁的预览元数据(标题、描述、图片、站点名称、favicon、Open Graph/Twitter Card、oembed),并以 JSON 格式返回。本服务专为自主 AI Agent 构建,可作为工具使用——Agent 没有真人协助注册。
在线体验:https://openunfurl.vercel.app
快速开始
curl "https://openunfurl.vercel.app/api/unfurl?url=https://github.com"
示例响应:
{
"url": "https://github.com",
"resolvedUrl": "https://github.com/",
"title": "GitHub · Build and ship software on a single, collaborative platform",
"description": "Join the world's most widely adopted, AI-powered developer platform where millions of developers, businesses, and the largest open source community build software that advances humanity.",
"image": "https://github.githubassets.com/assets/campaign-social-031d6161fa10.png",
"siteName": "GitHub",
"type": "object",
"favicon": "https://github.githubassets.com/favicons/favicon.svg",
"oembed": null,
"fetchedAt": "2026-05-17T00:00:00.000Z",
"engine": "static-html-v0.1",
"note": "v0.1 parses static HTML only — no JS/SPA render"
}
任何缺失字段的值都是 null。错误会以 JSON 格式返回,包含 error 键和相应的 HTTP 状态码(400 URL 错误/被拦截/缺失,422 获取失败,429 请求频率受限,405 方法错误)。
JavaScript
const base = "https://openunfurl.vercel.app";
const r = await fetch(
base + "/api/unfurl?url=" + encodeURIComponent("https://example.com")
);
const meta = await r.json(); // { title, description, image, favicon, ... }
用作 MCP 工具(AI Agent/Claude/Cursor/大模型客户端)
OpenUnfurl 也是一个远程 MCP 服务,因此 Agent 可以将其作为工具调用,无需注册,无需 API 密钥,无需 OAuth。
- 端点:
https://openunfurl.vercel.app/api/mcp - 传输方式:Streamable HTTP,无状态(POST JSON-RPC 2.0,单个
application/json响应——无会话,无 SSE) - 仅提供一个工具:
unfurl——输入{ "url": "https://example.com" }, 返回与 REST 端点相同的预览 JSON(也以structuredContent的形式返回)
将以下配置添加到任意 MCP 客户端配置中(Claude Desktop、Cursor,或支持 Streamable HTTP 传输方式的任意客户端):
{ "mcpServers": { "openunfurl": { "url": "https://openunfurl.vercel.app/api/mcp" } } }
快速冒烟测试:
curl -s -X POST https://openunfurl.vercel.app/api/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"unfurl","arguments":{"url":"https://example.com"}}}'
通过 MCP 调用时,上游错误会作为带有 isError: true 的工具结果返回。
原因
托管式链接预览替代方案——Microlink、OpenGraph.io、LinkPreview.net、Unfurl.io、LinkPeek——都要求用户注册和/或提供 API 密钥才能使用免费套餐。OpenUnfurl 则不需要:只需发送一个匿名 GET 请求(或调用一次 MCP tools/call)。这对自主 Agent 尤其有用,因为它们没有真人协助完成注册或粘贴密钥。
限制
- v0.1 仅解析静态 HTML——不使用无头浏览器,也不支持由 JS 渲染的 SPA。
如果网站在客户端渲染
<meta>标签,将会返回静态回退结果。 - 尽力而为的单实例 IP 请求频率限制——仅用于轻度防滥用,并非保证(无服务器实例是临时的,且彼此不共享)。
- 带 SSRF 防护——会拒绝 localhost/私有/保留 IP 地址范围。
- 采用 MIT 许可证,且可自托管——见下文。
自托管——零依赖文件
整个 API 由两个独立的零依赖 Node 无服务器函数组成:
api/unfurl.js(REST)和 api/mcp.js(远程
MCP)。无需运行 npm install,也无需使用 cheerio/jsdom。将文件夹部署到 Vercel
(会自动检测 /api,无需配置),或将处理程序放入任意 Node 无服务器运行时。
git clone https://github.com/SolvoHQ/openunfurl
cd openunfurl
npx vercel --prod
许可证
MIT——详见 LICENSE。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。