URL Shortening · Practical guide

How to Shorten URLs with ChatGPT Using MCP

ChatGPT can create a real short link when a connected tool does the work. Here is how to connect LinkDirect, approve a campaign URL and get back a link you can actually share.

What you need before connecting

An AI assistant can write a plausible short URL without creating anything. MCP solves a different problem: it lets a compatible client call an authenticated tool and return a resource from your account. In this guide, LinkDirect creates the link; ChatGPT helps you describe the campaign and approve the action.

You need a LinkDirect account with a verified email and a ChatGPT account whose workspace allows custom MCP connections and write tools. Availability depends on your account and organization policy. There is no need to paste a LinkDirect password or API key into a conversation.

1. Add LinkDirect as a custom MCP connection

Open ChatGPT’s Plugins or custom MCP connection settings. The current OpenAI setup guide uses Plugins, then Add custom MCP server. Some account interfaces may use a different label or require developer mode. Enter a recognizable name such as LinkDirect and this server URL:

Remote MCP endpoint · Streamable HTTP
https://linkdirect.co/mcp

Choose OAuth with automatic client discovery. Start the connection, sign in on LinkDirect and review the permissions. No manual client ID or client secret is needed for the supported published ChatGPT client. Finish authorization, then enable the connection in the conversation where you will use it.

2. Give it the permissions this task needs

For the example below, approve links:write to create the link. Add links:read if you want the assistant to retrieve its settings later. account:read allows it to check your allowance and discover active domains. A QR workflow also needs qr:write and qr:read; traffic reports need analytics:read.

Choose a narrow set of permissions for your actual work. You can disconnect the app from API & MCP. Adding a tool that needs a new scope later means reconnecting and explicitly approving that scope—not granting every permission in advance.

3. Ask for one campaign link and check the details

A prompt you can adapt
Create a short link for https://example.com/spring?product=guide.
Use title Spring newsletter. Set utm_source=newsletter,
utm_medium=email and utm_campaign=spring.
Preserve product=guide. Show the proposed destination before creating it.

Replace the example destination with your own public website URL. Review the complete destination and tags before approving creation. The assistant should call create_short_link, not invent a short address. The request below illustrates the tool arguments; your client handles the MCP transport and credentials.

create_short_link · example arguments
{
  "destinationUrl": "https://example.com/spring?product=guide",
  "title": "Spring newsletter",
  "utm": {
    "source": "newsletter",
    "medium": "email",
    "campaign": "spring"
  },
  "requestKey": "spring-newsletter-link-01"
}

LinkDirect returns a data object containing the resource ID, shortUrl and destinationUrl, together with a replayed flag. Share the returned shortUrl, not a URL the assistant guesses. Matching UTM fields are set to your supplied values; unrelated query parameters and fragments are preserved. Open the returned link yourself to check the destination before using it in a campaign.

Illustrative response excerpt · not a live result
{
  "data": {
    "shortUrl": "https://links.example.com/spring",
    "destinationUrl": "https://example.com/spring?product=guide&utm_source=newsletter&utm_medium=email&utm_campaign=spring"
  },
  "replayed": false
}

4. Add your domain or create a QR code

For a branded link, ask the assistant to list your domains first, then choose an active hostname. Creation accepts domainHostname directly, or the exact domainId returned by list_domains. A custom slug requires an owned domain. If the requested domain is unavailable, stop and fix that rather than silently using another address.

To make a QR code, ask: “Create a dynamic QR code for this event URL with print campaign tags. Return its short URL and retrieve its PNG.” The tools are create_qr_code and get_qr_code_image. This creates a QR-backed resource; it does not simply decorate an existing standalone link. Configure appearance in the dashboard when needed—QR styling is not exposed through these MCP tools.

If the connection or tool call fails

  • Missing tool after an update: refresh the connection’s tools in ChatGPT and start a new conversation. A cached catalog can be older than the server.
  • Insufficient scope: reconnect and approve the missing permission. Seeing a tool in the catalog is not permission to execute it.
  • Expired authorization request: start a fresh connection from ChatGPT instead of resubmitting an old consent page.
  • Email verification or quota error: verify your account or check the allowance in API & MCP. An integration cannot bypass workspace limits.
  • Uncertain result after a timeout: retry the identical write with the same requestKey. Use a fresh key for a different intended operation; replay protection lasts 24 hours.
  • Version conflict: read the link again, review the latest settings and approve a new edit. Do not overwrite a concurrent change blindly.

Keep URLs, titles and other returned text separate from instructions to your assistant. Do not let a destination page or a returned title tell it to reveal credentials or create more links. The useful end result is simple: an approved campaign URL, a real resource in your workspace and a short address you have checked.

Sources and review

Official documentation and product facts reviewed on 3 November 2026. Features and client interfaces can change; these are not claims of independent benchmarking or universal client compatibility.

  1. OpenAI: Connect from ChatGPT
    Client setup, availability caveats and refreshing tools.
  2. LinkDirect API & MCP guide
    Tool arguments, OAuth, scopes, errors and retry behavior; checked against the deployed server contract.

Put your next link to work.

Connect an assistant to your LinkDirect workspace, or use the API in code you control.

Keep exploring