07MCP

Connect a client

Every client below needs the same address and signs you in with your SnowAnalytics account.

https://mcp.snowanalytics.app/mcp

The first time, a browser window opens. Sign in, leave Make changes for you on or turn it off to only read, choose whether Visitor names & emails are included, and approve. Nothing else is stored on your machine but a token you can revoke.

With the CLI installed, snowanalytics mcp add claude-code (or cursor, vscode, codex, gemini, windsurf) adds it for you.

Open Settings → Connectors, choose Add custom connector, name it SnowAnalytics and paste the address. Then choose Connect and approve.

Client menus and flags change. If one of these steps doesn't match what you see, the address and OAuth sign-in are all the client needs.

Narrow what a client sees

Add these to the address to limit a connection:

ParameterEffect
?sites=site_id,site_idThe agent only reaches the listed sites. It can't add sites or use workspace and account actions such as members or billing.
?read_only=1Hides every tool that changes data, whatever the consent screen allowed.

Agent keys

OAuth needs a person at a browser. For scripts, CI and agents that can't open one, make an agent key.

Create the key

Open Account → Connected apps at /account/apps and, under Agent keys, choose Create key. Name it after where it will run, leave Make changes for you on or turn it off, and decide on visitor data.

Copy it once

The key starts with snw_agent_ and is shown a single time. Store it as a secret.

Send it as a bearer token

curl https://mcp.snowanalytics.app/mcp \
  -H "Authorization: Bearer $SNOWANALYTICS_AGENT_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Clients that take headers send the same one.

Claude Code, Cursor, VS Code style
{
  "mcpServers": {
    "snowanalytics": {
      "url": "https://mcp.snowanalytics.app/mcp",
      "headers": { "Authorization": "Bearer ${SNOWANALYTICS_AGENT_KEY}" }
    }
  }
}
claude mcp add --transport http snowanalytics https://mcp.snowanalytics.app/mcp \
  --header "Authorization: Bearer $SNOWANALYTICS_AGENT_KEY"

A key acts as your account, like a signed-in client, so it reaches the same sites. Revoke it from Connected apps and it stops working at once.

The CLI takes the same key from SNOWANALYTICS_AGENT_KEY, for scripts and CI that would rather run a command than speak MCP.

Without an account

Someone who doesn't use SnowAnalytics yet can still let an agent set it up.

  • At a browser: the sign-in page an agent's connect opens has Start without an account. The agent gets a guest workspace at once, and every result it sees carries a link the person opens later to save it to their account.
  • Without a browser: an agent starts a guest itself with POST https://snowanalytics.app/api/agent/start and the JSON body {"agent": "<its name>"}. The answer has an agent key, the MCP address and the same save link. Agents find these steps at snowanalytics.app/auth.md.

Until it's saved, a guest has at most two sites and can't connect payment or ad accounts, add alert destinations, invite people, make keys or pay. Saving moves the sites into a workspace the person chooses and ends the guest's own connections and keys. A guest nobody saves is deleted a month after its trial stops counting.

On this page