使用说明
URL缩短器MCP工具
该项目提供了一个简单的URL缩短工具,使用 CleanURI API 并且被设计为作为 FastMCP 服务器工具。
✨ 特性
- 使用CleanURI API缩短任何给定的URL。
- 通过FastMCP将功能作为工具公开。
- 包括正确的错误处理和响应验证。
- 设计用于通过
stdio用于与基于代理或工具的系统集成的传输。
🚀 用法
1.要求
- Python 3.10+
httpxfastmcp
2.安装
通过Smithery安装
通过以下方式自动安装Claude Desktop的URL缩短工具 史密瑟里:
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.添加克劳德桌面
随着紫外线
{
"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"
]
}
}
}
