Skip to content

Integrations

MCP server

Connect Claude, ChatGPT (Codex), Cursor and other AI assistants to iShortn with the remote MCP server at https://ishortn.ink/mcp, authenticated with an API key.

iShortn runs a remote Model Context Protocol (MCP) server, so AI assistants can create and manage your short links, read their analytics and make QR codes for you. Ask in plain language, for example "shorten https://example.com/spring-sale as spring-sale" or "which countries did my launch link get clicks from this week?".

Server URLhttps://ishortn.ink/mcp
TransportStreamable HTTP
AuthenticationAuthorization: Bearer YOUR_API_KEY

The server is built on the iShortn API, so it uses the same API keys, and API keys need a Pro or Ultra plan.

Create an API key

  1. Open Settings in the dashboard and scroll to API Keys.
  2. Click Create API Key and copy the key from the dialog. It's shown once.

The key works in your personal workspace: links the assistant creates are added there, and the other tools only find links in it. See Which links the API can reach. Anyone with the key can change and delete your links, so keep it out of shared files and repositories.

Connect your assistant

In each example, replace YOUR_API_KEY with your key.

Claude Code

claude mcp add --transport http ishortn https://ishortn.ink/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Run /mcp in Claude Code to check that ishortn is connected.

Claude Desktop

Claude Desktop's Add custom connector form only supports servers that sign in with OAuth, so connect through the mcp-remote bridge instead. It needs Node.js. Open Settings → Developer → Edit Config and add iShortn to claude_desktop_config.json:

{
  "mcpServers": {
    "ishortn": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://ishortn.ink/mcp",
        "--header",
        "Authorization:${ISHORTN_AUTH}"
      ],
      "env": { "ISHORTN_AUTH": "Bearer YOUR_API_KEY" }
    }
  }
}

Restart Claude Desktop. The iShortn tools show up in the tools menu of a new chat.

Cursor

Open Cursor Settings → Tools & MCP → New MCP Server, or edit ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

{
  "mcpServers": {
    "ishortn": {
      "url": "https://ishortn.ink/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}

ChatGPT and OpenAI

ChatGPT's Add custom MCP server form signs in with OAuth only and can't send an API key, so it can't connect to the iShortn server yet. Codex, OpenAI's coding agent that comes with ChatGPT plans, can. Add this to ~/.codex/config.toml:

[mcp_servers.ishortn]
url = "https://ishortn.ink/mcp"
bearer_token_env_var = "ISHORTN_API_KEY"

Then set ISHORTN_API_KEY to your key in the environment Codex runs in.

In your own app, the OpenAI Responses API's MCP tool connects with the key in its authorization field:

{
  "type": "mcp",
  "server_label": "ishortn",
  "server_url": "https://ishortn.ink/mcp",
  "authorization": "YOUR_API_KEY"
}

Other clients

Any MCP client that supports the streamable HTTP transport and custom headers can connect: point it at https://ishortn.ink/mcp and send Authorization: Bearer YOUR_API_KEY. Clients that can only set an x-api-key header work too. To try the server without an assistant, run the MCP Inspector:

npx @modelcontextprotocol/inspector --cli https://ishortn.ink/mcp --transport http \
  --header "Authorization: Bearer YOUR_API_KEY" --method tools/list

Tools

ToolWhat it doesAPI equivalent
create_linkCreates a short link, with an optional alias, domain, password, expiry, activation time, click limit and UTM tags.Create a link
get_linkLooks up a link by alias and domain.Get a link
list_linksLists your links, newest first, 25 per page by default (up to 100).List links
update_linkChanges a link's destination, alias, domain, expiry, activation time or click limit. Renamed and moved links keep redirecting from the old address.Update a link
delete_linkDeletes a link and its analytics.Delete a link
get_link_analyticsClicks and unique clicks, by country, city, device, browser, OS and referrer.Link analytics
create_qr_codeReturns a PNG QR code that opens a short link. Give a URL to create a new link for it, or the alias of an existing link.
get_accountYour plan, default domain, links created this month against your monthly limit, and your API rate limits.Get your account

delete_link is marked as destructive in its tool hints, and the read-only tools as read-only, for clients that use them to decide when to ask you first.

QR codes from create_qr_code are plain black-on-white PNGs. Scans go through the short link, so they're counted in its analytics, but the QR code isn't saved under QR Codes in the dashboard. To style a QR code or keep it in your QR code list, create it in the dashboard.

Plans and limits

The tools apply the same rules as the API:

  • Plans: the server needs a Pro or Ultra plan. With a key on the Free plan, your assistant can connect, but every tool returns The iShortn API and MCP server need a Pro or Ultra plan. Upgrade at https://ishortn.ink/pricing. See API access by plan.
  • Monthly links: links created with create_link and create_qr_code count toward your monthly link limit, like links created in the dashboard. See Plans and limits.
  • Rate limits: every request to the MCP server counts toward your account's API rate limit, including the requests your assistant makes to connect and list the tools.
  • Analytics window: get_link_analytics covers the same date range as the dashboard for your plan.

Errors

When a tool fails, the assistant gets the API's error message and usually tells you what went wrong, such as an alias that's already taken or a domain that isn't available to your key. See Responses and errors.

ProblemWhat to do
The assistant can't connect, or asks you to sign inThe key is missing, mistyped or deleted, and the server answered 401. Check the Authorization header in your client's config, or create a new key in Settings.
need a Pro or Ultra planThe key's account is on the Free plan. Upgrade on the Pricing page.
Rate limit exceeded. Retry in N seconds.Your account made too many API requests in a short time. Wait and ask again.

Something missing or unclear? Email support@ishortn.ink.