URL短链管理工具

基于MCP协议的PicSee URL短链服务,提供链接缩短、二维码生成、点击分析和链接管理功能,适用于AI代理集成。

  • by PicSeeInc
  • 云端部署
  • 2 星标
  • 更新于
在 GitHub 查看 PicSeeInc/picsee-short-link

使用说明

🔗 PicSee URL缩短器的技巧

一 基于MCP 代理技能 为了 图片查看 --网址缩短、二维码生成、点击分析和链接管理。

该技能只是文档:它将您的AI代理指向公共PicSee MCP服务器(https://api.picsee.io/mcp)并解释了如何使用这些工具。无需安装Node.js,无需CLI,无需本地令牌文件——身份验证由 OAuth 2.1+PKCE 通过MCP客户端。


🌟 v3.0.0中的新增功能

  • CLI → MCP:整个v2.x CLI(node cli/dist/cli.js …)消失了。所有功能现在都作为MCP工具公开 api.picsee.io/mcp.
  • OAuth 2.1+PKCE:替换本地AES-256令牌加密。令牌由您的MCP客户端管理,而不是由此技能管理。动态客户端注册意味着不需要手动设置应用程序。
  • 匿名模式仍然有效: create_short_link 无需身份验证即可调用,非常适合一次性短路。
  • 无需Node.js:适用于任何支持MCP的客户端,包括无法执行Node的客户端(例如Cursor、基于web的代理)。
  • 内置代理归因:服务器记录设置约定 externalId 以AI代理的名义(Claude Code, Cursor, Codex,…),以便帐户所有者可以看到哪个代理创建了哪个链接。

从v2.x迁移?请参阅 迁移 部分。


⚙️ 按平台安装

该技能由两部分组成:

  1. 技能含量 (SKILL.md +此README)-放置在平台的技能目录中,以便代理自动发现使用说明。
  2. MCP服务器注册 --添加到平台的MCP配置中,以便代理可以实际调用这些工具。

克劳德代码

# 1. Install the skill
cp -r picsee-short-link ~/.claude/skills/picsee-short-link

# 2. Register the MCP server
claude mcp add --transport http picsee-short-link https://api.picsee.io/mcp

或手动添加到 ~/.claude.json (或项目 .mcp.json):

{
  "mcpServers": {
    "picsee-short-link": { "type": "http", "url": "https://api.picsee.io/mcp" }
  }
}

光标

将技能放在 .cursor/skills/picsee-short-link/,然后编辑 ~/.cursor/mcp.json (全球)或 .cursor/mcp.json (项目):

{
  "mcpServers": {
    "picsee-short-link": { "url": "https://api.picsee.io/mcp/auth" }
  }
}

对于光标,请使用 https://api.picsee.io/mcp/auth 当您需要登录时(OAuth)。匿名使用(create_short_link 仅)可以继续 https://api.picsee.io/mcp.

反重力

Antigravity使用MCP流式HTTP 天生地.编辑 ~/.gemini/config/mcp_config.json (它共享Gemini的配置目录,并使用密钥 serverUrl):

{
  "mcpServers": {
    "picsee-short-link": { "serverUrl": "https://api.picsee.io/mcp" }
  }
}

然后打开 设置→ 定制→ 已安装的MCP服务器,单击 刷新,服务器出现。点击 验证 旁边是通过OAuth登录并解锁完整的身份验证工具集(匿名模式仅公开 create_short_link).

地方 SKILL.md 在Antigravity的技能目录中,这样代理就可以获取使用指南。

赫尔墨斯代理

赫尔墨斯代理 (Nous Research)发表MCP演讲 天生地 作为客户端和服务器。编辑 ~/.hermes/config.yaml 并在下面添加服务器 mcp_servers,使用 auth: oauth 因此Hermes在第一个经过身份验证的呼叫上运行浏览器登录流:

mcp_servers:
  picsee-short-link:
    url: "https://api.picsee.io/mcp"
    auth: oauth

在第一次经过身份验证的调用中,Hermes会打印一个授权URL(并在可能的情况下打开浏览器),然后在本地环回端口上等待OAuth回调。令牌缓存在 ~/.hermes/mcp-tokens/picsee-short-link.json (模式 0o600)并默默地重复使用,直到刷新失败。匿名使用(create_short_link 仅),放下 auth: oauth 线。

将技能文件夹放入 ~/.hermes/skills/picsee-short-link/ (包含 SKILL.md)Hermes立即加载,无需注册。

Codex/Codex CLI

使用Codex CLI添加服务器:

codex mcp add picsee-short-link --url https://api.picsee.io/mcp

或者直接添加到 ~/.codex/config.toml:

[mcp_servers.picsee-short-link]
url = "https://api.picsee.io/mcp"

然后使用OAuth对其进行身份验证:

codex mcp login picsee-short-link --scopes user:read,user:write

Codex支持通过--url和MCP通过Streamable HTTP远程MCP服务器 服务器配置在CLI和IDE扩展之间共享。 platform.openai.com

如果您使用技能,请将SKILL.md放在:

~/.codex/skills/picsee-short-link/SKILL.md

OpenClaw/ClawHub

clawhub install picsee-short-link

或浏览: https://clawhub.ai/PicSeeInc/picsee-short-link

ClawHub从技能的元数据中自动注册MCP服务器。

claude.ai(网络)

上传技能文件夹 定制→ 技能.在中添加MCP服务器 设置→ 连接器→ 添加自定义连接器 带有URL https://api.picsee.io/mcp.

通用MCP客户端

任何说话的客户 MCP流式HTTP 可以直接注册服务器:

{
  "mcpServers": {
    "picsee-short-link": { "url": "https://api.picsee.io/mcp" }
  }
}

对于仅支持stdio的客户端,请使用 mcp-remote 来自npm的桥:

{
  "mcpServers": {
    "picsee-short-link": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.picsee.io/mcp"]
    }
  }
}

🤖 兼容性矩阵

平台 技能发现 MCP传输 OAuth流 状态
克劳德代码 ~/.claude/skills/ HTTP(本机) 浏览器弹出窗口,令牌在 ~/.claude ✅
光标 .cursor/skills/ HTTP(本机) 浏览器弹出窗口,游标配置中的令牌 ✅
反重力 反重力技能目录 HTTP(原生, serverUrl) 浏览器弹出窗口(验证按钮) ✅
爱马仕代理商 ~/.hermes/skills/ HTTP(本地, config.yaml) 浏览器弹出窗口,令牌在 ~/.hermes/mcp-tokens/ ✅
Codex CLI .codex/skills/ stdio通过 mcp-remote 浏览器弹出窗口通过 mcp-remote ✅
OpenClaw/ClawHub 自动(通过 clawhub install) HTTP 浏览器弹出窗口 ✅
claude.ai 自定义→ 技能 HTTP连接器 浏览器弹出窗口 ✅
Gemini CLI .gemini/skills/ stdio通过 mcp-remote 浏览器弹出窗口通过 mcp-remote ✅
VS代码副本 .github/skills/ HTTP(1.95+) 浏览器弹出窗口 ✅

任何符合MCP的客户端都应该工作——上面的矩阵只是我们测试过的集成。


🧩 工具

create_short_link 是唯一可以匿名调用的工具。其他14个需要OAuth。

组 工具 身份验证
创建 create_short_link 可选
账户 get_api_status 必填项
get_api_usage_by_external_id 必填项
get_my_domains 必填项
get_my_tags 必填项
get_my_tracking_tools 必填项
管理 list_short_links 必填项
edit_short_link 必填项
delete_short_link (包括删除+恢复) 必填
分析 get_link_overview 必填项
get_link_daily_clicks 必填项
get_link_platforms 必填项
get_link_referrers 必填项
get_link_regions 必填项
get_link_audience_labels 必填项

服务器上没有二维码或图表工具 --这些是反对公共服务的代理人配方(api.qrserver.com, quickchart.io).看 技能.md→ 代理商食谱.

每个工具的完整参数表 技能.mdMCP服务器也可以通过以下方式进行自我描述 tools/list --这就是真理的来源。


🔑 认证

  1. 在客户端中注册MCP服务器(请参阅 安装).
  2. 要求代理执行需要身份验证的操作(例如“向我展示我最后一个链接的分析”)。
  3. MCP客户端打开浏览器 https://public-api-oauth.picsee.io/oauth/authorize.
  4. 登录PicSee并批准 user:read / user:write 范围。
  5. 完成——客户端存储令牌。在刷新令牌过期之前,未来的调用将保持静默。

技能文件夹永远不会触及您的令牌。所有凭证处理都存在于您的MCP客户端中。


🔒 安全

特性 v2.x(旧版) v3.0.0(当前版)
Auth模型 长期使用的API令牌 OAuth 2.1+PKCE(S256)
令牌存储 本地文件,AES-256-CBC MCP客户端(根据客户端策略)
范围 全有或全无 user:read, user:write
撤销 通过PicSee仪表板手动 每个客户,可从PicSee帐户撤销
动态客户端注册 n/a ✅ (RFC 7591)

OAuth元数据发布在 https://api.picsee.io/.well-known/oauth-protected-resource,授权服务器位于 https://public-api-oauth.picsee.io/.well-known/oauth-authorization-server.


🧭 代理人归属

MCP服务器要求呼叫代理进行设置 externalId 以自己的产品名称 create_short_link,因此PicSee帐户所有者可以对API使用情况进行归因。技能告诉您的代理默认为:

Claude Code · Cursor · Codex · Antigravity · OpenClaw · Gemini CLI · Copilot · ChatGPT

用户始终可以通过显式传递自己的来覆盖 externalId.


📁 项目结构

picsee-short-link/
├── SKILL.md     # Agent Skills definition — read by your agent
├── README.md    # This file — read by humans
└── _meta.json   # ClawHub registry metadata

不 cli/ 而且没有 references/ 在v3中,MCP服务器通过以下方式进行自描述 tools/list,并且REST API现在是服务器的实现细节。


从v2.x迁移

# 1. Remove the old encrypted token + salt files
rm -f ~/.openclaw/.picsee_token ~/.openclaw/.picsee_salt

# 2. Remove the old CLI build artifacts wherever the skill was installed
rm -rf ~/.claude/skills/picsee-short-link/cli
rm -rf ~/.openclaw/workspace/skills/picsee-short-link/cli
rm -rf .cursor/skills/picsee-short-link/cli

# 3. Reinstall the v3 skill (see Installation above) and register the MCP server.
# 4. Ask the agent to do something authenticated — sign in via browser when prompted.

不需要API令牌迁移-OAuth从头开始颁发新的凭据。


📖 资源


📄 许可证

麻省理工学院