AI assistants

Smart Link MCP server

Create smart links and check their performance from Cursor, Claude, VS Code, or any assistant that supports the Model Context Protocol (MCP), without leaving the chat.

What is MCP?

MCP is an open standard that lets AI assistants call tools in other apps. Smart Link runs a remote MCP server. There’s nothing to install: point your assistant at the server URL and give it an API key. You can then ask it in plain language to create links, look up analytics, or make QR codes.

Server URL
https://smartlink.sh/api/mcp

The server uses Streamable HTTP and authenticates with the same API keys as the REST API. It needs a Pro subscription.

1. Get an API key

In Dashboard → API, create a key and name it after your assistant, for example “Cursor”. After you create it, the dashboard shows every config below with your key already filled in, plus a one-click Add to Cursor button.

2. Connect your assistant

Replace sl_live_YOUR_API_KEY with your key, then restart the assistant or reload its MCP servers.

{
  "mcpServers": {
    "smartlink": {
      "url": "https://smartlink.sh/api/mcp",
      "headers": {
        "Authorization": "Bearer sl_live_YOUR_API_KEY"
      }
    }
  }
}
  • Cursor: ~/.cursor/mcp.json (or .cursor/mcp.json in a project)
  • Claude Code: Terminal
  • Claude Desktop: claude_desktop_config.json (Settings → Developer → Edit Config)
  • VS Code: .vscode/mcp.json
  • Windsurf: ~/.codeium/windsurf/mcp_config.json

Claude Desktop connects through mcp-remote, a small bridge that needs Node.js. The key goes in env so it doesn’t get split on spaces.

Add to Cursor (then paste your key)

Tools

Read tools never change anything. Write tools change your links. Clients can see which tools are read-only or destructive, and most ask before running a destructive one.

MCP tools
NameTypeDescription
create_linkwriteShorten a URL. Supports custom codes, titles, passwords, expiry, and iOS/Android store URLs.
list_linksreadSearch and filter your links, with click counts.
get_linkreadLook up one link by id or short code.
update_linkwriteRename a link, pause or resume it, or change its expiry or password.
delete_linkdestructivePermanently delete a link and its analytics. Clients ask you to confirm first.
get_link_analyticsreadClicks, unique visitors, countries, devices, referrers, and campaigns for one link.
get_account_analyticsreadThe same across all links, plus your top links.
get_qr_codereadA QR code for a link, as a PNG image or SVG markup.
whoamireadWhich account the key belongs to and its subscription status.

Things to try

  • “Create a smart link for https://www.youtube.com/watch?v=dQw4w9WgXcQ with the code "launch", and give me a QR code for it.”
  • “Which of my links got the most clicks from Germany in the last 7 days?”
  • “Make one link for my app that sends iPhones to the App Store and Android phones to Google Play.”
  • “Pause every link whose title contains "summer sale".”
  • “Compare mobile and desktop clicks across my account this month.”

Analytics answers use the same data as your dashboard. A click counts a visit to your short link, not a confirmed app open or purchase.

Security

  • An API key has full access to your Smart Link account. Only add it to assistants you trust, and don’t commit config files that contain it.
  • Use a separate key for each assistant, so you can revoke one without breaking the others.
  • Revoke a key in the dashboard if it leaks. It stops working immediately.
  • Review destructive actions, like deleting links, before you approve them.

Troubleshooting

MCP errors
NameTypeDescription
401UNAUTHORIZEDThe key is missing, mistyped, or revoked. Check the Authorization header in your config.
403SUBSCRIPTION_REQUIREDThe account has no active Pro subscription.
429RATE_LIMITEDMore than 60 requests in a minute, counting REST and MCP together. Wait a minute and try again.
Tools missingRestart the assistant after editing its config. Some clients also need MCP enabled in their settings.

To debug the connection, run the MCP Inspector with npx @modelcontextprotocol/inspector. Choose Streamable HTTP, enter the server URL, and add the Authorization header.