本项目是一个简单的 URL 缩短工具,借助 CleanURI 接口 实现 URL 缩短功能,并可运行在 FastMCP 服务器工具上。
httpxfastmcp若要通过 Smithery 自动在 Claude 桌面安装 URL 缩短工具,可执行以下命令:
npx -y @smithery/cli install @Talismanic/cleanuri-url-shortener-mcp --client claude
uv add httpx 'mcp[cli]'
docker build -t url-shortener .
uv run main.py
若基于 Docker 使用,无需执行其他操作。
{
"mcpServers": {
"url-shortener": {
"command": "/Users/{userName}/.local/bin/uv",
"args": [
"--directory",
"{path_to_repo}/cleanuri-url-shortener-mcp",
"run",
"main.py"
]
}
}
}
{
"mcpServers": {
"url-shortener": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--init",
"-e",
"DOCKER_CONTAINER=true"
]
}
}
}
stdio 传输运行,便于与代理或基于工具的系统集成。