Linkly MCP Server
The Linkly MCP Server lets you connect AI assistants to your Linkly account using the Model Context Protocol. Once connected, you can create and manage short links through natural conversation.
What is MCP?
The Model Context Protocol (MCP) is an open standard that allows AI assistants to securely connect to external tools and data sources. Instead of copying and pasting between apps, you can ask your AI assistant to perform actions directly.
Supported AI Assistants
The Linkly MCP Server works with:
- Claude Desktop
- ChatGPT Desktop
- Other MCP-compatible clients (Cursor, Windsurf, etc.)
What You Can Do
Once connected, you can ask your AI assistant to:
- Create short links - "Create a short link for https://example.com"
- Track performance - "How many clicks did my links get this week?"
- Manage links - "Update the link called 'promo' with a new destination"
- View analytics - "Show me clicks by country for the last 30 days"
- Search links - "Find all links related to the product launch"
- Manage domains - "List my custom domains"
- Set up webhooks - "Subscribe https://my-site.com/webhook to receive click events"
Installation Options
The Linkly MCP Server is available in two ways:
Option 1: Hosted Server (Recommended)
Use our hosted MCP server - no installation required:
https://mcp.linklyhq.com
Option 2: npm Package
Install and run locally using npx:
npx -y linkly-mcp-server
Or install globally:
npm install -g linkly-mcp-server
View the package on npm or GitHub.
Configuration
Getting Your API Credentials
- Log in to your Linkly dashboard
- Go to Settings → API Keys
- Copy your API Key and Workspace ID
Claude Desktop Configuration
Open your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the Linkly MCP server:
{
"mcpServers": {
"linkly": {
"command": "npx",
"args": ["-y", "linkly-mcp-server"],
"env": {
"LINKLY_API_KEY": "your-api-key",
"LINKLY_WORKSPACE_ID": "your-workspace-id"
}
}
}
}
ChatGPT Desktop Configuration
Open your ChatGPT config file:
- macOS:
~/Library/Application Support/ChatGPT/mcp_servers.json - Windows:
%APPDATA%\ChatGPT\mcp_servers.json
Add the Linkly MCP server:
Using npx:
{
"servers": {
"linkly": {
"command": "npx",
"args": ["-y", "linkly-mcp-server"],
"env": {
"LINKLY_API_KEY": "your-api-key"
}
}
}
}
Using hosted server:
{
"servers": {
"linkly": {
"type": "url",
"url": "https://mcp.linklyhq.com",
"env": {
"LINKLY_API_KEY": "your-api-key"
}
}
}
}
Available Tools
Link Creation Options
When creating links, you can specify:
- Basic:
url,name,note,domain,slug,enabled - UTM Parameters:
utm_source,utm_medium,utm_campaign,utm_term,utm_content - Open Graph:
og_title,og_description,og_image - Tracking:
fb_pixel_id,ga4_tag_id,gtm_id - Advanced:
cloaking,forward_params,block_bots,hide_referrer - Expiry:
expiry_datetime,expiry_destination
Environment Variables
Troubleshooting
"Could not connect to MCP server"
- Check that your API key and Workspace ID are correct
- Ensure you have Node.js installed (v18 or later)
- Try running
npx linkly-mcp-serverin a terminal to see any errors
"Authentication failed"
- Verify your API key in the Linkly dashboard at Settings → API Keys
- Make sure there are no extra spaces in your credentials
- Try regenerating your API key
Tools not appearing
- Restart your AI assistant after saving the configuration
- Check that the JSON syntax in your config file is valid
- Verify the MCP server is running (check for the tools icon in your assistant)
Server not reachable
- Confirm that the command path is correct
- If using the hosted server, check your internet connection
- Verify the MCP server runs manually from the terminal
Related Resources
MCP Server FAQs
Do I need to install anything to use the MCP server?
Not if you use the hosted server at https://mcp.linklyhq.com. If you prefer to run locally, you'll need Node.js v18 or later installed.
Which AI assistants support MCP?
Claude Desktop and ChatGPT Desktop both support MCP. Other tools like Cursor and Windsurf also have MCP support.
Is my API key secure?
Yes. Your API key is stored locally in your AI assistant's configuration file and is only sent to Linkly's servers when making API requests. It is never shared with the AI model itself.
Can I use MCP with the web versions of Claude or ChatGPT?
No, MCP requires the desktop applications. The web versions do not support MCP connections.
How do I update the MCP server?
If using npx, it automatically fetches the latest version each time. If installed globally, run npm update -g linkly-mcp-server.
