This server is a URL Shortener MCP that provides a tool to shorten URLs using the CleanURI API.
Shorten URLs: Takes an
original_urlas input and returns a shortened versionFastMCP Integration: Designed to run as a FastMCP server tool for integration with agent or tool-based systems
Error Handling: Includes proper error handling and response validation
Multiple Installation Options: Can be installed via Smithery, manually with Python, or using Docker
Claude Desktop Integration: Can be easily added to Claude Desktop for streamlined usage
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@URL Shortener MCPshorten https://example.com/very-long-url-path-that-needs-shortening"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
URL Shortener MCP Tool
This project provides a simple URL shortening tool using the CleanURI API and is designed to run as a FastMCP server tool.
✨ Features
Shortens any given URL using the CleanURI API.
Exposes the functionality as a tool via FastMCP.
Includes proper error handling and response validation.
Designed to run via
stdiotransport for integration with agent or tool-based systems.
Related MCP server: FastAPI-MCP
🚀 Usage
1. Requirements
Python 3.10+
httpxfastmcp
2. Installation
Installing via Smithery
To install URL Shortener Tool for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @Talismanic/cleanuri-url-shortener-mcp --client claudeManual Installation
uv add httpx 'mcp[cli]'Docker Installation:
docker build -t url-shortener .3. Running
uv run main.pyFor docker based use, we dont need to do anything here.
4. Adding in Claude Desktop
With the uv
{
"mcpServers": {
"url-shortener": {
"command": "/Users/{userName}/.local/bin/uv",
"args": [
"--directory",
"{path_to_repo}/cleanuri-url-shortener-mcp",
"run",
"main.py"
]
}
}
}With Docker
{
"mcpServers": {
"url-shortener": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--init",
"-e",
"DOCKER_CONTAINER=true",
"url-shortener"
]
}
}
}