关于 URL Shortener x402
URL Shortener x402 为需要精简链接的 AI Agent 提供 MCP 和 HTTP API,使用哈希生成短码并支持自定义别名。调用时以 Base 上的 USDC 逐次付款,无需 API 密钥或注册。
主要功能
- 01基于哈希的短链接
- 02可选自定义别名
- 03逐次调用支付 USDC
- 04支持 HTTP API
适用场景
- 01为 Agent 缩短长链接
- 02创建带自定义别名的链接
MCP 相关
它向 MCP 客户端提供 `utility_shorten_url` 工具,接收 URL 和可选别名并返回短链接。MCP 端点通过 HTTP 提供。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://url-shortener.api.klymax402.com/mcpclaude mcp add --transport sse url-shortener-x402 https://url-shortener.api.klymax402.com/mcp{"mcpServers":{"url-shortener-x402":{"type":"sse","url":"https://url-shortener.api.klymax402.com/mcp"}}}在 Cursor 中打开{"servers":{"url-shortener-x402":{"type":"sse","url":"https://url-shortener.api.klymax402.com/mcp"}}}在 VS Code 中打开{"mcpServers":{"url-shortener-x402":{"type":"sse","url":"https://url-shortener.api.klymax402.com/mcp"}}}{"mcpServers":{"url-shortener-x402":{"serverUrl":"https://url-shortener.api.klymax402.com/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
详细介绍
URL Shortener API
使用基于哈希的方法缩短 URL,并返回简洁的短链接。通过 x402 按次付费(Base L2 上的 USDC)——无需 API 密钥、无需注册,也没有速率限制门槛。
这是 klymax402 市场的一部分——为 AI Agent 提供 100 个 x402 微支付 API,只需一个钱包,即可使用 Base 上的 USDC。
快速开始——MCP
将以下内容添加到 MCP 客户端配置中(Claude Desktop、Cursor、ElizaOS 等):
{
"mcpServers": {
"url-shortener": {
"url": "https://url-shortener.api.klymax402.com/mcp"
}
}
}
快速开始——HTTP(x402)
curl -X POST "https://url-shortener.api.klymax402.com/api/shorten" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com"}'
# -> 402 Payment Required, with an x402 payment challenge in the response body
任何支持 x402 的客户端(@x402/fetch、x402-agent-tools、ATXP)都会自动处理 402 → 签名 → 重试流程。
工具
| 工具 | 方法 | 路径 | 价格 | 描述 |
|---|---|---|---|---|
utility_shorten_url | POST | /api/shorten | $0.003 | 缩短 URL 并返回短链接 |
utility_shorten_url
当你需要将长 URL 缩短为简洁的链接时使用。接受任何有效的 URL,并返回包含哈希码、原始 URL 和创建时间戳的短 URL。请勿用于域名情报分析——改用 domain_lookup_intelligence。请勿用于网页抓取——改用 web_scrape_to_markdown。请勿用于 SEO 分析——改用 seo_audit_page。
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
url | string | 是 | 要缩短的 URL |
custom_alias | string | 否 | 短 URL 的自定义别名(可选,3-20 个字母数字字符) |
Agent 提示词示例
- “将长 URL 缩短为简洁的链接”
付款
- 协议:x402——基于 HTTP 的按次付费,无需注册,无需 API 密钥
- 网络:Base L2(
eip155:8453) - 资产:USDC
- 支付协调方:Coinbase CDP(主要),PayAI(备用)
klymax402 的一部分
为 AI Agent 提供 100 个 x402 微支付 API——只需一个钱包,即可使用 Base 上的 USDC,无需注册。
- 目录:https://klymax402.com/llms.txt
- 完整 API 参考:https://klymax402.com/llms-full.txt
- 实时统计数据:https://klymax402.com/stats
许可证
MIT
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。