Guides

cia.sh MCP server

Let Claude, Cursor, VS Code or any MCP client create short URLs on cia.sh, find and change them, and read their click analytics, with a workspace API key.

Endpoint

  • URL: https://mcp.cia.sh/mcp
  • Transport: Streamable HTTP (JSON-RPC 2.0 over POST); clients send Accept: application/json, text/event-stream.
  • Authentication: an x-api-key header with a workspace API key (API keys in your workspace). A read key lists and reads; a write key also creates and changes links.
  • The server sends its own instructions in the initialize result, and lists its tools dynamically.

Tools

  • create_short_url: Shorten a URL on a brand domain, the workspace subdomain or a custom domain, with an optional slug, expiry, password, click limit and smart redirects.
  • bulk_create_short_urls: Create up to 100 short URLs in one call, each with an optional slug.
  • create_secret_url: Encrypt a secret on the MCP server (AES-256-GCM; the key exists only in the returned URL) and answer its one-time secret URL. For zero-knowledge, create it in the browser instead.
  • list_urls: List the workspace’s URLs with their status, clicks and destination, filtered by text, tag or domain.
  • get_url: One URL with its settings and counts.
  • update_url: Change a URL’s destination, slug, tags, expiry or status.
  • delete_url: Delete a URL; it stops opening at once.
  • get_url_analytics: Clicks and unique visitors over time, by country, device, browser, system, referrer, source and smart redirect.
  • list_url_visits: The raw visit log of one URL (90 days), with place, device and source.
  • get_secret_url_status: A one-time secret URL’s views left and expiry, never its content.
  • list_domains: The domains this workspace can create URLs on.
  • list_activity: Who changed what in the workspace.

One-time secret URLs and who sees the plaintext

The MCP server's create_secret_url encrypts in memory and keeps only ciphertext; the key exists only in the returned URL. When cia.sh must never see the plaintext, use the /secret page: the browser encrypts it, and in a browser with WebMCP the page's own create_secret_url tool does the same in the page.

Connect a client

Replace <your-api-key> with a key from your workspace.

Claude Code

claude mcp add --transport http cia-sh https://mcp.cia.sh/mcp --header "x-api-key: <your-api-key>"

Claude Desktop, Cursor (.cursor/mcp.json) and most clients

{
  "mcpServers": {
    "cia-sh": {
      "type": "http",
      "url": "https://mcp.cia.sh/mcp",
      "headers": {
        "x-api-key": "<your-api-key>"
      }
    }
  }
}

VS Code (.vscode/mcp.json)

{
  "servers": {
    "cia-sh": {
      "type": "http",
      "url": "https://mcp.cia.sh/mcp",
      "headers": {
        "x-api-key": "<your-api-key>"
      }
    }
  }
}

Limits and errors

  • Plan limits apply as in the app: links per month, custom domains and analytics history.
  • Over the rate limit the server answers 429 with Retry-After in seconds.
  • Errors carry a code and a message: { "error": "CODE", "message": "…" }.

Discovery