- Home
- MCP servers
- URL Shortener
URL Shortener
- python
4
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"talismanic-cleanuri-url-shortener-mcp": {
"command": "/Users/{userName}/.local/bin/uv",
"args": [
"--directory",
"{path_to_repo}/cleanuri-url-shortener-mcp",
"run",
"main.py"
]
}
}
}This MCP server provides a simple URL shortening tool that uses the CleanURI API. It runs as a FastMCP stdio server, allowing you to interact with it from an MCP client to convert long URLs into shorter ones and handle errors gracefully. It’s useful when you want a compact, reusable URL shortener integrated into your workflows or agent-based systems.
How to use
You run the URL Shortener MCP Server as a local process and connect to it through a FastMCP client. The server exposes a single core capability: shorten a URL by sending the target URL to the CleanURI API and receiving a shortened link in return. Use it in automation pipelines, chat assistants, or any workflow that benefits from compact links. If an input is invalid or the API returns an error, you’ll receive a structured error response that you can handle in your client.
How to install
Prerequisites you need before installing and running the URL Shortener MCP Server are:
- Python 3.10 or newer
- httpx package
- fastmcp package
How to install
Concrete installation and setup steps are provided below. Follow these to obtain a working MCP server instance that you can connect to from your MCP client.
How to install
Step-by-step commands you can run:
# Prerequisites (example if you are starting from a clean environment)
python3.10 -m venv venv
source venv/bin/activate
pip install httpx fastmcp
# Ensure you can run the main entrypoint (as described in the dedicated runtime guidance)
uv run main.py
Available tools
shorten
Shortens a given URL by sending it to the CleanURI API and returns the shortened link, with error handling and response validation.