DEV Community

appierun
appierun

Posted on

Create and Track Short Links From Claude Code or Cursor With an MCP Server (Appie, Bitly, Dub, Short.io)

If you ship release notes, changelogs or launch posts from your editor, the short link is usually the last manual step: open a shortener in a browser tab, paste the URL, copy the result, come back. With an MCP server, your coding agent can create the link and later tell you how many clicks it got, in the same session where you wrote the post.

This walkthrough shows the setup for four link shorteners that publish an MCP server: Appie.run, Bitly, Dub and Short.io. It covers the config for Claude Code and Cursor, the prompts that work, and the limits of each.

Plan details and prices are as of 29 Oct 2026, checked on each vendor's own docs and pricing pages that day.

Disclosure: Appie.run publishes this post, and one of the four servers is ours. We compared shorteners more broadly (not just MCP) in Bitly alternatives in 2026.

The four servers at a glance

  • Endpoint: Appie.run: https://appie.run/mcp; Bitly: https://api-ssl.bitly.com/v4/mcp; Dub (Links): https://mcp.dub.sh/mcp/dub-links; Short.io: https://ai-assistant.short.io/mcp (via npx mcp-remote)
  • Auth: Appie.run: OAuth 2.1 (ChatGPT) or esk_ project API key; Bitly: OAuth 2.1 or Bitly API token; Dub (Links): Dub API key in Mcp-Dub-Token header; Short.io: Short.io API key
  • Custom domain: Appie.run: No, links use s.appie.run; Bitly: Yes, on Growth and up; Dub (Links): Yes; Short.io: Yes
  • Edit or delete existing links via MCP: Appie.run: Not in the documented tools; Bitly: See Bitly's MCP tools reference; Dub (Links): Dub says the server lets you "programmatically manage your links"; check its tool list; Short.io: No, per Short.io's docs
  • Entry price: Appie.run: Free plan, 500 credits, no card; links cost 1 credit, clicks 0.001 credit each; Bitly: Bitly support says MCP is "available with some paid plans"; Core is $10/month billed annually; Dub (Links): Free plan (25 new links/month); Pro $27/month; Short.io: Free plan (1,000 branded links total); Hobby $5/month

Prerequisites

  • Claude Code or Cursor with MCP support.
  • An account with the shortener and an API key or OAuth access.
  • Keep keys in environment variables. Do not commit them to a shared repo.

Option 1: Appie.run

Appie's MCP server exposes two link tools, documented at appie.run/docs/mcp:

  • create_short_link: Arguments: long_url, optional code (custom slug); Cost: 1 credit per link; each click on the link costs 0.001 credit
  • link_stats: Arguments: id or code; Cost: 0 credits to read

Reads are free. Writes spend the project's credits first, then the owner's.

Claude Code:

export APPIE_API_KEY=esk_your_project_key
claude mcp add --transport http appie https://appie.run/mcp \
  --header "Authorization: Bearer $APPIE_API_KEY"
Enter fullscreen mode Exit fullscreen mode

Cursor (~/.cursor/mcp.json or .cursor/mcp.json in the project):

{
  "mcpServers": {
    "appie": {
      "url": "https://appie.run/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Appie's docs also accept the key in an X-Api-Key header if your client prefers that.

Prompts that work:

Create a short link for https://example.com/blog/v2-release?utm_source=devto&utm_medium=post
with the code v2-devto.
Enter fullscreen mode Exit fullscreen mode
Get link_stats for the code v2-devto and tell me the click count.
Enter fullscreen mode Exit fullscreen mode

What the links give you: links live on the s.appie.run domain, and the URL Shortener page lists clicks and unique visitors over the last 30 days, lifetime totals, and device and location breakdowns through the stats API.

Limits: no custom domain, and the MCP tools cover create and read only. If you need branded domains or bulk edits, one of the other three is a better fit. The same MCP server also covers Appie's other apps (articles, chatbots, Reddit and LinkedIn research), which matters only if you want one server for several marketing jobs. We wrote about that in One MCP server for your marketing agent.

Option 2: Bitly

Bitly hosts its server at https://api-ssl.bitly.com/v4/mcp. Its developer docs list setup guides for ChatGPT, Claude (web, desktop and Claude Code), Cursor, VS Code and Windsurf, with OAuth 2.1 recommended and an API token as the fallback.

Claude Code or Cursor (from Bitly's docs; Claude Code reads ~/.claude/mcp.json, Cursor reads ~/.cursor/mcp.json):

{
  "mcpServers": {
    "Bitly": {
      "type": "http",
      "url": "https://api-ssl.bitly.com/v4/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_BITLY_AUTH_TOKEN"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Drop the headers block to use OAuth instead.

Pricing note: Bitly's support page says the MCP server is "available with some paid plans", so confirm yours before building a workflow around it. On Bitly's pricing page, Core is $10/month (billed annually, 100 links/month, 30 days of click data), Growth is $29/month (500 links/month, branded links, 4 months of data) and Premium is $199/month (3,000 links/month, city and device data). The Free plan allows 5 links a month.

Option 3: Dub

Dub runs two MCP servers: one for its partner program product and one for links. For short links you want https://mcp.dub.sh/mcp/dub-links. Dub's docs pass the API key in an Mcp-Dub-Token header.

Claude Code:

claude mcp add dub-links --transport http https://mcp.dub.sh/mcp/dub-links \
  --header "Mcp-Dub-Token: $DUB_API_KEY"
Enter fullscreen mode Exit fullscreen mode

Cursor:

{
  "mcpServers": {
    "dub-links": {
      "url": "https://mcp.dub.sh/mcp/dub-links",
      "headers": {
        "Mcp-Dub-Token": "dub_xxxxxx"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Pricing: Dub's Links pricing page lists a Free plan (25 new links/month, 1,000 tracked events/month, 30-day retention, API access, 3 custom domains), Pro at $27/month (12K new links/year, 1-year retention, 10 custom domains) and Business at $81/month. Dub's launch post says its MCP server is generally available on all Dub plans; confirm that the Links server is included on yours before you rely on it.

Option 4: Short.io

Short.io's docs connect through mcp-remote:

{
  "mcpServers": {
    "shortio": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://ai-assistant.short.io/mcp",
        "--header",
        "Authorization: ${SHORTIO_API_KEY}"
      ],
      "env": {
        "SHORTIO_API_KEY": "sk_secret_key"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Short.io's docs show creating links on your own domain with a custom slug, searching links, and pulling link and domain statistics (countries, browsers, operating systems, UTM campaigns). One limit they state plainly: with the current MCP implementation you cannot edit or delete an existing link; you remove it in the dashboard and create a new one.

Pricing: the Free plan includes 1,000 branded links total, 5 custom domains and 50,000 tracked clicks a month. Its comparison table lists Hobby at $5/month, Pro at $18/month and Team at $48/month.

A small release workflow

Here is a pattern that works with any of the four:

  1. Write the release post in your repo.
  2. Ask the agent: "Create a short link for each external URL in posts/v2-release.md, use slugs that start with v2-, and replace the long URLs in the file."
  3. Review the diff before committing. The agent can pick the wrong URL, so check every replacement.
  4. A week later: "Get stats for every link with a v2- slug and summarize clicks by link."

Step 3 matters. An agent with write access to your shortener can create links you did not intend, and with Bitly, Dub or Short.io those links can sit on your branded domain. Review before you publish.

Which one to pick

  • You already pay for Bitly, Dub or Short.io: use that vendor's server. Your existing domains and analytics come with it.
  • You need branded domains on a budget: Short.io's or Dub's free plans.
  • You want link tracking plus other marketing tools in one MCP server and do not need a custom domain: Appie.

FAQ

Do I need a paid plan to use these MCP servers?
Appie, Dub and Short.io offer free plans with API access. Bitly says its MCP server is available with some paid plans.

Can the agent post the link anywhere?
No. These servers create and read links. Publishing the post is still your step.

Are clicks from bots counted?
Each vendor filters differently, and none of the docs we read gives a full method. Treat small click counts with caution.

RG, Founder, Appie.run

Top comments (0)