Swap any chart type, hide sections, rename titles, or reorder cards in your analysis reports, instantly, with one API call. No rebuild, no Docker run, no cost. Your customizations persist across sessions and apply to every shareable report link you've generated.
You ran an analysis. The bar chart for "Attrition Rate by Segment" came out with the department names overlapping on the x-axis because they're too long. You want to flip it to a horizontal bar so the labels have room. In most analytics platforms, this means re-running the full analysis: 25 minutes of Docker time, tokens burned, and a new report URL to re-share with your team.
MCP Analytics separates how the data looks from what the data is. The R analysis still produces the same numbers. You override the visual resolver step that turns those numbers into charts. The override is a single API call. It saves to your account, applies on the next render, and every shared link of that report picks it up automatically. No rebuild.
The core endpoint is PATCH /api/v1/user/modules/{module_name}/cards. Send a list of
card overrides; the server replaces your current layout with them:
curl -X PATCH https://api.mcpanalytics.ai/api/v1/user/modules/analytics__hr__employees__attrition_drivers/cards \
-H "X-API-Key: $YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"cards": [
{
"card_id": "comparison_bar",
"kind": "horizontal_bar",
"title_override": "Attrition Rate by Department, Role, and Level"
},
{ "card_id": "preprocessing", "visible": false },
{ "card_id": "effect_bar", "options": { "sort_by": "odds_ratio" } }
]
}'
Response: {"success": true, "saved": 3}. The next time you view a report for this
module, whether you re-run the tool yourself or someone clicks a shareable link you already
sent them. The new layout is live.
Not through MCP today. Our MCP server has no card override tools. Card overrides are set
through the REST endpoints on this page, with your API key in the X-API-Key header.
An agent that can make HTTP calls can send the same PATCH request for you.
| Field | Type | What it does |
|---|---|---|
kind | string | Chart type: must be compatible with the card's data shape. A scatter (needs 2 numerics) can become a line but not a pie. |
visible | boolean | false hides the card; true or omitted shows it. |
position | integer | 0-indexed order, lower sorts earlier. Cards without a position fall through to the default order. |
title_override | string | Replaces the card's default title. |
options | object | Pass-through chart options (sort_by, facet_by, top_n, etc.) specific to the target kind. |
bar, horizontal_bar, grouped_bar, stacked_bar,
line, line_with_band, scatter, scatter3d,
histogram, box, violin, heatmap,
contour, table, pie, donut,
treemap, sunburst, sankey, gauge,
radar, waterfall, funnel, lollipop,
dot.
All five endpoints are at /api/v1/user/modules/{module_name}/cards, authenticated via X-API-Key.
| Method | Path | Purpose |
|---|---|---|
| GET | /cards | Read the caller's saved layout |
| PATCH | /cards | Replace the full layout with a list of overrides |
| POST | /cards/{card_id} | Upsert a single card without touching the others |
| DELETE | /cards/{card_id} | Revert one card to the module default |
| DELETE | /cards | Reset all overrides for this module |
When you run an analysis and get a shareable link like https://api.mcpanalytics.ai/rpt/rpt_abc123,
the link renders with your current card overrides, not a frozen snapshot from
when you generated the link. Edit your layout once: every outstanding share link updates
automatically on next view.
If you need a frozen point-in-time version, use the PDF export: /rpt/{token}/pdf.
PDFs are immune to later edits.
When an override isn't taking effect, walk this checklist in order:
GET /cards and confirm
the card is listed with your settings./api/v1/reports/{id}/cards/data, /rpt/{token}, and the
account-dashboard card endpoints. Other paths (like a raw card thumbnail fetch) may not apply them.GET /api/v1/reports/{id}/cards on a real report to see
the actual card IDs.bar or horizontal_bar but will
produce an empty chart if you try scatter (which needs 2 numerics). Try a sibling
kind from the same family first.Card overrides change presentation, not analysis. The underlying R code, the numbers, the methodology, all unchanged and always visible in the report's "Show the Code" appendix. You're choosing how to display results that remain bit-for-bit reproducible. This is the core differentiator: same inputs, same answer, same code, but the presentation layer is yours to tailor.
Get an API key from your account page, pick any deployed module from our catalog, run it once, then customize the cards. The quick start has the full onboarding flow.