SHORTCLIX MCP – User Guide

SHORTCLIX speaks MCP (Model Context Protocol), so AI assistants like Claude can manage your short links and read click analytics in plain language — "Shorten and track this link", "How many clicks did it get last week?", "Give me the QR code".

This guide shows how to connect an MCP client. For the plain REST API, see /docs/api.

Availability: MCP is part of the Basic and Pro plans (not Free). Each token belongs to one workspace, and all plan limits of that workspace apply.

  • Endpoint (production): https://shortclix.com/mcp
  • Transport: HTTP (streamable), Bearer-token auth
  • Same tokens as the REST API — created in Workspace Settings → API Tokens

Table of contents

  1. Get a token
  2. Connect Claude
  3. What you can ask
  4. Available tools
  5. Testing locally, then going live
  6. Security & limits
  7. Troubleshooting

1. Get a token

  1. Open your dashboard, switch to the workspace you want to expose, and go to Workspace Settings.
  2. In API Tokens, create a token:
    • Read & write — lets the assistant create, update and delete links (recommended for the full experience).
    • Read only — the assistant can only list links and read analytics.
  3. Copy the whole token (including the leading 2| — it's part of the token) — it is shown once.

The Workspace Settings page also shows your MCP endpoint and a ready-to-paste config snippet.


2. Connect Claude

Claude Code (CLI)

The simplest option — Claude Code supports HTTP MCP servers with custom headers natively:

claude mcp add --transport http shortclix https://shortclix.com/mcp \
  --header "Authorization: Bearer YOUR_TOKEN_HERE"

Then in a Claude Code session, ask it to use SHORTCLIX. Manage it with claude mcp list / claude mcp remove shortclix.

Claude Desktop

Claude Desktop connects to a remote, header-authenticated server through the mcp-remote bridge. Edit your claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "shortclix": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://shortclix.com/mcp",
        "--header",
        "Authorization: Bearer YOUR_TOKEN_HERE"
      ]
    }
  }
}

Restart Claude Desktop. "shortclix" appears as a connected tool. (Requires Node.js installed.)

Other MCP clients

Any client that supports HTTP MCP servers with custom headers works. Point it at https://shortclix.com/mcp and send Authorization: Bearer YOUR_TOKEN_HERE. Generic config:

{
  "mcpServers": {
    "shortclix": {
      "type": "http",
      "url": "https://shortclix.com/mcp",
      "headers": { "Authorization": "Bearer YOUR_TOKEN_HERE" }
    }
  }
}

3. What you can ask

Once connected, talk to the assistant naturally. Examples:

  • "Shorten https://example.com/my-very-long-campaign-url in the 'Marketing' project and give me the short link and QR code."
  • "List all short links in the Marketing project."
  • "How many clicks did the link q3-promo get between May 1 and June 7?"
  • "Which countries and devices are clicking q3-promo the most?"
  • "Disable the link old-offer." (needs a read & write token)
  • "Create a new project called 'Summer Sale'."

The assistant decides which tool to call and passes your details through.


4. Available tools

Tool What it does Needs write token
list_projects List projects (with link counts)
create_project Create a project
update_project Update a project
delete_project Delete a project (and its links)
list_short_links List links (optionally filtered by project)
create_short_link Shorten & track a URL; returns short_url + short_code
update_short_link Update a link (destination, title, expiry, active…)
delete_short_link Delete a link
get_qr_code Get a link's QR code (SVG image)
get_workspace_analytics Per-project click stats for the workspace
get_project_analytics Per-link click stats for one project
get_link_analytics One link's clicks over a date range, with breakdowns

Everything is scoped to the token's workspace and bound by your plan's project/link limits.


5. Testing locally, then going live

You can point a client at your local SHORTCLIX (Laravel Herd, https://shortclix.test/mcp) before using production.

Local (shortclix.test):

claude mcp add --transport http shortclix-local https://shortclix.test/mcp \
  --header "Authorization: Bearer LOCAL_TOKEN_HERE"
  • Create the LOCAL_TOKEN_HERE in your local dashboard (tokens live in each environment's database — a local token does not work on production, and vice versa).
  • If your client rejects the local TLS certificate (Herd's local CA isn't trusted by Node), prefix the command with NODE_TLS_REJECT_UNAUTHORIZED=0 for local testing only — never for production.

Switching to production (shortclix.com): there is nothing to delete or change in code — it's the same server. On the client side only:

  1. Create a new token in the production dashboard (shortclix.com).
  2. Change the URL from https://shortclix.test/mcp to https://shortclix.com/mcp and use the production token.
  3. Drop any NODE_TLS_REJECT_UNAUTHORIZED=0 (production has a valid certificate).

E.g. remove the local entry and add the production one:

claude mcp remove shortclix-local
claude mcp add --transport http shortclix https://shortclix.com/mcp \
  --header "Authorization: Bearer PRODUCTION_TOKEN_HERE"

6. Security & limits

  • A token only ever sees one workspace. It can't touch other workspaces, even ones you own.
  • Read-only tokens can't create, change or delete anything — give the assistant a read-only token if you only want analytics.
  • Plan limits apply: e.g. creating links beyond your plan's limit returns an error the assistant relays.
  • Tokens are shown once and stored hashed — if one leaks, revoke it in Workspace Settings and create a new one. Requests are rate-limited (60/minute per token).

7. Troubleshooting

Symptom Cause / fix
"Unauthorized" / 401 Missing or wrong token. Check the Authorization: Bearer … header and that you copied the whole token (with the 2| prefix).
"Your plan does not include MCP access" / 403 The workspace is on the Free plan. Upgrade to Basic or Pro.
"This token is read-only…" You asked for a write action with a read-only token. Create a read & write token.
Tool says a project/link was not found It must exist in this token's workspace. List first to get exact ids/short codes.
Local TLS / certificate error Local Herd cert isn't trusted by Node — prefix with NODE_TLS_REJECT_UNAUTHORIZED=0 for local only.
Nothing happens in Claude Desktop Ensure Node.js is installed (mcp-remote runs via npx) and restart the app after editing the config.

Questions? Contact support at hello@shortclix.com.