Back to MCP directory
publicPublicdnsLocal runtime

dubco-mcp-server

一个用于Dub.co短链接服务的MCP服务器,提供创建、更新和管理短链接的功能。

article

README

🚀 Dub.co链式服务器

Dub.co链式服务器是一个用于与 Dub.co 链接缩短器 API 交互的 MCP 服务器。它允许 AI 代理通过您的 Dub.co 账户创建、更新和管理短链接,为链接管理提供了便捷的解决方案。

smithery 徽章 MCP 兼容性 许可证: MIT

🚀 快速开始

Dub.co链式服务器可帮助您轻松与 Dub.co 链接缩短器 API 进行交互。通过该服务器,AI 代理能够借助您的 Dub.co 账户对短链接进行创建、更新和管理等操作。

✨ 主要特性

  • 自定义短链接创建:使用自定义短语创建短链接。
  • 链接更新功能:可更新现有短链接。
  • 灵活的链接操作:支持创建或更新短链接(upsert)。
  • 链接删除操作:能够删除短链接。
  • 自动域名选择:自动选择域名。

📦 安装指南

通过 Smithery 安装

要自动安装适用于 Claude Desktop 的 Dub.co 链接缩短器服务器 MCP 服务器,可使用 Smithery

npx -y @smithery/cli install @Gitmaxd/dubco-mcp-server --client claude

先决条件

  • Node.js 18 或更高版本。
  • Dub.co 账户及 API 访问权限。
  • Dub.co 的一个 API 密钥。

方法 1:通过 NPM 安装(推荐)

npm install -g dubco-mcp-server

然后将以下内容添加到您的 MCP 配置中:

{
  "mcpServers": {
    "dubco-server": {
      "command": "dubco-mcp-server",
      "env": {
        "DUBCO_API_KEY": "your_api_key_here"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

方法 2:克隆并构建

# 克隆仓库
git clone https://github.com/Gitmaxd/dubco-mcp-server.git
cd dubco-mcp-server

# 安装依赖项
npm install

# 构建项目
npm run build

然后将以下内容添加到您的 MCP 配置中:

{
  "mcpServers": {
    "dubco-server": {
      "command": "node",
      "args": ["/path/to/dubco-mcp-server/build/index.js"],
      "env": {
        "DUBCO_API_KEY": "your_api_key_here"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

获取 Dub.co API 密钥

  1. 登录到您的 Dub.co 账户。
  2. 进入设置部分。
  3. 找到 API Key 设置。
  4. 创建并获取新的 API 密钥。

💻 使用示例

基础用法

create_link

创建一个新的短链接:

{
  "url": "https://example.com",
  "phrase": "shortener"
}

update_link

更新现有短链接:

{
  "id": "12345",
  "url": "https://newexample.com",
  "phrase": "updated_shortener"
}

upsert_link

创建或更新短链接:

{
  "id": "12345",
  "url": "https://existingexample.com",
  "phrase": "existing_shortener"
}

delete_link

删除短链接:

{
  "id": "12345"
}

📄 许可证

本项目采用 MIT License 许可协议。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client