Back to Blog

MCP for URL Shorteners: Let Your AI Agent Ship Links

Your assistant can write the campaign, name the slug and describe the QR code, then it hands you a to-do list. An MCP server closes that gap. Here is how the shortener side of MCP works, what seven vendors actually ship, and how to connect Flyn to Claude Code in two minutes.

Karan Bhakuni
Karan Bhakuni
Founder, Flyn
TechnicalAug 25, 202618 min readUpdated Aug 25, 2026
MCP for URL Shorteners: Let Your AI Agent Ship Links

What an MCP Server Actually Does for a URL Shortener

Strip away the marketing and MCP is a small, boring protocol, which is why it works. A client (Claude Code, Claude Desktop, Cursor, Windsurf, ChatGPT in developer mode, Perplexity) talks to a server that publishes a list of callable tools. The model reads the tool descriptions, decides which fits your sentence, fills in the arguments, and the client executes the call.

What actually travels over the wire

Flyn's server is a single HTTPS endpoint at https://www.flyn.to/mcp speaking JSON-RPC 2.0 over streamable HTTP. It is stateless: every tool call is a bounded request and response, so there is no long-lived session to keep alive and nothing to reconnect after your laptop sleeps. The handshake is three messages: initialize returns the protocol version and server info, tools/list returns the catalogue, and tools/call carries a tool name plus arguments and returns a result.

Tools, not endpoints

The design difference from a REST API is that a tool is written to be read by a model, not a developer. An MCP tool ships its own description, its own JSON Schema for arguments, and, if the vendor bothered, its own behavioural hints. That description is the whole interface. If it says "use this to re-point an existing short link without changing the printed URL", the model reaches for it at the right moment. If it says "updates a link", the model guesses.

Flyn's server also ships server instructions, a short paragraph the client feeds the model up front, spelling out the plan rules: click totals on every plan, breakdowns on Pro, 25 links a month on free. The assistant knows the limits before it tries something that will fail, which is a nicer failure mode than a 403 mid-sentence.

Remote servers versus local ones

Two shapes exist and the difference is setup pain. A local (stdio) server runs on your machine, usually launched with npx, holding credentials in a config file. A remote server is a URL your client connects to over HTTPS: nothing to install, nothing to update, and it can offer a browser sign-in instead of a pasted secret. Flyn, Bitly, Linkly and UseClick are remote. Go2 offers both. Short.io's documented setup bridges to a remote endpoint through the local mcp-remote helper.

Note

MCP does not replace the REST API, it sits alongside it. Flyn's MCP tools call the same engine as the endpoints in the shorten docs and the links docs, with identical permissions and rate limits. Building a service rather than driving an assistant? The API is still the right surface, and our link shortener API guide covers it end to end.

Flyn's Eight Tools, and What Each One Is For

Eight tools is a deliberate number. Each maps to a job somebody actually asks for in a sentence, and none exist to pad a count.

  • create_short_link, shorten a URL, optionally with a custom slug and an expiry.
  • list_links, search your links by text, tag or status.
  • get_link, fetch one link with its destination, settings and total clicks.
  • update_link, re-point a live link without changing the printed URL.
  • delete_link, permanently remove a link.
  • get_link_analytics, pull click events with whatever breakdown detail your plan allows.
  • get_link_qr_code, render a QR for an existing short link, so the code survives a destination change.
  • create_qr_code, make a code for a URL, plain text or a WiFi network.

The one that earns its place

update_link is the tool that changes how you work. Because it re-points a live link without changing the printed URL, a printed menu, a pressed vinyl sleeve or a scheduled newsletter can be corrected after it ships. We covered the pattern in updating links without changing the URL, and it is the reason to prefer get_link_qr_code over create_qr_code whenever the payload is a link: the dynamic version stays editable and every scan counts as a click. The static one does not, ever, which is why dynamic QR codes and the plain QR code generator are separate tools on the site.

Grid of Flyn's eight MCP tools each labelled with its read-only or destructive annotation badge
The full Flyn tool surface. Five tools are marked read-only, two are marked destructive, and every one carries a human-readable title.

Worked Example: Connecting Flyn to Claude Code

This is the whole setup. No package to install, nothing to keep updated.

One command, no key

In your terminal, add the server by URL:

claude mcp add --transport http flyn https://www.flyn.to/mcp

With no Authorization header supplied, the server answers the first request with a 401 carrying an RFC 9728 WWW-Authenticate header pointing at its protected-resource document. Your client reads that, discovers the authorisation server metadata at /.well-known/oauth-authorization-server, registers itself dynamically, and opens a browser window. You sign in, approve access, and the client stores a token. No key was ever typed, pasted or committed.

If you would rather use an API key (which needs Pro, Lifetime or Team), the header form is on the connector page:

claude mcp add --transport http flyn https://www.flyn.to/mcp --header "Authorization: Bearer flyn_sk_live_YOUR_KEY"

Terminal mockup showing the claude mcp add command followed by a browser OAuth approval screen and a connected server confirmation
The OAuth route in three beats: add the URL, approve in the browser, start asking. Nothing sensitive touches your config file.

What you can then ask, in plain language

Once connected, the tool descriptions do the routing. You do not name tools, you describe outcomes:

  • "Shorten this launch page and give me a slug I can say out loud in a video."
  • "How many clicks did the launch link get this week, and where from?"
  • "Re-point flyn.to/menu to the new autumn menu page."
  • "List my links tagged pinterest, sorted by clicks."
  • "Give me a printable QR for the menu link, and tell me the current scan count."
  • "Create a WiFi QR for the network Cafe Guest with password flatwhite2026."

The last two are worth separating in your head. A QR "for the menu link" routes to get_link_qr_code, which encodes the short link, stays re-pointable, and counts every scan as a click in click analytics. A WiFi QR routes to create_qr_code, which is static and permanent by nature. The tool descriptions carry that distinction so the model does not have to infer it.

Pro tip

Put a naming convention in your project instructions, something like "all campaign slugs use the pattern launch-YYYYMM". The model follows it on every create_short_link call, and you get a greppable link list instead of eight variations on "spring-sale-final-2". Pair it with tags and list_links becomes a usable report.

Which Assistants Can Connect, Including the Chinese Ones

The walkthrough above uses Claude Code because it is the shortest path, but the question underneath it is usually "will this work in the assistant I already use?" Answering that needs one distinction that gets lost constantly: a model that can call tools is not the same thing as a client that speaks MCP. Tool calling is a model capability. MCP is a transport the application around the model has to implement. A model scoring well on function-calling benchmarks tells you nothing about whether the app on your desk can reach https://www.flyn.to/mcp.

A second distinction matters just as much. Flyn's server is remote, over streamable HTTP with OAuth. Many clients support MCP only as local stdio subprocesses, which is a different code path entirely. A client needs remote transport support before a hosted server is reachable at all.

Here is where the major clients stand, each row taken from that vendor's own documentation rather than from a directory listing:

ClientMakerRemote MCP over HTTPHow you connect Flyn
Claude Code, Claude DesktopAnthropicYesOAuth browser sign-in
ChatGPT, developer mode and connectorsOpenAIYesRemote connector, OAuth
VS Code with GitHub CopilotMicrosoftYesServer entry, OAuth
CursorAnysphereYesServer entry, OAuth
WindsurfCognitionYes, via serverUrlOAuth, supported on all three transports
Gemini CLIGoogleYesOAuth, configuration discovered automatically
Qwen CodeAlibabaYes, httpUrl selects streamable HTTPServer entry with an auth header
Kimi CLIMoonshot AIYeskimi mcp, browser OAuth, token cached
DeepSeek HarnessDeepSeekYes, streamable HTTP for remoteFirst-party MCP client plugin
ZCodeZ.ai, the GLM labYes, stdio, HTTP and SSEServer entry
TraeByteDanceYesServer entry

Checked against each vendor's own documentation in August 2026. Client support in this space moves fast, so treat the table as a starting point rather than a guarantee, and check your client's current docs before you file a bug against ours.

The Chinese Side Is the Coding Agents, Not the Chat Apps

This part is worth saying plainly, because most English-language MCP writing skips it. The Chinese labs did not put MCP into their consumer chat products. There is no connector menu in the Doubao app or on the DeepSeek web chat the way there is in ChatGPT. What those labs shipped instead is MCP inside their terminal coding agents, and they shipped it fast.

Qwen Code picks its transport from the config key, where httpUrl routes to streamable HTTP, which is exactly the transport Flyn serves. Kimi CLI goes further than several Western clients and has a dedicated command for authorising an OAuth server, opening a browser and caching the token afterwards, the same flow Claude Code uses. DeepSeek Harness ships its own MCP client plugin and mounts one server per instance, stdio for local servers and streamable HTTP for remote ones. Z.ai's ZCode covers all three transports.

The practical upshot: if you work in Chinese-model tooling, link automation is available to you today, but through the CLI rather than through the chat app. The configuration is the same shape as the Claude Code walkthrough above, pointed at the same https://www.flyn.to/mcp endpoint, and the authentication docs apply unchanged. Flyn does not gate the MCP server by client, by region, or by plan, so an account on the free plan reaches the same eight tools from Kimi CLI as it does from Claude Desktop. One practical note: not every client implements an OAuth flow, and some pass static headers only. Flyn accepts either, so where a client cannot do the browser sign-in you authenticate with a Bearer API key against the same endpoint instead.

Tool Annotations: The Part Most Vendors Skip

MCP lets a server attach behavioural hints to each tool. They are advisory, not enforcement, and that is the point: they exist so the client can decide when to ask you first. Flyn sets them on all eight tools. Here is the honest map.

ToolreadOnlyHintdestructiveHintWhat that tells a client
list_linkstruefalseSafe to run unattended, changes nothing
get_linktruefalseSafe to run unattended
get_link_analyticstruefalseSafe to run unattended
get_link_qr_codetruefalseRenders from an existing link, creates nothing
create_qr_codetruefalseRenders an image, stores no record
create_short_linkfalsefalseA write, but additive, nothing existing is harmed
update_linkfalsetrueOverwrites a live destination, worth confirming
delete_linkfalsetrueIrreversible, definitely worth confirming

Reading the two marked destructive

delete_link being destructive is obvious. update_link is the more interesting call, and it is deliberate. Re-pointing is not additive: the old destination is gone, and if that link is printed on a thousand table cards or sitting in a scheduled email, an agent that quietly changed it has done real damage. The flag lets a client surface "this will change where flyn.to/menu sends people, continue?" before the call fires.

Why an advisory hint still matters

Nothing forces a client to honour an annotation. But the alternative is worse: with no annotations at all, a client can only distinguish a read from a wipe by parsing the tool name, which is the kind of guessing that produces a bad afternoon. Publishing the hints costs the vendor nothing and gives every client a real signal.

Watch out

Annotations are hints, not permissions. If you are handing an agent access to a production link estate, do not rely on the client asking nicely. Connect with an account whose reach you are comfortable with, and remember that delete_link is permanent. There is no trash can to restore from.

Why OAuth Beats Pasting an API Key Into a Config File

The security story of MCP is mostly a story about where secrets live. An API key in an MCP config is a long-lived credential sitting in plaintext on disk, in a file that is easy to sync, easy to screenshot during a screen share, and easy to commit by accident. It does not expire on its own and it carries the full reach of your account until you remember to revoke it.

What the OAuth flow does differently

Flyn implements OAuth 2.1 with PKCE, S256 only. In practice that means four things:

  • You never handle the secret. You type your Flyn password into flyn.to, in a browser, on a page you can inspect. The client receives a token nobody had to tell it.
  • The client proves it started the flow. PKCE has the client generate a random verifier, send only its SHA-256 hash up front, and present the original when redeeming the code. An attacker who intercepts the authorisation code cannot exchange it without the verifier. Flyn accepts S256 and nothing else, so the weaker plain method is off the table.
  • Registration is dynamic. The client registers itself at the registration endpoint: no per-client setup, no dashboard step, no client ID to copy around.
  • Scope is narrow. The server supports a single mcp scope, so a token minted for your assistant is an MCP token, not a general-purpose key to everything you own.
Side by side comparison of an API key stored in plaintext config versus an OAuth flow with PKCE where the client only ever holds a scoped token
Left: a long-lived secret on disk, revocable only if you remember it exists. Right: a browser sign-in, a PKCE-bound exchange, and a scoped token.

The API key route is still there, and still fine

None of this makes API keys bad. They are the right tool for a server-side script, a cron job or a CI pipeline where no human is present to click Approve, which is what the authentication docs cover. Paid plans can hold up to five keys at once, created and revoked from Settings. The point is narrower than "keys are insecure": for an interactive assistant on your own laptop, a browser sign-in is less to go wrong, and on Flyn it is also the door that does not need a paid plan.

Linkly reached the same conclusion from the other direction. Their hosted server uses OAuth 2.1 with PKCE and their own repo marks the older API-key, self-hosted path as no longer maintained. Two independent vendors landing on the same posture says something about where remote MCP auth is heading.

Registries, Directories, and What to Wire Next

Discovery is the unsolved half of MCP, and there are two different things people mean by "listed".

The official registry versus a client's directory

The official MCP registry is the vendor-neutral index of servers. Flyn is published there as to.flyn/mcp, pointing at the streamable-HTTP remote at https://www.flyn.to/mcp. Linkly is there too, as com.linklyhq/linkly. Go2 and UseClick are not, which matters if you build tooling that resolves servers by registry name rather than by hand-copied URL.

A client directory is different: one vendor's curated in-product list, like the connectors picker inside a chat app. Flyn is not in the Claude connectors directory yet, and we are not going to pretend otherwise. There you add Flyn as a custom connector with the URL instead. Claude Code, Claude Desktop custom connectors, Cursor, Windsurf, ChatGPT developer mode and Perplexity all work today.

What to wire next

If you have got this far, the useful next moves are small:

  1. Connect it. Start on the AI connector page, which has the exact command for each client. No account yet? Sign up free first, the OAuth flow needs one.
  2. Give the agent a slug convention and a couple of tags, so list_links returns something readable.
  3. Add webhooks if you automate downstream. MCP is pull, webhooks are push, most real workflows want both.
  4. Keep a non-agent path for bulk work. A hundred links belong in a CSV, not a chat window: bulk shortening from Google Sheets, or the create-many-links endpoint.
  5. Not ready for MCP? The same jobs run through Zapier, and the setup guide walks through it.

MCP is early enough that the comparison above will be stale within a year. What will not change is the shape of the problem: an assistant that can only describe the link you should make is doing half a job, and the fix is a protocol, not a plugin. Browse the rest of the free link tools to see what else is worth handing to an agent.

Frequently Asked Questions

Does Flyn's MCP server work with ChatGPT, Gemini and Copilot, or only with Claude?
It works with any client that can reach a remote MCP server over streamable HTTP, which is most of the major ones. Claude Code and Claude Desktop, ChatGPT in developer mode, VS Code with GitHub Copilot, Cursor, Windsurf and Gemini CLI all support remote MCP servers, and all of them can authenticate with OAuth. The endpoint is the same in every case: https://www.flyn.to/mcp. Flyn does not gate the server by client, so the eight tools behave identically wherever you connect from. The one requirement worth checking is remote transport support, because some clients implement MCP only as local stdio subprocesses and those cannot reach a hosted server at all.
Can I use Flyn with DeepSeek, Qwen, Kimi or GLM?
Yes, but through their coding agents rather than their chat apps. The Chinese labs put MCP into their terminal tools, not their consumer chat products, so there is no connector menu in the Doubao app or on the DeepSeek web chat. Qwen Code selects streamable HTTP when a server is configured with httpUrl, which is the transport Flyn serves. Kimi CLI has a dedicated command for authorising an OAuth server that opens a browser and caches the token, the same flow Claude Code uses. DeepSeek Harness ships a first-party MCP client plugin and supports streamable HTTP for remote servers. Z.ai's ZCode supports stdio, HTTP and SSE. Point any of them at https://www.flyn.to/mcp and the setup is the same shape as the Claude Code walkthrough.
What is MCP, in plain English?
MCP stands for Model Context Protocol. It is an open standard that lets an AI assistant call external tools directly instead of only talking about them. A server publishes a list of tools, each with a description and a schema for its arguments, and the assistant picks the right one for what you asked. For a URL shortener that means the difference between an assistant that tells you to go create a link and one that creates it, hands you the URL, and reads the click count back an hour later. The protocol itself is small: a handshake, a tool list, and tool calls, all JSON-RPC over HTTPS.
Do I need a paid Flyn plan to use the MCP server?
No, and this is the part people get wrong most often. There are two doors into the Flyn MCP server. The OAuth door has no plan check at all: you add https://www.flyn.to/mcp to a client that supports the OAuth handshake, sign in with your existing Flyn account, approve access, and you are connected on the free plan. The second door is an API key sent as a Bearer token, and API keys are a paid feature, so that route needs Pro, Lifetime or Team. Either way the assistant is bound by your plan limits: free accounts get 25 links a month and click totals, while paid accounts add country, device and referrer breakdowns.
Which AI clients can connect to it today?
Anything that speaks MCP over streamable HTTP. Claude Code connects with a single claude mcp add command. Claude Desktop connects through custom connectors. Cursor and Windsurf take a small JSON block with the server URL. ChatGPT developer mode and Perplexity both support custom remote connectors. Clients that implement the OAuth handshake need only the URL, with no key to paste; clients that do not can send an API key in an Authorization header instead. Flyn is not in the Claude connectors directory yet, so on that surface you add it as a custom connector rather than picking it from a list. The exact setup for each client lives on the /ai page.
What does a destructive tool annotation actually do?
It is a hint the server attaches to a tool telling the client that the call changes or removes something that already exists. Flyn marks update_link and delete_link destructive, and marks the five read tools read-only. The hint is advisory: nothing in the protocol forces a client to act on it. What it enables is a client asking you to confirm before it re-points a live link or deletes one, rather than guessing from the tool name. It matters most for update_link, which sounds harmless but overwrites a destination that might be printed on physical material. Treat annotations as a good signal, not as a permission system.
Is it safer to connect over OAuth than with an API key?
For an interactive assistant on your own machine, yes, mostly because of where the secret ends up. An API key in an MCP config file is a long-lived credential sitting in plaintext, easy to sync to a backup, screenshot in a call, or commit by accident. With OAuth 2.1 and PKCE the client never sees a password: you sign in on flyn.to in a browser, the client holds a token scoped to a single mcp scope, and PKCE binds the code exchange to the client that started it so an intercepted code is useless on its own. API keys are still the right choice for a server-side script or CI job where nobody is there to click Approve.
How does Flyn compare with the Bitly MCP server?
Bitly ships the deeper server and it is fair to say so. Their marketplace page states 27 tools, and the surface reaches past links into groups, organisations, custom domains, bulk CSV upload and data export, which matters if you run link operations across many teams. Bitly also documents OAuth 2.1 as its recommended auth, so OAuth is not a Flyn advantage over them. Bitly does not state whether MCP access requires a particular plan tier. Flyn ships 8 focused tools, publishes read-only and destructive annotations on every one of them, and lets you connect on the free plan by signing in. Different bets: breadth versus a free, annotated, small surface.
Can an agent delete my links by accident?
It can delete links, and deletion is permanent, so this is worth taking seriously. Two things reduce the risk. First, delete_link carries a destructive annotation, so any client that supports confirmations can prompt before the call fires. Second, the token is scoped to your account or workspace, so an agent cannot reach anything you do not own. What the protocol does not give you is an undo. If you are pointing an assistant at a production link estate, connect with an account whose reach you are comfortable with, and consider keeping high-value links in a workspace the connected account cannot touch.
Does MCP replace the Flyn REST API?
No, they are two front doors to the same engine. MCP is built for a model to read and call in conversation, so its tools carry descriptions, schemas and behavioural hints written for that audience. The REST API is built for code you write yourself, with the endpoints documented under /docs covering authentication, shortening, links, clicks, webhooks and rate limits. Permissions, plan rules and rate limits are identical across both. Use MCP when a human is in the loop asking questions, use the API when a service needs to create links on a schedule, and use webhooks when you want the events pushed to you rather than polled.

Ready to try Flyn?

Free plan includes 25 links/month, full analytics, and access to all 30+ free tools above. No credit card required.

Already a member? Log in

Karan Bhakuni
Karan Bhakuni· Founder, Flyn

Karan Bhakuni is the founder of Flyn. He writes about branded links, click analytics, and the link-management tooling growth teams and creators actually need, drawn from building Flyn and reading a lot of user feedback.