Unofficial dubco-mcp-server
非官方 dubco-mcp-server
用于创建和管理Dub.co短链接的模型上下文协议 (MCP) 服务器(非官方)。该服务器支持 AI 助手通过 Dub.co API 创建、更新和删除短链接。
🚀 功能
使用您的 Dub.co 域名创建自定义短链接
更新现有的短链接
删除短链接
通过模型上下文协议与人工智能助手无缝集成
Related MCP server: MCP API Server
📋 先决条件
Node.js 16.0.0 或更高版本
具有 API 访问权限的 Dub.co 帐户
Dub.co 仪表板上的 API 密钥
💻安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Dub.co MCP 服务器:
npx -y @smithery/cli install @Gitmaxd/dubco-mcp-server-npm --client claude全局安装
npm install -g dubco-mcp-server本地安装
npm install dubco-mcp-server直接使用 npx
npx dubco-mcp-server⚙️ 配置
此 MCP 服务器需要 Dub.co API 密钥才能运行。您可以从Dub.co 仪表板获取 API 密钥。
将 API 密钥设置为环境变量:
export DUBCO_API_KEY=your_api_key_here对于持久配置,请将其添加到您的 shell 配置文件(例如.bashrc 、 .zshrc ):
echo 'export DUBCO_API_KEY=your_api_key_here' >> ~/.zshrc🖥️ Cursor IDE 设置
Cursor IDE 原生支持 MCP 服务器。请按照以下步骤在 Cursor 中设置 dubco-mcp-server:
步骤 1:安装 Cursor IDE
如果还没有,请下载并安装Cursor IDE (版本 0.4.5.9 或更高版本)。
第 2 步:打开光标设置
打开游标 IDE
单击左下角的齿轮图标,或使用键盘快捷键
Cmd+,(Mac) 或Ctrl+,(Windows/Linux)导航至“功能”部分
向下滚动找到“MCP 服务器”部分
步骤 3:添加 MCP 服务器
点击“+ 添加新的 MCP 服务器”
在出现的对话框中:
名称:输入“Dub.co MCP Server”(或您喜欢的任何名称)
类型:从下拉菜单中选择“命令”
命令:输入
env DUBCO_API_KEY=your_api_key_here npx -y dubco-mcp-server(将your_api_key_here替换为您的实际 Dub.co API 密钥)
点击“保存”添加服务器
步骤 4:验证连接
添加 MCP 服务器后,您应该会在服务器名称旁边看到一个绿色的状态指示器。如果显示红色或黄色状态,请尝试:
检查您的 API 密钥是否正确
重启 Cursor IDE
验证 Node.js (16.0.0+) 是否正确安装
步骤5:使用服务器
dubco-mcp-server 提供了可与 Cursor 的 AI 功能一起使用的工具:
打开 Cursor 的 Composer 或 Agent 模式(MCP 仅在这些模式下有效)
明确指示 AI 使用 Dub.co 工具(create_link、update_link、delete_link)
当出现工具使用提示时接受它们
🔧 与 MCP 一起使用
此服务器提供可供 AI 助手通过模型上下文协议 (MCP) 使用的工具。要将其与兼容 MCP 的 AI 助手一起使用,请将其添加到您的 MCP 配置中。
MCP 配置示例
{
"mcpServers": {
"dubco": {
"command": "npx",
"args": ["-y", "dubco-mcp-server"],
"env": {
"DUBCO_API_KEY": "your_api_key_here"
},
"disabled": false,
"autoApprove": []
}
}
}可用工具
创建链接
在 Dub.co 上创建一个新的短链接。
参数:
{
"url": "https://example.com",
"key": "optional-custom-slug",
"externalId": "optional-external-id",
"domain": "optional-domain-slug"
}例子:
{
"url": "https://github.com/gitmaxd/dubco-mcp-server-npm",
"key": "dubco-mcp"
}更新链接
更新 Dub.co 上现有的短链接。
参数:
{
"linkId": "link-id-to-update",
"url": "https://new-destination.com",
"domain": "new-domain-slug",
"key": "new-custom-slug"
}例子:
{
"linkId": "clwxyz123456",
"url": "https://github.com/gitmaxd/dubco-mcp-server-npm/releases"
}删除链接
删除 Dub.co 上的短链接。
参数:
{
"linkId": "link-id-to-delete"
}例子:
{
"linkId": "clwxyz123456"
}🔍 工作原理
服务器使用您的 API 密钥连接到 Dub.co API,并通过模型上下文协议 (MCP) 为 AI 助手提供与 Dub.co 交互的标准化接口。调用工具时:
服务器验证输入参数
它向 Dub.co API 发送适当的请求
它处理响应并以 AI 助手可以理解的格式返回
🛠️ 开发
从源代码构建
git clone https://github.com/gitmaxd/dubco-mcp-server-npm.git
cd dubco-mcp-server-npm
npm install
npm run build以开发模式运行
npm run dev📝 许可证
该项目根据 ISC 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
🔗 链接
👥 贡献
欢迎贡献代码!欢迎提交 Pull 请求。
分叉存储库
创建你的功能分支(
git checkout -b feature/amazing-feature)提交您的更改(
git commit -m 'Add some amazing feature')推送到分支(
git push origin feature/amazing-feature)打开拉取请求
👨💻 创建者
这个非官方的 Dub.co MCP 服务器是由GitMaxd (X 上的@gitmaxd )创建的。
这个项目是为了学习练习而开发的,旨在理解模型上下文协议 (MCP) 以及如何构建 MCP 服务器。我选择 Dub.co 作为集成目标,是因为它拥有直观的 API 和实用功能,是学习项目的理想选择。
虽然我与 Dub.co 没有正式关系,但我强烈推荐他们的服务,无论是手动还是自动创建短链接。他们的 API 文档齐全,使用方便,非常适合这类集成。
如果您觉得本项目有用,或者有任何改进建议,欢迎随时联系我们或为代码库贡献代码。祝您链接缩短愉快!
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityDmaintenanceA Model Control Protocol server that enables Claude Desktop to interact with your self-hosted YOURLS URL shortener, allowing Claude to automatically shorten URLs, expand short URLs, and retrieve click statistics.14
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI assistants to make HTTP requests (GET, POST, PUT, DELETE) to external APIs through standardized MCP tools.42MIT
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that standardizes tool discovery, execution, and context management for AI applications.MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server for Dub that enables creating, updating, deleting short links and retrieving link analytics through natural language.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
MCP server for URL shortening and management
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Gitmaxd/dubco-mcp-server-npm'
If you have feedback or need assistance with the MCP directory API, please join our Discord server