CleanURI URL 缩短工具

CleanURI URL 缩短工具

一个基于 CleanURI API 的 URL 缩短工具,支持 FastMCP 集成。

快速入门

1. 环境要求

  • Python 3.10+
  • 安装依赖:httpxfastmcp

2. 安装方式

通过 Smithery 安装: 运行以下命令以自动安装: npx -y @smithery/cli install @Talismanic/cleanuri-url-shortener-mcp --client claude

手动安装: uv add httpx 'mcp[cli]'

Docker 安装: docker build -t url-shortener .

3. 启动服务

普通模式: uv run main.py

Docker 模式: 无需额外操作。

4. 在 Claude Desktop 中配置

使用 uv: { "mcpServers": { "url-shortener": { "command": "/Users/{userName}/.local/bin/uv", "args": [ "--directory", "{path_to_repo}/cleanuri-url-shortener-mcp", "run", "main.py" ] } } }

使用 Docker: { "mcpServers": { "url-shortener": { "command": "docker", "args": [ "run", "-i", "--rm", "--init", "-e", "DOCKER_CONTAINER=true", "url-shortener" ] } } }