meryn-mcp
v0.1.0MCP server for the meryn API — read your MMM results and launch runs from Claude
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_engines
List the MMM engines available (Robyn, Meridian, PyMC): which ones support per-market (geo) data and which have a budget allocator. Start here when you do not know what the account can do.
list_engine_params
The full configuration surface of one engine: every knob with its type, default, bounds and help text, plus the effort levels and the prior families it offers. This is the schema of the `config` object that create_model accepts — read it before building a config, because it is served live from the database and changes without a release.
| Parameter | Type | Description |
|---|---|---|
engine * | string | Engine key, e.g. "robyn", "meridian" or "pymc". |
list_projects
List the projects visible to this key, newest configuration first.
| Parameter | Type | Description |
|---|---|---|
limit | string | Max projects to return. |
offset | string | Skip this many. |
get_project
One project with its node graph: the datasets, mappings, periods, models and allocators it holds, and which engines its level allows.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Numeric project id. |
list_models
List trained or configured models. Filter by `engine`, `status` ("configured", "processing", "completed", "error") or `project`.
| Parameter | Type | Description |
|---|---|---|
engine | string | Only this engine. |
limit | string | Max models to return. |
offset | string | Skip this many. |
project | string | Only models of this project id. |
status | string | Only this status. |
get_model
One model: its status, the period it trained on, its data frequency and its allocators.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | Model UUID. |
get_model_metrics
Fit and attribution metrics for a model, as raw numbers plus a `units` map saying how to read each one. IMPORTANT: values flagged "fraction" are 0-1, not percentages; a `null` means not measured (never zero); and anything listed in `not_applicable` does not exist for that engine (Robyn has no MCMC, so it has no r-hat). Do not convert or fill these in.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | Model UUID. |
geo | string | A market name, or "total" for the national row. |
sol_id | string | Robyn only: a specific Pareto solution. Defaults to the selected one. |
split | string | One of "all", "train", "validation", "test". |
get_model_readiness
Whether this model is fit to make decisions with: a green/amber/red verdict and the findings behind it. IMPORTANT: `state` can be "pending" (the verdict has not been computed yet) or "not_evaluated" (it ran and could not measure anything). Neither of those means the model is good — do not report a model as sound without an "evaluated" state.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | Model UUID. |
get_model_logs
Current stage, elapsed time and the last worker log lines of a run. Use this to follow a run you launched, or to find out why one failed. Pass `since` (ISO timestamp) to get only what is new.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | Model UUID. |
since | string | ISO timestamp; only newer lines. |
list_model_runs
The last runs of a model: when each started and ended, and how it finished. Use it to tell "this never ran" from "this failed three times" — and to see how long a run of this size takes before launching another.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | Model UUID. |
list_model_charts
Which chart datasets a model has, and WHICH AXIS they cut on — read this before asking for one, instead of guessing the parameter. `axis` is "geo" (pass a market name), "sol_id" (Robyn, which has hundreds of Pareto solutions but no markets) or null (nothing to choose). `national_only` lists the charts that cannot be cut by market at all, with the reason.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | Model UUID. |
geo | string | Market name. Only for engines whose axis is "geo"; omit for national. |
sol_id | string | Robyn only: a Pareto solution. Defaults to the one selected in the app. |
get_model_chart
One chart dataset as rows, with a `units` map and `null_means` next to them: the contribution waterfall, the fit over time, response curves, adstock decay, convergence, credible intervals, the decomposition. Call list_model_charts first to see what this model has. IMPORTANT: if `national_only` is set, the rows are NATIONAL and not the market you asked for — say so rather than reporting them as that market. Values flagged "fraction" are 0-1, and a `null` means not measured, never zero.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset name, from list_model_charts. |
model_id * | string | Model UUID. |
geo | string | Market name, for engines whose axis is "geo". |
limit | string | Max rows. Omit to get the whole series — a truncated chart looks complete. |
offset | string | Skip this many rows. |
sol_id | string | Robyn only: a Pareto solution. |
list_model_results
Which finer-grained result tables a model has. Use these when a chart is too aggregated for the question: the waterfall sums over every date, so "contribution of TV by week" is not in it, and the decomposition folds intercept, trend and seasonality into one baseline series.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | Model UUID. |
get_model_results
One result table whole, with the market, the date and the Pareto solution as COLUMNS rather than parameters — one call gets the cube and you group it yourself. Paginated, so check `count` against what you received before concluding anything about totals.
| Parameter | Type | Description |
|---|---|---|
family * | string | Family name, from list_model_results. |
model_id * | string | Model UUID. |
limit | string | Max rows per page. |
offset | string | Skip this many. |
list_eda
The exploratory data analyses (EDA) in this account. EDA is not one of the MMM engines — it checks a dataset BEFORE training — so it lives on its own path and does not appear in list_models.
| Parameter | Type | Description |
|---|---|---|
limit | string | Max to return. |
offset | string | Skip this many. |
status | string | Filter by status, e.g. "completed". |
list_eda_charts
Which EDA datasets a run has (series, correlations, VIF, cost share, lagged correlations).
| Parameter | Type | Description |
|---|---|---|
eda_id * | string | EDA UUID. |
geo | string | Market name; omit for the aggregate. |
get_eda_chart
One EDA dataset as rows: the variables over time, the correlation pairs, the VIF per variable with its reading, the cost share, or the lagged correlations. Use this to judge whether a dataset is fit to train on — collinearity and flat channels are what make a model unusable later. IMPORTANT: omitting `geo` gives the AGGREGATE, which is computed on the panel collapsed by date, not the sum of the markets.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset name, from list_eda_charts. |
eda_id * | string | EDA UUID. |
geo | string | Market name; omit for the aggregate. |
limit | string | Max rows. Omit for the whole series. |
offset | string | Skip this many. |
get_allocator
A budget allocation: its scenario, budget and the national lift it found.
| Parameter | Type | Description |
|---|---|---|
allocator_id * | string | Allocator UUID. |
get_allocator_channels
The per-channel budget split of one market cut: current vs optimal spend and response. Pass `geo` for a market; the default is the national row. The `totals` object leaves a response at null when any channel is missing it — that is not zero, and summing around it would present a partial as a total.
| Parameter | Type | Description |
|---|---|---|
allocator_id * | string | Allocator UUID. |
geo | string | Market name, or "total". |
get_allocator_efficiency
Current vs optimized per metric, with the improvement — every market cut at once, with `geo` as a column. IMPORTANT: read `total_means` before adding anything up. In PyMC the `total` rows ARE the sum of the markets (it optimises jointly); in Meridian each market is an independent optimisation and its rows do NOT add up to the total.
| Parameter | Type | Description |
|---|---|---|
allocator_id * | string | Allocator UUID. |
limit | string | Max rows per page. |
offset | string | Skip this many. |
list_datasets
The uploaded CSVs of a project, with their row and column counts.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Numeric project id. |
limit | string | Max to return. |
offset | string | Skip this many. |
list_mappings
The variable mappings of a dataset: which role each column plays, the date range of the file and the frequency measured from it. Read this to know what a model will actually train on.
| Parameter | Type | Description |
|---|---|---|
dataset_id * | string | Numeric dataset id. |
limit | string | Max to return. |
offset | string | Skip this many. |
list_periods
The periods (date windows) defined on a mapping. A period id is what create_model requires — the window decides which rows train, and it is asked for explicitly rather than guessed.
| Parameter | Type | Description |
|---|---|---|
mapping_id * | string | Numeric mapping id. |
limit | string | Max to return. |
offset | string | Skip this many. |
create_model
Create a model on an existing period. It does NOT start training: the model is left ready to run, so you can build and review a configuration safely. Build `config` from list_engine_params; anything you omit takes the default from the database. Upload and map a dataset in the web app first — this API does not do that step.
| Parameter | Type | Description |
|---|---|---|
engine * | string | Engine key. |
period_id * | string | Numeric id of the period (Experiment) to train on. |
config | object | Object of knob → value, as described by list_engine_params. |
name | string | Optional name. A default naming the engine is used otherwise. |
run_model
Start training a configured model. COSTS COMPUTE: tens of minutes of Cloud Run and one concurrent-run slot of the plan. Returns immediately; follow it with get_model_logs. A model already running returns 409 — do not retry it.
| Parameter | Type | Description |
|---|---|---|
confirm * | boolean | Must be true. Launching costs real compute (tens of minutes of Cloud Run) and uses one of the team plan concurrent-run slots, so it is never implicit: ask the user before setting it. |
model_id * | string | Model UUID. |
cancel_model_run
Stop a queued or running model and leave it ready to run again. Cancelling is a request, not a kill: the container can take a few seconds to stop, and it saves nothing from the cancelled run.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | Model UUID. |
create_allocator
Create a budget allocation on a trained model. Does NOT run it. Which scenarios exist, and which of them need a target instead of a budget, comes from list_engine_params for `<engine>_allocator`.
| Parameter | Type | Description |
|---|---|---|
end_date * | string | ISO date of the window end. |
model_id * | string | UUID of the trained model to optimise. |
name * | string | Name for this allocation. |
start_date * | string | ISO date of the optimisation window start. |
channel_constraints | object | Optional per-channel bounds envelope. |
optimization_scenario | string | Scenario key, e.g. "max_response" or "fixed_budget". |
optimize_by_geo | string | Per-market optimisation. Meridian and PyMC only, and it means a different thing in each: PyMC moves budget between markets, Meridian runs one optimisation inside each. |
target_value | string | Target, for target scenarios. |
total_budget | string | Budget to allocate, for budget scenarios. |
run_allocator
Run a configured budget allocation. COSTS COMPUTE, though much less than training. Returns immediately.
| Parameter | Type | Description |
|---|---|---|
allocator_id * | string | Allocator UUID. |
confirm * | boolean | Must be true. Launching costs real compute (tens of minutes of Cloud Run) and uses one of the team plan concurrent-run slots, so it is never implicit: ask the user before setting it. |