Developers

MCP server for Claude and ChatGPT

Connect Claude, ChatGPT or another AI assistant to Sporetag with a read key, then ask how your site did last week in plain words.

Sporetag has a remote MCP server. MCP (Model Context Protocol) is the open standard AI assistants use to read other tools. Once it is connected, ask your assistant things like:

  • "How did shop.example.com do last week compared with the week before?"
  • "Which campaigns brought sales this month?"
  • "What is my ROAS on Meta for the last 30 days?"
  • "Which short link got the most clicks this week?"

The assistant reads the numbers through Sporetag and answers from them. It can only read. It cannot change a site, a goal, a link or a setting.

The MCP server is on paid plans: Solo, Studio, Agency and Custom.

1. Make a read key

Open Settings, then API, and make a key. Pick All sites, or one site if the assistant should only see that one. Copy the key. It is shown once. See Read API for more on keys.

2. Connect your assistant

The server lives at:

Text
https://sporetag.com/mcp

It takes the key as Authorization: Bearer st_rk_.... Apps that only take an address can use the key in the address instead:

Text
https://sporetag.com/mcp/st_rk_...

Treat that address like a password. Anyone who has it can read what the key reads.

Claude (claude.ai and the desktop app)

  1. Open Settings, then Connectors.
  2. Choose Add custom connector.
  3. Name it Sporetag. For the URL, paste the address with your key: https://sporetag.com/mcp/st_rk_...
  4. Leave the OAuth fields empty and press Add.
  5. In a chat, turn on Sporetag from the tools menu, then ask a question.

On Team and Enterprise plans, an owner may need to add the connector for the organization first.

Claude Code

Shell
claude mcp add --transport http sporetag https://sporetag.com/mcp \
  --header "Authorization: Bearer st_rk_..."

ChatGPT

Custom MCP servers in ChatGPT need developer mode, which OpenAI offers on some plans. Turn it on under Settings, Apps and Connectors, Advanced. Then create a connector with the address that has your key in it, and choose no authentication. OpenAI may name these menus differently on your plan.

Cursor, VS Code and other MCP clients

Most clients take a JSON entry like this:

JSON
{
  "mcpServers": {
    "sporetag": {
      "url": "https://sporetag.com/mcp",
      "headers": { "Authorization": "Bearer st_rk_..." }
    }
  }
}

A client that only runs local servers can reach it through mcp-remote:

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

Tools

ToolWhat it reads
list_sitesYour sites: id, name, address and time zone
get_statsVisitors, visits, pageviews, bounce rate, visit duration, conversions and conversion rate, with the span before; optionally per hour, day or month
get_breakdownTop sources, referrers, UTM values, pages, countries, devices, browsers or goals
get_goalsGoals with conversions and conversion rate
get_attributionConversions and revenue credited by source, campaign, ad, ad set, platform or short link, first or last touch
get_ad_spendAd spend, credited revenue and ROAS by platform, campaign, ad set or ad
get_linksShort links with clicks

Every tool is marked read-only. Dates work as in the read API: whole local days in the site's time zone, unless the assistant passes another.

Good to know

  • Each request counts toward the key's 120 requests a minute, shared with the read API.
  • Source names, page paths and campaign names come from visitors and ad platforms. The server tells the assistant to treat them as data, never as instructions.
  • No visitor emails, names or phone numbers are ever sent to the assistant.
  • To disconnect, remove the connector in your assistant and revoke the key in Settings, API.

For developers

The server speaks MCP over Streamable HTTP: JSON-RPC 2.0 in a POST, one JSON answer back, no server-sent events and no session. It supports protocol versions 2025-11-25, 2025-06-18, 2025-03-26 and 2024-11-05, and the methods initialize, ping, tools/list and tools/call. GET answers 405.

Shell
curl https://sporetag.com/mcp \
  -H "Authorization: Bearer $SPORETAG_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_stats","arguments":{"site_id":"8fK2pQ","period":"7d"}}}'

Something missing or wrong? Email hello@sporetag.com.