To ask Claude, or any other assistant that speaks MCP, "what did we spend last week?", you connect it to etlmcp's MCP server, and it answers by calling the query_data tool on the daily rows your pipelines have already stored. You connect in one of two ways: one-click OAuth, where the assistant sends you to etlmcp to approve access, or an API key that you paste into a client that lets you set a header. Without a limit, query_data hands back 100 rows; it never hands back more than 500 in one call. MCP is an open standard for connecting AI applications to outside systems, and Claude, ChatGPT, Visual Studio Code and Cursor all support it. The assistant does the adding up itself, so the caveats that apply to your stored data apply to its answer too.
Step 1: connect the assistant
- One-click OAuth. Chat apps with a connector directory take etlmcp's MCP address alone. When you add it, the app opens etlmcp, you sign in and approve access, and the app holds the tokens. The consent page lists two permissions: reading your sources, destinations, pipelines, runs and stored data, and starting runs of your pipelines. A client that asks for no scope gets both; a client may ask for read alone. Connecting an MCP client with OAuth walks through the screens, and token lifetimes covers how long the connection lasts.
- An API key. Coding assistants and your own agents usually let you type the server address and a header. Create a key on the API page in the app, and send it as a bearer token. A key acts in one workspace. Using an API key from an MCP client has the details.
Either way, the connection reaches one workspace's data, and every call counts toward the limit of 120 requests a minute per credential, shared with the REST API.
Step 2: decide whether the assistant may start syncs
Answering a spend question only reads, so the read scope is enough. Starting a sync is different: run_pipeline needs the run scope. On a key, that is the "May start runs" box when you create it; leave it unticked and the key can only read. When a read-only credential tries to start a run, the tool comes back as an error with this credential cannot start runs; create a key with the run scope, and nothing is queued.
If you want the assistant to refresh the numbers before answering, give it a key with run and follow Refresh, then answer.
Step 3: ask with exact dates
The tool takes dates as YYYY-MM-DD, so "last week" has to become a start and an end. Name them yourself, because the assistant may not know which day your week starts on or what today is in your time zone. A prompt that works:
Using etlmcp, give me total cost for 2026-11-23 to 2026-11-29,
one total per network and per currency. Ask query_data only for
date, network, cost and currency, with the limit set to the maximum.
If the result says truncated, split the week into days and query again
before you give me any total.
Asking for a handful of fields keeps each row small. Each stored row is one day for one ad, ad group or campaign, so a week across many ads can pass the row cap quickly. The result carries truncated, which is true when more rows matched than were returned. Rows come back in date order, so a cut-off answer is missing the latest days of your range, and a total built from it is too low. Getting complete answers from query_data covers splitting a query.
Step 4: check the answer against the data's caveats
The assistant reads the same stored rows you would read in a destination, before any pipeline's transform rules, so the same rules for interpreting them hold.
| What the assistant reports | What to check |
|---|---|
| A single spend total | cost is in each ad account's own currency and is never converted. Accounts billed in different currencies give one total per currency, not one sum. |
| Reach for the week | Reach counts people, so the reach of separate days or separate ads cannot be added. A summed reach figure overstates the audience. When a pipeline's transform groups rows, etlmcp leaves reach out of the totals, but an assistant adding up raw rows has no such rule unless you give it one. |
| GA4 users for the week | extra.total_users and extra.new_users are counted once per day, campaign and source / medium, so they cannot be added either. |
| A blended CPC or CPA | Each row's ctr, cpc, cpm and cpa belong to that row. Ask for the sum of cost divided by the sum of clicks or conversions instead of an average of ratios. |
| Numbers that differ from your warehouse | query_data reads etlmcp's stored copy, not the destination. Renames, filters and derived columns in a pipeline change only what the destination receives. |
Dates in the rows are the ad account's own days, as the tool tells the assistant. Recent days can still move: each sync replaces the days it re-pulls, so last week's figures may be restated by the next run. See the trailing sync window.
Narrow the question to one account
list_sources gives each connected account's id, which the assistant can pass to query_data to stay within one account. Each tool's arguments are on its generated page: query_data, list_sources and run_pipeline.