Back to MCP directory
publicPublicdnsLocal runtime

u301-mcp

U301 URL短链接生成服务,通过MCP服务器快速创建可自定义的短链接,支持设置过期时间、密码保护等功能。

article

README

🚀 U301 URL短链接MCP服务器

U301 URL短链接MCP服务器可用于创建短链接,帮助用户将冗长的URL转换为简洁、易记的形式。

🚀 快速开始

使用MCP服务器创建短链接,你可以按照以下步骤操作:

  • 步骤1:在 U301控制台 创建一个API。
  • 步骤2:(可选)通过连接到Cloudflare添加你自己的域名。
  • 步骤3:添加此MCP服务器配置。
{
  "mcpServers": {
    "u301-url-shortener": {
      "command": "npx",
      "args": [
        "-y",
        "@u301/mcp"
      ],
      "env": {
        "U301_API_KEY": <Your-U301-API-Key>
        // "domain": <if you have one, or you don't need to config>
      }
    }
  }
}

现在你可以告知AI(如Cursor、Windsurf):

将此文件注释中的长URL替换为有意义且易记的短URL。

✨ 主要特性

使用MCP服务器创建短链接,支持以下参数:

  • url - 要缩短的URL。
  • slug - (可选)URL的自定义后缀。
  • expires - (可选)URL的过期时间(以秒为单位)。
  • password - (可选)访问URL所需的密码。
  • comment - (可选)在控制台中显示的备注。

📚 详细文档

环境变量

使用时需要配置以下环境变量:

  • API_KEY - U301 API密钥,创建短链接时必需。
  • domain - (可选)短链接域名,留空则使用默认值。
  • workspaceId - (可选)要使用的工作区,留空则使用默认值。

📄 许可证

本项目采用MIT许可证。

官方网站:https://u301.com

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