VS Code + Short URL MCP
你写了一篇技术博客,里面引用了 7、8 个外部链接——GitHub Issue、Stack Overflow、RFC 文档……每个 URL 都七八十个字符长。
贴到微信群或者钉钉里?链接直接折行,点都点不准。放 PPT 上?占半个屏幕。
以前的做法:开一个 bit.ly 的标签页,一个一个粘贴、缩短、再拷回来。现在你可以在 VS Code 里对 Copilot 说一句话,Short URL MCP 全程帮你搞定,不用切窗口。
¶ 第 1 步:获取 API Key
打开 Ace Data Cloud 应用列表,进入可用的应用并复制 API Key。

¶ 第 2 步:安装插件
- 打开 VS Code 扩展市场(
Cmd+Shift+X) - 搜索
Short URL MCP,或直接搜索扩展 ID:acedatacloud.mcp-shorturl - 点击 Install,安装后按提示重载窗口
¶ 第 3 步:填写 API Key
- 按
Cmd+Shift+P,执行:Short URL MCP: Set Ace Data Cloud API Key - 粘贴 API Key,回车保存(保存在 VS Code SecretStorage / 系统钥匙串)
如果要换 Key,可执行 Short URL MCP: Clear Ace Data Cloud API Key 后重新设置。
¶ 第 4 步:验证连接
- 打开 GitHub Copilot Chat,切到 Agent 模式
- 直接提需求并点名
shorturl,例如:用 shorturl 帮我完成这个任务 - 首次调用时会自动走到该插件并使用你保存的 API Key
¶ 进阶:手动 mcp.json(可选)
如果你更偏好手动配置,也可以在项目里写 .vscode/mcp.json:
{
"servers": {
"shorturl": {
"type": "http",
"url": "https://shorturl.mcp.acedata.cloud/mcp",
"headers": {
"Authorization": "Bearer ${input:acedata-api-key}"
}
}
},
"inputs": [
{
"id": "acedata-api-key",
"type": "promptString",
"description": "Ace Data Cloud API Key",
"password": true
}
]
}
¶ 使用场景
API 文档分享
你写了一个接口文档,要把链接发给前端同事。原始地址是一长串带参数的 Notion 链接:
> 把这个链接缩短:https://www.notion.so/workspace/API-Documentation-v2-Final-Review-abc123def456...
shorturl_create 生成一个 https://surl.id/xxx 的短链接,干净利落。
Release Notes 里的批量链接
你在写版本发布说明,引用了 5 个 GitHub PR 链接、3 个 Issue 链接。让 Copilot 帮你逐个处理:
> 帮我把下面这些链接全部转成短链接:
> https://github.com/org/repo/pull/142
> https://github.com/org/repo/pull/145
> https://github.com/org/repo/issues/89
二维码友好
短链接生成二维码更小更易扫——尤其是放在 PPT 或海报上的时候。URL 越短,二维码的密度越低,扫描成功率越高。
¶ 工具列表
| 工具 | 说明 |
|---|---|
shorturl_create |
生成短链接 |
shorturl_batch_create |
批量生成短链接(一次最多 10 个) |
¶ 其他编辑器配置
- Cursor —
.cursor/mcp.json,mcpServers下同样配置 - Claude Code — 终端命令行配置,详见 Claude Code + Short URL MCP 教程
- Claude Desktop — macOS:
~/Library/Application Support/Claude/claude_desktop_config.json;Windows:%APPDATA%\Claude\claude_desktop_config.json
