跳轉到主要內容

Documentation Index

Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt

Use this file to discover all available pages before exploring further.

MCP(Model Context Protocol) 是由 Anthropic 推出的模型上下文協議,允許 AI 模型(如 Claude、GPT 等)通過標準化介面調用外部工具。透過 AceData Cloud 提供的 ShortURL MCP Server,你可以在 Claude Desktop、VS Code、Cursor 等 AI 客戶端中直接生成短連結。

功能概覽

ShortURL MCP Server 提供以下核心功能:
  • 單個連結縮短 — 將長 URL 轉換為簡短易分享的短連結
  • 批量連結縮短 — 一次性縮短多個 URL(最多 10 個)
  • 使用指南 — 獲取完整的使用說明和最佳實踐
  • API 資訊 — 查看 API 服務詳情和錯誤碼說明

前置準備

使用前,你需要獲取 AceData Cloud API Token:
  1. 註冊或登入 AceData Cloud 平台
  2. 前往 ShortURL API 頁面
  3. 點擊「Acquire」獲取 API Token(首次申請贈送免費額度)

安裝配置

方式一:pip 安裝(推薦)

pip install mcp-shorturl

方式二:原始碼安裝

git clone https://github.com/AceDataCloud/MCPShortURL.git
cd MCPShortURL
pip install -e .
安裝完成後,即可使用 mcp-shorturl 命令啟動服務。

在 Claude Desktop 中使用

編輯 Claude Desktop 配置檔:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
添加以下配置:
{
  "mcpServers": {
    "shorturl": {
      "command": "mcp-shorturl",
      "env": {
        "ACEDATACLOUD_API_TOKEN": "你的API Token"
      }
    }
  }
}
如果使用 uvx(無需提前安裝套件):
{
  "mcpServers": {
    "shorturl": {
      "command": "uvx",
      "args": ["mcp-shorturl"],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "你的API Token"
      }
    }
  }
}
保存配置後重啟 Claude Desktop,即可在對話中使用 ShortURL 相關工具。

在 VS Code / Cursor 中使用

在專案根目錄建立 .vscode/mcp.json
{
  "servers": {
    "shorturl": {
      "command": "mcp-shorturl",
      "env": {
        "ACEDATACLOUD_API_TOKEN": "你的API Token"
      }
    }
  }
}
或者使用 uvx
{
  "servers": {
    "shorturl": {
      "command": "uvx",
      "args": ["mcp-shorturl"],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "你的API Token"
      }
    }
  }
}

可用工具列表

工具名說明
shorturl_create縮短單個 URL
shorturl_batch_create批量縮短多個 URL(最多 10 個)
shorturl_get_usage_guide獲取完整使用指南
shorturl_get_api_info獲取 API 服務詳情

使用示例

配置完成後,你可以在 AI 客戶端中直接用自然語言調用這些功能,例如:
  • 「幫我把這個連結縮短一下」
  • 「批量縮短這 5 個 URL」
  • 「生成一個短連結用於分享」

更多資訊