MCP Server
Shorten links with AI and the Rebrandly MCP Server
The Rebrandly MCP server is a Go-based server for creating branded short links with AI assistants. It is designed to be integrated with AI assistants that support custom MCP servers, such as Claude, Cursor, and GitHub Copilot.
These links can be used for social media sharing, marketing campaigns, and integrating URL shortening in applications using the Rebrandly API.
Requirements
- Go 1.20 or higher
- An API key from a valid Rebrandly account
Functionality
- Implements a single MCP tool:
create_short_link
- Generates short links with parameters like
destination
,workspace
,slashtag
, andtitle
- Built in Go and works locally via a simple binary
- Compatible with Claude Desktop, making it easy for AI agents to programmatically generate links
Setup
We’ll use Claude Desktop for this example.
Build the MCP Tool
To use the Rebrandly MCP Tool, clone one of the repositories below and build the binary. This will create a binary called rebrandly-tool
.
You can find the Rebrandly MCP in several public registries:
Configure Claude Desktop
- Find the path to your Claude configuration file, These are the most common::
macOS:~/Library/Application Support/Claude/claude_desktop_config.json
Windows:%APPDATA%\Claude\claude_desktop_config.json
Linux:~/.config/Claude/claude_desktop_config.json
- Open the file and add this block under "mcpServers":
{
"mcpServers": {
"Rebrandly": {
"command": "/absolute/path/to/rebrandly-tool",
"args": [],
"env": {
"REBRANDLY_API_KEY": "your-api-key-here"
}
}
}
}
- Replace
/absolute/path/to/rebrandly-tool
with the full path to the binary you built, andyour-api-key-here
with your actual Rebrandly API key. - Save the file.
- Restart Claude.
Using an AI assistant to shorten a link
Once the MCP is connected to your AI assistant, you can shorten a link with a simple AI prompt. The request will always need a destination URL, and you can optionally add workspace, slashtag, or title information to your short link request.
For example: “Create a short link for https://www.rebrandly.com/blog/news/link-shortener-mcp/ with the slashtag “julyUpdateAI” at end of the short link. Give it the title “Our AI update” so that I can find it in my Rebrandly account later.”
These are each of the possible parameters. Again, the destination is always required.
Parameter | Description |
---|---|
destination(required) | The original long URL to shorten |
workspace | Optional workspace ID (for multi-workspace accounts) |
slashtag | Optional custom slug |
title | Optional title for the short link |
Updated 3 days ago