# Ask Claude about your traffic and revenue

Source: https://databull.app/ask-claude-about-your-analytics
Updated: 2026-10-28 · Author: Ahmed Gagan (maker of DataBull)

> Connect Claude to your DataBull and ask in plain English: which post made money this month, why sales dipped, how your latest customer found you. Claude reads your own numbers, live, through a read-only key.

**Short answer:** Yes. DataBull has a built-in MCP server, so Claude Code (and any other MCP client) can read your traffic, sales and revenue by source with a read-only key. Run `npx databull@latest mcp`, then ask things like "which referrer made me the most money this month?" Claude answers from your own DataBull data, live.

## Questions Claude can answer, and how

Claude doesn't guess from screenshots. It calls DataBull's tools, gets the numbers as data, and explains them. Each question below maps to the tool Claude reaches for.

| You ask | Claude uses | What comes back |
| --- | --- | --- |
| "Which referrer made me the most money this month?" | `get_breakdown` | Referrers ranked by revenue, with visitors, sales and conversion for each. |
| "Compare this week with last week. What changed?" | `compare_periods` | Visitors, revenue and conversion against the week before, and the sources that gained or lost the most. |
| "Show my last 10 sales and where each buyer came from." | `list_sales` | Each sale with amount, product and the channel, referrer and campaign it is credited to. |
| "Walk me through my latest customer's journey." | `get_visitor` | Every visit, source and page in order, up to the payment. |
| "Which channel brings customers who keep paying?" | `get_customer_value` | Lifetime value by the source that first brought each customer, renewals included. |
| "How long do people take to buy?" | `get_purchase_paths` | Median days and visits before the first purchase, and the pages seen before paying. |
| "When should I post?" | `get_peak_hours` | When visitors come and when buyers pay, by weekday and hour in your time zone. |
| "Which pages do buyers actually read?" | `get_engagement` | Reading time and scroll depth per page, buyers against everyone else. |

There are 14 tools in all, every one read-only. The [MCP server page](https://databull.app/analytics-mcp-server) lists them.

## What an answer looks like

An example on sample data (not a real site), for "which post made me money this month?":

> **Example, sample data.** "Most of this month's revenue came from x.com: $1,240 from 26 sales, at 3.1% conversion. news.ycombinator.com sent more visitors but converted at 0.9%. Google is smaller but steady: 11 sales, most of them landing on /pricing. If you post again, the busiest buying hours are Tuesday and Wednesday, 3 to 6 pm your time."

Claude can follow up on its own: open the buyer journeys behind the top referrer, or compare the same week a month ago. It never sees more than the key allows.

## Set it up in about a minute

1. **Run one command**
```
   npx databull@latest mcp
```
On the computer you installed DataBull from, it creates a read-only key, checks the connection, and offers to add DataBull to Claude Code for all your projects.
2. **Open Claude Code**
Run `/mcp` and you should see **databull** connected. Details in the [Claude Code guide](https://databull.app/mcp/claude-code).
3. **Ask**
Start with "list my sites", then ask about any of them by domain.

On [DataBull Hosted](https://databull.app/hosted), or from another computer, create a key in your dashboard under **Settings → API keys & AI agents**. It shows the same command and config, filled in.

## Claude Code, Claude Desktop and claude.ai

**Claude Code** is the tested path: one command, header authentication, works on every plan.

**Claude Desktop and claude.ai** add remote servers as custom connectors. DataBull keys are a fixed bearer token, not an OAuth sign-in, so a connector needs the **Request headers** option, which Anthropic lists as a beta for a limited set of organizations. If your *Add custom connector* dialog shows it: enter your `/mcp` URL, choose *No sign-in*, and add an `authorization` header with the value `Bearer dbk_…`. If the dialog has no Request headers section, claude.ai can't connect to DataBull yet; use Claude Code, or another client such as [Cursor](https://databull.app/mcp/cursor).

## Safe by default

- **Read-only.** No tool can change a setting, a site or a sale.
- **Names and emails stay hidden** unless you create a key with *Include customer names and emails*.
- **Revocable.** Keys are stored only as a hash. Revoke one under Settings → API keys, and that agent loses access at once.
- **Direct.** Claude talks to your own DataBull: on your Cloudflare account when self-hosted, or your own dashboard on ours with Hosted.

## FAQ

### Does Claude see my customers' names and emails?

Not by default. Keys hide customer names and emails unless you create one with *Include customer names and emails*. Sales still show amount, product and source.

### Can I use Claude on the free claude.ai plan?

Only through a custom connector with request headers, which Anthropic is rolling out as a beta. Claude Code works today with a plain header. See [the Claude Code setup](https://databull.app/mcp/claude-code).

### Are the numbers the same as my dashboard?

Yes. The dashboard, the CLI and the MCP tools read the same data with the same attribution model, so Claude and the dashboard agree.

### What if I have several websites?

Ask "list my sites" first. Every tool takes a site by its domain, so you can ask about each one, or compare them, in one conversation.
