MCP Server Documentation

Connect Claude, Codex, Cursor and any MCP-compatible AI agent to your UseClick account. Create short links and query click analytics in plain language.

What is the UseClick MCP Server?

The Model Context Protocol (MCP) is an open standard that lets AI assistants use external tools. The UseClick MCP server exposes your short links and click analytics as tools, so an AI agent can create links, manage campaigns and answer analytics questions for you. It works with every client that supports remote MCP servers over Streamable HTTP.

https://useclick.io/api/mcp

Quick Start

1. Get your API key

The MCP server uses the same API keys as the REST API. Sign in and create one in API Keys Settings. Keys look like uc_live_... and are available on every plan, including Free.

2. Add the server to your AI client

Use the endpoint above with your API key as a bearer token. Client-specific instructions are below.

3. Ask your agent

That is it. Ask for a new short link or your click stats and the agent picks the right tool automatically.

Client Setup

Claude Code

One command in your terminal:

claude mcp add --transport http useclick https://useclick.io/api/mcp \
  --header "Authorization: Bearer uc_live_YOUR_API_KEY"

Cursor

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "useclick": {
      "url": "https://useclick.io/api/mcp",
      "headers": {
        "Authorization": "Bearer uc_live_YOUR_API_KEY"
      }
    }
  }
}

VS Code / Windsurf / other JSON-based clients

Most clients that support remote MCP servers accept this shape (the top-level key is sometimes servers instead of mcpServers):

{
  "mcpServers": {
    "useclick": {
      "type": "http",
      "url": "https://useclick.io/api/mcp",
      "headers": {
        "Authorization": "Bearer uc_live_YOUR_API_KEY"
      }
    }
  }
}

OpenAI Codex CLI

Add to ~/.codex/config.toml (check the Codex docs for your version, remote MCP support is evolving):

[mcp_servers.useclick]
url = "https://useclick.io/api/mcp"
http_headers = { "Authorization" = "Bearer uc_live_YOUR_API_KEY" }

Agents without remote MCP support (Hermes, OpenClaw, older clients)

If your agent only speaks stdio MCP, bridge to our remote server with mcp-remote:

{
  "mcpServers": {
    "useclick": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://useclick.io/api/mcp",
        "--header",
        "Authorization: Bearer uc_live_YOUR_API_KEY"
      ]
    }
  }
}

Claude API (MCP connector)

Building your own agent? Pass the server directly in the Messages API:

{
  "model": "claude-sonnet-5",
  "max_tokens": 1024,
  "messages": [{"role": "user", "content": "List my top links this week"}],
  "mcp_servers": [
    {
      "type": "url",
      "url": "https://useclick.io/api/mcp",
      "name": "useclick",
      "authorization_token": "uc_live_YOUR_API_KEY"
    }
  ]
}

Available Tools

Once connected, your agent can use these seven tools:

create_short_link

Create a short link with optional custom slug, title, campaign, UTM parameters, expiration date and click limit

list_links

List your links with click counts, pagination and campaign filtering

get_link

Get the details of one link by its slug

update_link

Update destination URL, title, campaign, expiration or click limit of an existing link

delete_link

Permanently delete a link and its click history

get_link_analytics

Aggregated click analytics: totals, unique visitors, breakdowns by country, browser, device, OS, referrer, plus a daily time series and top links

get_account_info

Your subscription plan, feature availability, usage limits and API rate limit

Example Prompts

Things you can ask your AI assistant after connecting:

  • "Create a short link for https://mysite.com/launch with the slug product-launch"
  • "How many clicks did my links get in the last 7 days, and from which countries?"
  • "Which of my links performed best this month?"
  • "Create 3 short links for my newsletter campaign with UTM source newsletter"
  • "Show me the daily click trend for the link black-friday over the last 30 days"

Security and Rate Limits

  • The agent only sees links belonging to your account or organization.
  • Your subscription plan is enforced: features like campaigns, UTM parameters or link expiration return a clear error on plans that do not include them.
  • Revoke access at any time by deleting the API key in your dashboard.
  • MCP requests share the same rate limit as the REST API:
Free
100 requests/minute
Starter
300 requests/minute
Growth
600 requests/minute
Pro
1,200 requests/minute
Business
3,000 requests/minute

Prefer classic HTTP requests? The same API key works with the REST API. Curious what else connects to UseClick? See all integrations.