Integrations

MCP Server

Connect AI assistants like Claude, Cursor, and ChatGPT to U2L. Create, search, and manage your short links from any MCP-capable client.

U2L hosts a remote MCP (Model Context Protocol) server, so AI assistants can manage your links for you — “shorten this URL”, “how many clicks did my launch link get”, “clean up my old campaign links”.

Endpointhttps://u2l.ai/api/mcp (Streamable HTTP)

Two ways to authenticate, both available on every plan:

  • Sign in with U2L (OAuth) — for Claude.ai, Claude Desktop, ChatGPT, and any client that supports remote MCP servers with OAuth. Add https://u2l.ai/api/mcp as a custom connector, click Allow on the U2L consent page, done. Behind the scenes this creates an API key labeled MCP: <app name> on your account; revoke it in Settings → API to disconnect the app.
  • API key — for headless setups and clients configured by file (Claude Code, Cursor, VS Code, scripts). Send your key as an Authorization: Bearer header. Create one at Settings → API.

Connect from Claude or ChatGPT

  • Claude.ai / Claude Desktop: Settings → Connectors → Add custom connector → name U2L AI, URL https://u2l.ai/api/mcp → sign in and allow.
  • ChatGPT: Settings → Connectors → Create → URL https://u2l.ai/api/mcp, authentication OAuth → sign in and allow. (Custom connectors require a paid ChatGPT plan with developer mode — OpenAI’s requirement.)
  • Claude Code (OAuth instead of a key): claude mcp add --transport http u2l https://u2l.ai/api/mcp — the browser opens for consent on first use.

The OAuth server publishes standard discovery documents at /.well-known/oauth-authorization-server and /.well-known/oauth-protected-resource/api/mcp, supports PKCE and dynamic client registration, and issues rotating refresh tokens.

Setup

claude mcp add --transport http u2l https://u2l.ai/api/mcp \
  --header "Authorization: Bearer u2l_live_your_api_key"
{
  "mcpServers": {
    "u2l": {
      "url": "https://u2l.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer u2l_live_your_api_key"
      }
    }
  }
}
{
  "servers": {
    "u2l": {
      "type": "http",
      "url": "https://u2l.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer u2l_live_your_api_key"
      }
    }
  }
}

Available tools

ToolWhat it does
create_linkCreate a short link or QR code (custom alias, domain, title)
get_linkFetch one link by domain + slug
list_linksList/search your links with filters and pagination
update_linkChange a link’s destination, title, or tags
delete_linkDelete a link permanently
get_link_analyticsClick totals and breakdowns for a link (Advanced+)
list_domainsList your available short domains
get_account_statsAccount totals, plan, and limits

Every tool call runs through the same /api/v1 endpoints as the REST API — identical auth, plan gates, and rate limits. Nothing is possible over MCP that isn’t possible with your API key directly.

Notes

  • The server is stateless: no sessions, no OAuth dance — just the header. If your client asks about OAuth, choose header/API-key auth instead.
  • A missing or invalid key doesn’t break the connection; tool calls return an instruction to configure the Authorization header.
  • Deleting links via an AI assistant is permanent. Assistants ask before destructive actions, but scope your expectations (and revoke the key anytime from Settings → API).