Connect AI agents

Ask questions about your analytics in two ways: the built-in Ask AI tab (powered by a top frontier model) on your dashboard, or an MCP server that Claude, Codex, ChatGPT, Cursor, Grok, and other agents can query. For MCP you paste one URL, approve access in the browser, and the client can run arbitrary queries against the data.

https://api.revscope.co/v2/mcp

Ask AI

Open the Ask AI tab on your dashboard, or try it on the live demo. Ask in plain language about this project's traffic, attribution, or revenue. The assistant queries your analytics database and shows the SQL behind each number. Conversations stay on that project.

Ask AI uses RevScope's model and counts against the limits below. Connecting Claude, ChatGPT, Cursor, Grok, or another client uses that client's model and does not.

Usage limits

When you hit a limit, Ask AI says so and tells you when it resets.

Claude Code

Claude Code talks to the MCP server from your machine. Add the server, then log in so it can open the browser consent page:

claude mcp add --transport http --scope user revscope https://api.revscope.co/v2/mcp
claude mcp login revscope

That writes the same entry you can put in ~/.claude.json for every project, or in .mcp.json inside one repo. The type field is required:

{
  "mcpServers": {
    "revscope": {
      "type": "http",
      "url": "https://api.revscope.co/v2/mcp"
    }
  }
}

After claude mcp login revscope, complete the RevScope consent page in the browser. You can also run /mcp inside a session. You do not need a client ID or secret.

Default scope is the current project. --scope user makes it available in every project; --scope project writes .mcp.json for the repo. A connector already added under Claude also appears in Claude Code when you are logged in with that claude.ai account.

Claude

Claude connects to remote MCP servers as custom connectors. The connection is made from Anthropic's cloud, so it works in claude.ai, Claude Desktop, Cowork, and the mobile apps from the same setting.

  1. Open Customize, then Connectors.
  2. Click add ↓, then Add custom connector.
  3. Name it RevScope and paste https://api.revscope.co/v2/mcp. Leave the authentication and OAuth client fields on their default values ("Always required" and "No client ID" respectively).
  4. Click Add, then Connect. Your browser opens a RevScope consent page. Log in if you are not already, then approve. For tool permissions, click Needs approval ↓ and change it to "Always allow".
  5. Then test your integration. Ask:

    What RevScope projects do I have?

    How many pageviews has PROJECT received over the last 30 days?

On Team and Enterprise plans, an Owner adds the connector under Organization settings → Connectors first. Members then connect it for their own account. Free plans allow one custom connector.

Codex

Codex (the CLI, IDE extension, and ChatGPT desktop app) shares one MCP config. Add the server, then log in so it can open the browser consent page:

codex mcp add revscope --url https://api.revscope.co/v2/mcp
codex mcp login revscope

That writes the same entry you can put in ~/.codex/config.toml yourself:

[mcp_servers.revscope]
url = "https://api.revscope.co/v2/mcp"

After codex mcp login revscope, complete the RevScope consent page in the browser. The login is stored for later sessions; you do not need a bearer token of your own.

ChatGPT

ChatGPT on the web connects to remote MCP servers as a developer-mode app. This is separate from Codex, which covers the CLI, IDE extension, and ChatGPT desktop app. You need a Plus, Pro, Business, Enterprise, or Education plan.

  1. Open Settings → Security and login and turn on Developer mode. If the toggle is not there, look under Settings → Apps → Advanced settings.
  2. Go to Plugins and click the plus button. Developer mode must be on or that button will not create a custom app.
  3. Name it RevScope and paste https://api.revscope.co/v2/mcp. Leave authentication on OAuth. You do not need a client ID or secret.
  4. Click Create. Your browser opens a RevScope consent page. Log in if you are not already, then approve.
  5. Start a new chat. Open the + menu, choose Developer mode, and select RevScope.
  6. Then test your integration. Ask:

    What RevScope projects do I have?

    How many pageviews has PROJECT received over the last 30 days?

On Business, Enterprise, and Education plans, a workspace admin may need to allow Developer mode or custom connectors first.

Cursor

Add RevScope as a remote Streamable HTTP server. Cursor discovers the OAuth flow from the URL and opens a browser to approve it.

From the UI: open Settings → Tools & MCP (or Customize in the sidebar), add a new MCP server, and paste https://api.revscope.co/v2/mcp. Click Connect when the server asks for authentication.

Or put this in ~/.cursor/mcp.json for every project, or in .cursor/mcp.json inside one repo:

{
  "mcpServers": {
    "revscope": {
      "url": "https://api.revscope.co/v2/mcp"
    }
  }
}

Reload the window if the server does not appear, then connect and approve in the browser. You do not need a client ID or secret.

Grok

Grok on the web connects to remote MCP servers as custom connectors.

  1. Go to grok.com/connectors.
  2. Click New Connector, then Custom.
  3. Name it RevScope and paste https://api.revscope.co/v2/mcp. Complete any authentication Grok asks for. You do not need a client ID or secret.
  4. Your browser opens a RevScope consent page. Log in if you are not already, then approve.
  5. Then test your integration. Ask:

    What RevScope projects do I have?

    How many pageviews has PROJECT received over the last 30 days?

On Grok Business and Enterprise, a team admin adds the connector in the cloud console first. Members then connect it for their own account.

Grok Build (the CLI) can add the same server from your machine. OAuth opens the browser consent page on first use:

grok mcp add --transport http revscope https://api.revscope.co/v2/mcp

That writes the same entry you can put in ~/.grok/config.toml yourself:

[mcp_servers.revscope]
url = "https://api.revscope.co/v2/mcp"

Using the tools

Once connected, ask the client about your traffic, funnels, or payments in plain language. It will call:

Tool What it does
list_projects Returns the project names on your account.
get_schema Returns the SQLite schema those projects share, with notes on how to query it.
run_query Runs one read-only SQL statement against a project. You must pass project_name exactly as list_projects spelled it. Optional limit (max 500) and offset (max 5000) paginate the result; do not put LIMIT or OFFSET in the SQL. Always ORDER BY so pages stay stable.

If project_name is missing or unknown, the tool lists the names it can see so the client can try again.

What you are granting

Need a local stdio server instead, with a project-scoped token in configuration? That package lives in the mcp directory of the RevScope repo.