Subtraq

Create short links, track clicks and attribute sales from your AI agent: 8 tools backed by the Subtraq API (spaces, links, analytics, sales).

Hosted MCP Server

npx add-mcp 'https://subtraq.co/api/mcp'

Installs into Claude Code, Codex, Cursor and more

Documentation

One endpoint, eight tools, and your agent knows what sold.

Your agent already speaks MCP. Ours is one endpoint, eight tools, and API-key authentication — the protocol handles the rest. You open the workspace on the free plan, no credit card.

Three letters, zero SDK

MCP

The protocol for your AI agents

Model Context Protocol: the standard plug between an agent and a tool. No library to install, no wrapper to maintain — one URL, one key, and the agent discovers the tools on its own.

What the agent controls, in screenshots

8 tools exposed to the agent

This list is imported from the registry the server actually exposes — when a tool changes, this page changes with it.

list_spaces

Lists the account's workspaces. One workspace = one client, brand or project; everything else (links, clicks, sales) lives inside it.

create_space

Creates a client workspace. Refused with code `space_limit_reached` when the plan is full.

list_links

Lists links. A PARENT link carries the destination; a PLACEMENT (sublink) carries the UTMs of one specific post and inherits the rest.

create_link

Creates a short link. Without `parentId` it is a parent link and `destination` is required. With `parentId` it is a placement: it inherits the parent's destination and carries its own UTMs. Returns `shortUrl`, ready to publish.

get_link

Details a link: its FINAL destination (UTMs included, exactly as the landing site receives it) and its clicks over 30 days.

update_link

Changes a link's destination, label or ADDRESS (`domain` and/or `slug`), or archives it. Changing the address breaks nothing: the old address keeps redirecting to the same place and its clicks count on this link (`previousShortUrls`); placements that shared its domain follow it. A link is NEVER deleted: archived, it stops redirecting (old addresses included) but its history stays.

get_analytics

A workspace's numbers: clicks, leads, sales, ATTRIBUTED revenue and UNATTRIBUTED revenue, plus the detail placement by placement. Amounts in CENTS. Subtraq does not convert currencies: if `mixedCurrencies` is true, the totals only cover `currency`. `model` picks how attribution is read; the response always says which one was used.

track_sale

Records a SALE and ties it back to the person's originating placement. Amount in CENTS. `invoiceId` makes the call idempotent: replaying it never bills twice. A sale can NOT be sent from a browser.

Three tasks. The agent handles them better.

The link mid-conversation

"Create a link to the promo page, channel newsletter, workspace Lartigue" — the agent calls create_link and drops the short URL into your draft.

Monday morning rundown

"What brought in revenue this week, client by client?" — the agent chains list_spaces and get_analytics and answers in plain language, not a table.

The offline sale

A contract signed over the phone? "Record $2,400 for the booth link" — track_sale, and attribution is complete.

What the agent reads: attribution and ROAS

An OpenAPI-documented API

The MCP server and the v1 API share the same registry: eight tools, one truth. Your existing scripts use the API; your agents use the MCP; no one is waiting for another “AI integration.”

GET /api/v1/openapi.json

The full contract, generated from the same tool registry. What the MCP exposes, the API exposes — never one without the other.

8

tools, identical across MCP and API

1

API key — the same for both

0

SDK to install on the agent side

Frequently asked questions

Which agents does it work with?

Any MCP client: Claude (Desktop and Code), and any other client compatible with the protocol. The server speaks standard MCP — initialize, tools/list, tools/call — no proprietary extension.

Can an agent break something?

It does exactly what its API key permits, within that key's workspace. No mass deletion exposed: the tools create, read, and update. Every call is logged like any normal API call.

Which plan includes it?

The API and MCP are tied to your workspace API key. Key creation is available in the product — your plan's limits apply to links created, regardless of where they come from.

Why does a shortener need an MCP?

Because the work around links is conversational: you write a newsletter, prep a campaign, do a client review. The agent is already in the conversation — it may as well create the links and read the numbers without switching tabs.