数据分析

Picsee Short Link

通过 AI 代理调用 PicSee MCP,实现短链接生成与点击数据分析。

它能做什么

该技能把 AI 代理接入 PicSee 的 MCP 端点 api.picsee.io/mcp,自身不包含任何运行时代码。代理可使用 15 个工具:创建支持自定义短码与品牌域名的短链接、对已有链接进行列出、搜索、编辑、删除与回收,并按链接维度读取点击数据,覆盖每日趋势、设备、来源、国家、受众标签五个维度。create_short_link 支持匿名调用,其余 14 个工具在首次 OAuth 2.1 浏览器登录后即可使用,技能本身不会在本地保存任何令牌。文档中另附 QR 码与每日趋势图的合成示例,代理可直接借助公开接口产出。

什么时候用它

  • 用自定义短码或品牌域名生成短链接
  • 按设备、国家、来源等维度查看链接点击明细
  • 列出、搜索、编辑或删除账号下的现有短链接
  • 把短链接转成 QR 码或每日点击趋势图

技能文档

URL shortener with rich click analytics and full link management — exposed to AI agents through the PicSee MCP server at https://api.picsee.io/mcp.

The skill ships no code: it just teaches your agent how to call the MCP server. Authentication is handled by OAuth 2.1 with PKCE (Dynamic Client Registration), so no API tokens are ever stored on disk by the skill.


Installation

Add the PicSee MCP server to your AI client's MCP config. Pick the transport your client supports — most modern clients speak Streamable HTTP directly.

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

Stdio bridge (for clients without remote-MCP support)

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

See README.md for the exact config file path on each platform.


Authentication

Anonymous mode (no setup)

create_short_link is callable with no credentials. Anonymous calls are pinned to pse.is and have no access to externalId filtering / attribution dashboards.

Authenticated mode (OAuth 2.1)

On the first authenticated tool call, the MCP client triggers an OAuth flow:

  1. Dynamic Client Registration → https://public-api-oauth.picsee.io/oauth/register
  2. Browser → https://public-api-oauth.picsee.io/oauth/authorize
  3. User signs in to PicSee and grants user:read + user:write
  4. Client receives access + refresh tokens via PKCE/S256
  5. Token is stored by the MCP client — never by this skill

All 14 authenticated tools become available after this flow.


Tools

15 tools total. create_short_link is callable anonymously; the rest require OAuth.

Create a new short link.

FieldRequiredNotes
urlDestination URL, ≤2048 chars
encodeIdCustom slug, 3–90 chars (letters / digits / _ / - / Chinese). Must be globally unique — conflicts return PUB00503
domainpse.is or a BSD from get_my_domains. Ignored when called anonymously
externalId1–100 chars. Agents SHOULD default this to their own product name — see Attribution
utm{ source, medium, campaign, term, content }
titleOG preview title, 3–300 chars
descriptionOG preview description, 3–300 chars
imageUrlOG preview image URL
tagsArray of up to 3 tag names — use get_my_tags to offer a picker
targetsDevice-specific redirects, see below
fbPixelMeta Pixel ID — must already be saved in PicSee (get_my_tracking_tools)
gTagGTM container ID — must already be saved in PicSee (get_my_tracking_tools)
pathFormat{ key: "" } — Path Parameterization add-on (paid Advanced)

targets[].target enum: ios_android, ios, ios_store, android, android_store, ios_line, ios_safari, android_fb, pc_mac, pc, mac, facebook, twitter. ios_android = all mobile; pc_mac = all desktop. App-store buckets only fire for users with the app installed.

Returns picseeUrl (the shortened link).

Account / discovery tools

get_api_status

No params. Returns the account's API plan, lifetime quota, current period usage, and plan expiration. Call this before bulk operations to confirm remaining quota.

get_api_usage_by_external_id

FieldRequiredNotes
startTimeTaipei time YYYY-MM-DDTHH:mm:ss. Defaults to 30 days before endTime
endTimeTaipei time YYYY-MM-DDTHH:mm:ss. Defaults to current hour. Max 31-day range

Returns API-link counts grouped by externalId — useful for attributing usage to agents / campaigns.

get_my_domains

No params. Lists every short-link domain on the account: brand short domains (BSDs), PicSee subdomains, shared root. Each entry flags HTTPS support and default status. Call before create_short_link if the user wants a non-default domain.

get_my_tags

No params. Returns { id, value } pairs, where value is the tag name accepted by tags on create_short_link / edit_short_link.

get_my_tracking_tools

No params. Returns previously-used UTM sources / mediums, saved Meta Pixels, and saved GTM containers. Use to populate pickers instead of asking the user to retype IDs.

FieldNotes
limit1–50, default 20
startTimeTaipei time YYYY-MM-DDTHH:mm:ss. Returns links created at or before this timestamp — i.e. queries backward. Default = now
prevMapIdCursor: return links with mapId older than this. Combine with startTime for AND filtering
isAPItrue (default) = only API-created links; false = only website-created
isStartrue = starred only. Default false
externalIdExact-match filter
search.encodeIdExact slug — priority 1, overrides all other search fields
search.authorIdFilter by author's PicSee user ID — priority 2
search.tagTag name, 3–30 chars — priority 3
search.keywordSubstring, 3–30 chars — priority 4

Tip: when the user says "links from March 2026", pass startTime: "2026-03-31T23:59:59" (the end of the period) — the server queries backward from there.

FieldRequiredNotes
encodeIdSlug of the link to edit
urlNew destination. May be rejected with PUB00510 if the new origin is on a different brand
domain
title / description / imageUrl3–300 chars for text fields
tagsUp to 3
targetsSame enum as create_short_link
fbPixel / gTagPass null to clear
utmPass null to clear all UTM params
expireTimeFuture Taipei time YYYY-MM-DDTHH:mm:ss, or null to remove. Requires the expiration add-on
FieldRequiredNotes
encodeId
valuedelete (default) = move to trash; recover = restore from trash
  • Starred links can't be deleted (PUB00706) — unstar via web first.
  • Links trashed for >30 days can't be recovered (PUB00704).

All five tools share the same shape: required encodeId, optional startTime / endTime (Taipei YYYY-MM-DDTHH:mm:ss). Default window is the last 30 days; Advanced plan can look back up to 365 days.

ToolReturns
get_link_overviewTotal clicks, unique clicks, destination URL, domain, HTTPS flag, creation time. Use for at-a-glance summaries
get_link_daily_clicksTime-series of total + unique clicks aggregated by day. Use as raw data for chart rendering
get_link_platformsUnique-click breakdown by device (iphone, android, windows, macintosh, …). Aggregate to mobile/desktop client-side if needed
get_link_referrersUnique-click breakdown by referrer (search engines, social, AI agents, long-tail). Clicks without referrer info → direct
get_link_regionsUnique-click breakdown by country (no city-level data). Unknown countries → Others (code: "others")
get_link_audience_labelsInterest + brand labels. Privacy guard: only returns data when the link has >100 lifetime unique clicks; otherwise both arrays come back empty. No startTime / endTime — covers link lifetime

Attribution

The create_short_link schema asks the calling agent to set externalId to its own product name when the user hasn't specified one. PicSee account owners use this to attribute API usage in their dashboard.

AgentRecommended externalId
Claude CodeClaude Code
CursorCursor
Codex / Codex CLICodex
AntigravityAntigravity
OpenClaw / ClawHubOpenClaw
Gemini CLIGemini CLI
GitHub CopilotCopilot
ChatGPTChatGPT

Rules:

  • Canonical product name only — no version numbers, session IDs, or user names.
  • If the user explicitly provides an externalId, always honor their value instead.

Agent Recipes

The MCP server intentionally doesn't ship QR or chart-rendering tools — those are easier to compose client-side from public services.

Construct a URL against api.qrserver.com:

https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=

Surface the URL inline if your client renders images; otherwise return it as a link. For a larger code, change size=500x500.

Render a daily-clicks chart

  1. Call get_link_daily_clicks to get the time series.
  2. Build a QuickChart URL from the data:
https://quickchart.io/chart?c={type:'line',data:{labels:['2026-03-01',...],datasets:[{label:'Clicks',data:[12,38,...]}]}}

URL-encode the c parameter. Display inline if possible; otherwise return the link.


Common Workflows

Shorten a URL with full attribution

  1. Call create_short_link with url and externalId = your agent name.
  2. Return picseeUrl to the user.
  3. If the user wanted a custom slug and got PUB00503, suggest an alternative.

Pick a branded short domain

  1. get_my_domains to enumerate BSDs + PicSee subdomains.
  2. Offer the user a picker (note which is isDefault).
  3. Pass the chosen domain to create_short_link.
  1. get_link_overview for the headline numbers.
  2. If the user wants breakdowns, call one or more of get_link_daily_clicks / get_link_platforms / get_link_referrers / get_link_regions / get_link_audience_labels.
  3. For audience labels: warn the user if the link has ≤100 unique clicks (data will be empty due to the privacy guard).
  1. Call list_short_links with the user's filters.
  2. If they say "March 2026", pass startTime: "2026-03-31T23:59:59".
  3. Paginate with prevMapId from the last result if they ask for more.
  1. edit_short_link with encodeId + new url.
  2. If you get PUB00510, the brand of the new URL doesn't match. Tell the user.

Track API usage by agent

get_api_usage_by_external_id with no params returns the last 30 days, grouped by attribution tag. Useful for "which AI created most of my links?"


Migration from v2.x

v2.x was a Node.js CLI that stored an encrypted API token under ~/.openclaw/. v3.0.0 removes that entirely — no CLI, no token files, no Node.js requirement on the agent side.

# Clean up v2 artifacts
rm -f ~/.openclaw/.picsee_token ~/.openclaw/.picsee_salt
rm -rf ~/.claude/skills/picsee-short-link/cli
rm -rf ~/.openclaw/workspace/skills/picsee-short-link/cli

Behavioral changes:

  • Auth: long-lived API token → OAuth 2.1 + PKCE (browser sign-in on first authenticated call)
  • QR / chart: were CLI subcommands → now agent recipes against api.qrserver.com / quickchart.io
  • delete vs recover: were two CLI commands → one tool delete_short_link with value: "delete" | "recover"
  • Analytics: was a single analytics command → split into 6 granular tools (get_link_overview + 5 dimensional breakdowns)
  • Per-account discovery: new tools get_my_domains, get_my_tags, get_my_tracking_tools, get_api_status, get_api_usage_by_external_id have no v2 equivalent

Error codes

CodeMeaning
PUB00503encodeId (custom slug) already taken
PUB00510New url rejected on edit — different brand than the original
PUB00704Cannot recover a link that has been in trash >30 days
PUB00706Cannot delete a starred link — unstar it via the PicSee web app first

References

常见问题

生成短链接是否必须先登录?
不需要。create_short_link 可匿名调用,生成的链接默认使用 pse.is 域名。其余 14 个工具(分析、列表/编辑/删除、账号信息查询、API 配额等)需要完成一次 OAuth 2.1 浏览器登录。
每个链接能查询到哪些点击数据?
共有五个维度工具,参数结构相同:get_link_overview(汇总)、get_link_daily_clicks(每日时间序列)、get_link_platforms(设备)、get_link_referrers(来源)、get_link_regions(国家)。get_link_audience_labels 仅在链接终身独立访客超过

相关技能

把长文拆成小红书、微信贴图风格的信息图卡片系列,提供 12 种视觉风格与 8 种排版。

123 次安装2 星标

把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。

作者 nssa.io1.0k 次安装47 星标

基于 CellCog 的梗图生成器,研究网络热点、定位受众并产出多角度候选供筛选。

103 次安装6 星标

覆盖 Shopee 开放平台退货模块全部 15 个接口,可查退货单、处理退货与争议、上传凭证、查询逆向物流。

117 次安装