Create a campaign link
Create a short link for https://example.com/spring-sale with the alias spring-sale, and add it to my Marketing collection.
- Calls
create_link
Model Context Protocol
The official link shortening and deep linking MCP server. Connect Claude, Cursor and other AI assistants to your LinkTwin account, then just ask: create short links and deep links, organize collections, attach pixels, generate QR codes and read your analytics.
npx -y @linktwin/mcp
create_linkRunning Done{
"url": "https://www.youtube.com/watch?v=x7K2pQ9mW4s",
"custom": "desk-tour",
"collections": ["YouTube"]
}
Done. Your new link is in the YouTube collection:
get_detailed_statsRunning Done{
"date_range": "30d"
}
Your desk tour link led with 504 clicks. Instagram sent the most traffic, and most clicks came from the United States.
list_linksRunning Done{
"search": "amazon"
}
assign_pixel_to_linksRunning Done{
"id": 4,
"add": [1224,1225]
}
create_qr_codeRunning Done{
"type": "link",
"data": "https://linktw.in/desk-tour"
}
Your Meta pixel now fires on both Amazon links, and the QR code for your desk tour is ready to download.
Why an MCP server
Switching to a dashboard or wiring up the REST API by hand breaks your flow. The LinkTwin MCP server gives your AI assistant first-class link-management tools, so it can build campaign links, deep links and QR codes for you while you stay in the conversation.
Setup
Nothing to install: npx runs the server on demand. All you need is Node.js 18 or newer and your API key.
Copy your API key from Settings or the MCP Server page in your LinkTwin dashboard. API access comes on every plan.
Paste the JSON below into your AI client config and drop in your API key.
Restart your client and ask it to create, edit or analyze links. The LinkTwin tools appear automatically.
Add this to Claude Desktop, Cursor or any MCP client, then restart.
In Claude Desktop open Settings, then Developer, then Edit Config. Paste the block into claude_desktop_config.json.
{
"mcpServers": {
"linktwin": {
"command": "npx",
"args": ["-y", "@linktwin/mcp"],
"env": { "LINKTWIN_API_KEY": "YOUR_API_KEY" }
}
}
}
In Cursor, create .cursor/mcp.json in your project and paste the block.
{
"mcpServers": {
"linktwin": {
"command": "npx",
"args": ["-y", "@linktwin/mcp"],
"env": { "LINKTWIN_API_KEY": "YOUR_API_KEY" }
}
}
}
Claude Code, Windsurf, Cline and other MCP clients accept the same JSON in their MCP settings.
{
"mcpServers": {
"linktwin": {
"command": "npx",
"args": ["-y", "@linktwin/mcp"],
"env": { "LINKTWIN_API_KEY": "YOUR_API_KEY" }
}
}
}
The server talks JSON-RPC over stdio and reads its settings from the env block of your config.
| Variable | What it does |
|---|---|
LINKTWIN_API_KEY |
Required. Your API key from the LinkTwin Settings page. |
LINKTWIN_BASE_URL |
Optional. The site root the server calls. Defaults to https://linktw.in. |
Works with
Capabilities
34 tools covering the full LinkTwin link-management surface. Every link tool supports geo, device and language targeting, A/B test variants and UTM parameters, set in a single prompt.
tools in seven groups. Each one wraps a LinkTwin REST API endpoint and checks its input before it runs.
Create, edit, list and delete links with custom aliases, expiry, passwords and click limits.
create_linkCreate short linklist_linksList linksget_linkGet linkupdate_linkUpdate linkdelete_linkDelete linkbulk_delete_linksBulk delete linksPer-link and account-wide click stats: top countries, referrers, browsers, devices and day trends.
get_link_statsGet link analyticsget_dashboard_statsAccount dashboard statsget_detailed_statsAccount detailed statsget_day_trendAccount day trendGroup links into collections and manage your branded custom domains.
list_collectionsList collectionsget_collectionGet collection itemscreate_collectionCreate collectionupdate_collectionUpdate collectionadd_links_to_collectionAdd/remove links in collectiondelete_collectionDelete collectionAdd branded domains and choose where the bare domain and missing links send visitors.
list_domainsList domainsadd_domainAdd branded domainupdate_domainUpdate domaindelete_domainDelete domainCreate Facebook, GTM and other pixels and attach them to links in bulk.
list_pixelsList pixelsget_pixelGet pixelcreate_pixelCreate pixelupdate_pixelUpdate pixeldelete_pixelDelete pixelassign_pixel_to_linksAssign pixel to linksGenerate and update QR codes for any link, with colors and logos.
list_qr_codesList QR codesget_qr_codeGet QR codecreate_qr_codeCreate QR codeupdate_qr_codeUpdate QR codedelete_qr_codeDelete QR codeCheck your plan and usage, set your default domain and time zone, and switch workspaces.
get_accountGet account infoupdate_account_settingsUpdate account settingsswitch_workspaceSwitch workspaceWrite the request the way you would say it. The assistant picks the tools, fills in the arguments and tells you what it did.
Create a short link for https://example.com/spring-sale with the alias spring-sale, and add it to my Marketing collection.
create_linkMake a deep link that opens Canadian visitors on example.ca and everyone else on example.com.
create_linkWhich of my links got the most clicks this month, and where did the traffic come from?
get_detailed_statsGenerate a QR code for my latest link and attach my Facebook pixel to it.
list_linkscreate_qr_codelist_pixelsassign_pixel_to_linksFind my links with "test" in the title and delete them.
list_linksbulk_delete_linksSwitch to my team workspace and list the branded domains we can use.
get_accountswitch_workspacelist_domainsYour AI client starts the server on your computer with npx and talks to it over stdio. The server calls the LinkTwin API over HTTPS with your API key, inside your own account.
delete_link or bulk_delete_links.Everything about the link shortening and deep linking MCP. Still have questions? Contact us.
The LinkTwin MCP server is the official Model Context Protocol (MCP) server for link shortening and deep linking. It connects AI assistants like Claude and Cursor to your LinkTwin account, so they can create, edit and manage short links and deep links, organize collections, attach retargeting pixels, generate QR codes and read click analytics, all from a conversation in plain language.
MCP is an open standard that lets AI assistants connect to outside tools and data. An MCP server exposes a set of tools the assistant can call. The LinkTwin MCP server exposes 34 link management tools, so any MCP-compatible app (Claude Desktop, Claude Code, Cursor, Windsurf, Cline and more) can manage your links for you.
The MCP server itself is free and MIT licensed, published on npm as @linktwin/mcp. It works through the LinkTwin API, and API access comes on every plan. You can create a free account first and upgrade when you are ready to connect your agent.
Any client that speaks the Model Context Protocol over stdio, including Claude Desktop, Claude Code, Cursor, Windsurf and Cline. You add one JSON snippet to the client's MCP settings, and the LinkTwin tools appear after a restart.
Yes. It is a deep linking MCP as well as a link shortening MCP. Through your assistant you can create links that open in apps like YouTube, Amazon and Spotify, with geo, device and language targeting, A/B testing variants, UTM parameters, branded domains and in-app browser escaping. These are the same options as in the LinkTwin dashboard and API.
Sign in to LinkTwin and open Settings, or Tools & Integrations and then MCP Server, in your dashboard. Copy your API key and paste it into your MCP client config as LINKTWIN_API_KEY. The key is shown once your plan includes API access.
The MCP server runs on your own computer and only does what your API key allows, inside your own account. Your key goes from your machine to the LinkTwin API and is never shared with third parties. Deleting anything takes an explicit tool call, and you can regenerate your API key at any time to revoke access instantly.
34 tools in seven groups: links (create_link, list_links, get_link, update_link, delete_link and bulk_delete_links), analytics (get_link_stats, get_dashboard_stats, get_detailed_stats and get_day_trend), collections, branded domains, retargeting pixels, QR codes and your account. Each one is a thin wrapper over the LinkTwin REST API, documented in the API documentation.
Only Node.js 18 or newer. The config snippet runs the server on demand with npx -y @linktwin/mcp, so there is no global install and you always get the published version.
The REST API, the MCP server and the CLI all use the same API key and manage the same links.
REST API
Command line
API documentation
Connect the LinkTwin MCP server and start creating links by conversation.
npx -y @linktwin/mcp
API access comes on every plan. See plans