url-to-pdf-mcp
MCP serverDocs & knowledgeConvert public web pages to PDF, images, Markdown, or JSON using one API key.
Use url-to-pdf-mcp in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add url-to-pdf-mcp and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use url-to-pdf-mcp
No other account needed.
Details
Available today. Use it from your connected AI after setup.
No other account needed.
Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Install url-to-pdf-mcp
The server’s own address, for the clients that take one directly. Or connect Ahel once and every client you use reads it from one address, with the account kept on Ahel rather than in each client’s config.
Claude Code
claude mcp add --transport http --scope user url-to-pdf-mcp 'https://url-pdf.hammbox.com/mcp'Run it once in your project, then open /mcp to approve any sign-in the server asks for.
Claude Desktop
https://url-pdf.hammbox.com/mcpAdd a custom connector in Settings, paste this address, and approve the sign-in.
Cursor
cursor://anysphere.cursor-deeplink/mcp/install?name=url-to-pdf-mcp&config=eyJ1cmwiOiJodHRwczovL3VybC1wZGYuaGFtbWJveC5jb20vbWNwIn0=Open the link and Cursor adds the server at that address.
ChatGPT
https://url-pdf.hammbox.com/mcpIn Settings, enable Developer mode, create an MCP app, and paste this address. Your plan and workspace must allow custom apps.
Codex
codex mcp add url-to-pdf-mcp --url 'https://url-pdf.hammbox.com/mcp'Run it once, then sign in with codex mcp login url-to-pdf-mcp if the server asks for an account.
From the project's README
As published by strayly/url-to-pdf in README.md.
把任意公开网页转换为 PDF / 整页截图 / Markdown 的 MCP server 与 HTTP API。 通过 Paddle 购买 API key 后调用,无需自建浏览器渲染环境。
- 标准 MCP server,兼容 Claude Desktop、Cursor 等支持 tool-calling 的客户端
- 原生 HTTP API,便于脚本、服务端、低代码平台直接调用
- SSRF 防护:仅允许公网 http(s) 地址,拦截内网/保留网段
- 基于 Paddle 的订阅制授权,付款后自动发卡
线上实例
已部署公开实例,可直接使用,无需自建:
https://url-pdf.hammbox.com
获取 API key
- 打开
https://url-pdf.hammbox.com/buy进入结账页。 - 完成订阅付款(Paddle 结账,支持主流信用卡)。
- 付款完成后,打开
https://url-pdf.hammbox.com/portal/claim?email=<你付款用的邮箱>即可领取你的 API key(utp_...)。
使用方式
方式一:作为 MCP server(推荐给 AI 客户端)
在 Claude Desktop / Cursor 等客户端的 MCP 配置中加入:
{
"mcpServers": {
"url-to-pdf": {
"command": "npx",
"args": [
"mcp-remote",
"https://url-pdf.hammbox.com/mcp",
"--header", "x-api-key: YOUR_API_KEY"
]
}
}
}
连接后可直接用自然语言调用,例如「把 https://example.com 转成 PDF」。
方式二:作为 HTTP API(推荐给脚本 / 服务端)
所有渲染走 POST /tools/*,请求头带 x-api-key:
# 网页转 PDF
curl -X POST https://url-pdf.hammbox.com/tools/url-to-pdf \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"url":"https://example.com","format":"A4"}'
# 整页截图
curl -X POST https://url-pdf.hammbox.com/tools/url-to-screenshot \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"url":"https://example.com","fullPage":true,"format":"png"}'
# 提取 Markdown
curl -X POST https://url-pdf.hammbox.com/tools/url-to-markdown \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"url":"https://example.com"}'
返回 JSON 含 downloadUrl(有效期 1 小时),再下载即可:
curl -O "<downloadUrl>"
API 参考
工具 / 端点对照
| MCP 工具名 | HTTP 端点 | 说明 |
|---|---|---|
list_capabilities | GET /openapi.json | 免费。列出能力、价格与购买入口 |
url_to_pdf | POST /tools/url-to-pdf | 网页转 PDF |
url_to_screenshot | POST /tools/url-to-screenshot | 整页截图 |
url_to_markdown | POST /tools/url-to-markdown | 提取 Markdown |
url_to_pdf 参数
| 参数 | 类型 | 说明 |
|---|---|---|
url | string(必填) | 待转换页面的公网 http(s) URL |
format | A4 / Letter / Legal | 纸张大小,默认 A4 |
landscape | boolean | 横向,默认 false |
printBackground | boolean | 打印背景图形,默认 true |
scale | number | 缩放 0.1–2,默认 1 |
margin | string / object | 边距,如 "10mm" 或 {top,right,bottom,left} |
preferCssPageSize | boolean | 遵循页面 CSS @page 尺寸 |
url_to_screenshot 参数
| 参数 | 类型 | 说明 |
|---|---|---|
url | string(必填) | 目标 URL |
fullPage | boolean | 截取整页,默认 true |
format | png / jpeg | 默认 png |
quality | number | JPEG 质量 0–1,默认 0.8 |
url_to_markdown 参数
| 参数 | 类型 | 说明 |
|---|---|---|
url | string(必填) | 目标 URL |
removeSelectors | string[] | 提取前剔除的 CSS 选择器,如 ["nav",".ads","footer"] |
keepImages | boolean | 保留图片链接,默认 false |
许可证
MIT
Advanced
- Delivery
- url-to-pdf MCP server → your Ahel connector (mcp.ahel.ai) → your AI.
- Item type
- mcp-server
- Key
io-github-strayly-url-to-pdf- Source
- github.com/strayly/url-to-pdf
- Hosted endpoint
https://url-pdf.hammbox.com/mcp
More in Docs & knowledge
MCP server · dat999zx
More in Docs & knowledgeagent-native-slides
MCP server · builderio
More in Docs & knowledgemcp-memory-server
MCP server · mnemoverse
More in Docs & knowledgedatasinking
MCP server · heubme2020
More in Docs & knowledgespoken
MCP server · spokenmd
More in Docs & knowledgeemailmd
MCP server · anypost
More in Docs & knowledge