Dub.co MCP 服务器
](https://smithery.ai/server/@Gitmaxd/dubco-mcp-server)  
MCP服务器,用于与 Dub.co 链接缩短器API。此服务器允许AI代理通过您的Dub.co帐户创建、更新和管理短链接。
特性
- 使用自定义蛞蝓创建短链接
- 更新现有短链接
- 更新链接(创建或更新)
- 删除链接
- 自动域选择
安装
通过Smithery安装
通过以下方式自动安装适用于Claude Desktop的Dub.co Link Shortener服务器 史密瑟里:
npx -y @smithery/cli install @Gitmaxd/dubco-mcp-server --client claude先决条件
- Node.js 18或更高版本
- 拥有API访问权限的Dub.co帐户
- 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:克隆和构建
# Clone the repository
git clone https://github.com/Gitmaxd/dubco-mcp-server.git
cd dubco-mcp-server
# Install dependencies
npm install
# Build the project
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密钥
- 登录到您的 Dub.co 账户
- 转到工作区设置
- 导航到“API”部分
- 生成新的API密钥
用法
安装和配置后,MCP服务器为AI代理提供以下工具:
create_link
在dub.co上创建一个新的短链接。
{
"url": "https://example.com",
"key": "example", // optional
"domain": "your-domain.com", // optional
"externalId": "123" // optional
}update_link
更新dub.co上现有的短链接。
{
"linkId": "link_id_here",
"url": "https://new-example.com", // optional
"domain": "new-domain.com", // optional
"key": "new-slug" // optional
}upstret_link
在dub.co上创建或更新一个短链接。
{
"url": "https://example.com",
"key": "example", // optional
"domain": "your-domain.com", // optional
"externalId": "123" // optional
}delete_link
删除dub.co上的短链接。
{
"linkId": "link_id_here"
}许可证
麻省理工学院
