mcp-shlink
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., "@mcp-shlinkCreate a short URL for https://www.example.com with slug 'my-link'"
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.
mcp-shlink
A Model Context Protocol (MCP) server for Shlink link shortening service. This server exposes Shlink's URL shortening, management, and tagging capabilities as MCP tools for AI assistants.
Features
Create shortened URLs with custom slugs, tags, and expiration
List all shortened URLs with pagination info
Get details of specific URLs by short code
Delete shortened URLs
List and manage tags
Full type safety with Pydantic models
Built with the official MCP Python SDK
Related MCP server: DWZ Short URL MCP Server
Requirements
Python >= 3.10
A Shlink instance with API access
Installation
pip install mcp-shlinkConfiguration
Set these environment variables before running the server:
Variable | Description | Required |
| Your Shlink instance base URL (e.g., | Yes |
| Your Shlink API key | Yes |
Generate an API key in Shlink:
shlink api-key:generate --name=my_api_keyUsage
Running as a standalone MCP server
SHLINK_BASE_URL=https://shlink.example.com SHLINK_API_KEY=your-key python -m mcp_shlink.serverInstalling into Claude Desktop
uv run mcp install src/mcp_shlink/server.py --name "shlink"Running with MCP Inspector
SHLINK_BASE_URL=https://shlink.example.com SHLINK_API_KEY=your-key uv run mcp dev src/mcp_shlink/server.pyAvailable Tools
Tool | Description |
| Create a new shortened URL |
| List all shortened URLs |
| Get details of a URL by short code |
| Delete a shortened URL |
| List all tags |
Development
# Clone the repository
git clone https://github.com/magnus919/mcp-shlink
cd mcp-shlink
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
# Lint and format
ruff check .
ruff format .
# Type check
mypy src/
# Full verification
ruff check . && ruff format . --check && mypy src/ && pytestProject Structure
src/mcp_shlink/
├── server.py # FastMCP server entry point
├── client.py # Shlink API client
├── tools.py # MCP tool definitions
└── models.py # Pydantic models for API requests/responses
tests/
├── test_tools.py # Unit tests for MCP tools
└── test_client.py # Unit tests for Shlink clientLicense
Apache 2.0. See LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to create, update, and manage short links through your Dub.co account, allowing for creation, modification, and deletion of custom shortened URLs.428MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to create, manage, and analyze short URLs through complete URL shortening functionality. Supports batch operations, custom domains, click statistics, and comprehensive link management.661MIT
- Alicense-qualityBmaintenanceConnects AI assistants to the Clypt Link Intelligence platform to shorten URLs, manage tags, and generate QR codes. It enables users to view link analytics and perform bulk link operations through natural language commands.47MIT
- AlicenseAqualityBmaintenanceEnables interaction with Shiori, a self-hosted bookmark and read-it-later manager, for managing bookmarks and tags.13MIT
Related MCP Connectors
Create and manage short links, track clicks, and automate URL management
Create short links, QR codes, UTM templates, vCards, and landing pages from your AI assistant.
Create and manage CodeQR short links, QR codes, and analytics from any MCP client.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/magnus919/mcp-shlink'
If you have feedback or need assistance with the MCP directory API, please join our Discord server