Marketing Measurement Server
Read your marketing mix models: how much each marketing channel drives a KPI, its ROI, where spend starts to saturate, and the budget scenarios planned on top of each model.
Overview
The Marketing Measurement Server exposes Marketing Measurement data over MCP. In the Sona app, the same data is on Revenue & Marketing Attribution → Forecast & Plan, in the Marketing Mix Modeling and Scenario Planner tabs. The numbers match the page exactly. The server is read-only: scenarios are created and deleted in the app.
Server Details
- Server Name:
marketing-measurement-server - Endpoint:
POST https://ask.sonalabs.com/mcp/marketing-measurement - Transport: Streamable HTTP
- Authentication:
x-api-keyheader with your organization's Ask Your Data API Key. Other organization API keys are not accepted by the MCP server. - Scoping: All data is automatically scoped to the organization that owns the API key.
- Access: Read-only.
Purpose
Answer questions about marketing effectiveness: which channels drive a KPI, their ROI and marginal ROI, which channels are saturating, how much of the KPI comes from marketing versus baseline, and what a planned budget change would do.
Data Model
- KPIs: each KPI selected in Settings → Marketing Measurement (for example Revenue, Sessions, a milestone, or a conversion) gets its own model. With nothing selected, Revenue is the default. A KPI that gets unselected keeps its model, and it can still be read.
- Model: a marketing mix model fitted on daily data: the KPI, spend (and media) per paid channel, and activity per organic channel. Paid and organic channels are picked on the Channels tab of the Marketing Measurement settings. A model's status moves from
pendingtorunningtocompleteorfailed. Only complete models have results. - Baseline: the KPI the model expects without any marketing. Each channel's incremental outcome is the KPI it adds on top, and its % of contribution is its share of the total KPI.
- ROI: incremental KPI per $1 spent (paid channels only). It's a dollar return only when the KPI is Revenue; for Sessions, it's sessions per $1.
- Marginal ROI: the return on the next $1. Marginal ROI well below ROI means the channel is saturating.
- CPIK: cost per incremental KPI unit.
- Effectiveness: incremental KPI per media unit.
- Response curves: per paid channel, the expected incremental KPI at 0× to 2× its actual spend over the model period.
- Credible intervals: every estimate comes with a 90% credible interval (low – high).
- Scenarios: Scenario Planner what-ifs. A scenario is a copy of a KPI's model data with paid spend changed, refitted as its own model.
- Manual scenarios hold shifts: a monthly amount moved from one paid channel to another.
- Auto scenarios hold allocations: new monthly spend per paid channel, from a fixed monthly budget or a flexible revenue/ROI target, optionally within per-channel bounds (min/max % change from current spend).
- Scenario amounts are monthly.
Which Tool Answers What
| Question | Tool |
|---|---|
| Which KPIs are modeled? Is a model ready, running, or failed? | Mix Model KPIs List |
| Channel ROI, incremental KPI per channel, contribution, saturation / response curves, model fit, spend over time | Mix Model Results (kpi, default Revenue) |
| Which budget scenarios were planned, and what each one changed | Mix Model Scenarios List |
| One scenario's results, such as "what if we move $X from A to B?" | Mix Model Scenario Results, compared against Mix Model Results for the same KPI |
Recommended Workflow
- Call Mix Model KPIs List to see which KPIs are modeled and whether each model is complete. Its KPI names are the
kpivalues the other tools take. - Call Mix Model Results for a KPI, asking only for the
sectionsthe question needs. - For what-if questions, call Mix Model Scenarios List to find the scenario, then Mix Model Scenario Results, and compare it with Mix Model Results for the same KPI.
Every tool returns formatted Markdown tables with a short note underneath, so responses render directly in the assistant's answer without extra formatting work.
Available Tools
1. mix-model-kpis-list-tool
Purpose: List every modeled KPI.
Input: None required.
Returns: each KPI, whether it's still selected in settings, its latest model's status, model ID, last updated date, and the error of a failed fit. "No model yet" means the KPI is selected but no model has been queued.
When to use: Start here. Its KPI names are the kpi values of the other tools.
2. mix-model-results-tool
Purpose: Get the latest model for one KPI.
Input:
kpi(optional, defaultRevenue)sections(optional array, default all):overview,channels,contribution,responseCurves,modelFit,modelInputgranularity(optional) formodelFitandmodelInput:day,week,month(default),quarter
Returns, by section:
- overview: period, total actual and expected KPI, baseline share, R², MAPE, and wMAPE.
- channels: per channel: paid or organic, incremental KPI (90% CI), % of KPI, spend, % of spend, ROI (90% CI), marginal ROI, CPIK (90% CI), and effectiveness.
- contribution: baseline versus channel share of the KPI.
- responseCurves: incremental KPI and KPI per $1 at 0×–2× spend, per paid channel.
- modelFit: actual versus expected versus baseline KPI over time.
- modelInput: KPI, spend per paid channel, and organic activity over time.
A pending, running, or failed model returns its status (and error) instead of results.
When to use: Channel ROI, contribution, saturation, and model fit questions, such as "Which channel has the best ROI for Revenue?"
3. mix-model-scenarios-list-tool
Purpose: List Scenario Planner runs, newest first.
Input:
kpi,status(pending,running,complete,failed),limit(default 25, max 100)/offset(optional)
Returns: scenario ID, created date, KPI, status (with error), mode (manual shift, or auto with a fixed budget or flexible target), the changes (shifts or allocations, monthly), and bounds. It doesn't return results.
When to use: To find which scenarios were planned and what each one changed. Use its scenario ID with mix-model-scenario-results-tool.
4. mix-model-scenario-results-tool
Purpose: Get one scenario's results.
Input:
scenarioId(required, UUID)sections,granularity(optional, same asmix-model-results-tool)
Returns: the scenario's inputs (planner mode, budget, shifts or allocations, bounds), then the same result sections as mix-model-results-tool for the refitted model.
When to use: "What if" questions. Compare its results with mix-model-results-tool for the same KPI.
Models are fitted on daily data, so a year is about 365 rows of model fit and model input. The tools roll these up by month by default, and let the assistant fetch only the sections a question needs. The rolled-up model fit leaves out credible intervals, since they don't add up across days. Use granularity: day to get them.
Notes
- All data is automatically scoped to the authenticated organization.
- KPI names are exact (for example
Sessionsor a milestone name). Take them frommix-model-kpis-list-tool. - Only complete models have results. The assistant never estimates numbers for pending, running, or failed models.
- A scenario is a refit, not a delta. To answer "what if", compare the scenario's results with the real model for the same KPI.
- When no bounds were set, a scenario's bounds are empty, meaning no limits.
- The same data is also available as a REST API for external integrations. See the Marketing Measurement API reference. The MCP server doesn't call these endpoints.
Example Questions
- "Which KPIs do we have marketing mix models for?"
- "Which channel has the best ROI for Revenue, and is any channel saturating?"
- "How much of our Sessions comes from marketing versus baseline?"
- "Compare our latest budget scenario to the current model."
Connecting a Client
The Marketing Measurement Server is a remote HTTP MCP server. See the Claude Integration guide to connect it to Claude Code, Claude Desktop, or claude.ai (use https://ask.sonalabs.com/mcp/marketing-measurement as the URL), or the LLM Integration Guide for OpenAI.