LABSCO SUMMARY
No key, no account, one thing done.
Worth having when an agent produces links that end up somewhere with a length limit — a message, a caption, a commit trailer. The dependency is CleanURI's free service, so availability and link lifetime are theirs, not yours.
What it is
A one-job server: it takes a long URL, calls the CleanURI shortening service, validates the response, and returns the short link.
What you get
- Shortening for any URL you pass, with the response validated and errors handled rather than passed through raw
Requirements
Python 3.11 or newer with httpx and mcp[cli], run over stdio — the documented paths are uv run main.py from a clone, or a Docker image built from the repository. It is not on PyPI, so both paths start from a clone. No account and no key.
Setup effort
Build from source — git clone https://github.com/Talismanic/cleanuri-url-shortener-mcp.git
USE CASES
Trimming a long link before sharing it
Hand over the URL and get the short form back in the same turn.
Fitting a link into a length-limited message
Shorten as part of drafting, rather than opening a separate service.
BEFORE YOU INSTALL
What to know first
Requires
- uv (or Docker for the Docker route)
- Python 3.11+
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/Talismanic/cleanuri-url-shortener-mcp.git
cd cleanuri-url-shortener-mcp
uv add httpx 'mcp[cli]'MCP Clients
Claude Desktop
{
"mcpServers": {
"url-shortener": {
"command": "/Users/<YOUR_USERNAME>/.local/bin/uv",
"args": [
"--directory",
"<YOUR_PATH_TO_REPO>/cleanuri-url-shortener-mcp",
"run",
"main.py"
]
}
}
}<YOUR_USERNAME> is your macOS user name (the path is where the uv installer puts uv; run which uv to check), and <YOUR_PATH_TO_REPO> is the folder you cloned into.
Claude Desktop — Docker
git clone https://github.com/Talismanic/cleanuri-url-shortener-mcp.git
cd cleanuri-url-shortener-mcp
docker build -t url-shortener .Add this to claude_desktop_config.json:
{
"mcpServers": {
"url-shortener": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--init",
"-e",
"DOCKER_CONTAINER=true",
"url-shortener"
]
}
}
}