Date: 2026-07-06
ads_get_performancecanonical read tool with a standard performance envelope and metric/warning metadata.ads_get_creativescanonical creative read tool backed by Meta ad creative asset fetching.ads_get_change_historycanonical change-history tool backed by Meta account activities, with structuredNOT_IMPLEMENTEDfor other providers.ads_get_capabilitiescanonical discovery tool combining static metadata, metric catalogs, and registered adapter capabilities.- Canonical pagination cursor propagation across Meta, TikTok, TikTok GMV Max commerce, and Google adapters.
- Standard commerce envelope for
commerce_get_performancewhile keeping existing fields. - New architecture, MCP API design, and legacy migration docs plus a canonical migration example.
- Aligns the repository with its connector/data-access-layer vision: the MCP layer provides structured data while AI and skills provide reasoning.
- Keeps the public tool surface small and provider-agnostic while retaining legacy compatibility.
- Fully backward compatible. No public MCP tools were removed.
- Legacy provider-specific and level-specific tools remain registered with migration guidance.
Date: 2026-06-25
ads_get_account_performanceMCP broker tool — fetch account-level performance for an ad account in remote broker mode.getAccountInsights()— new Meta API wrapper forGET /act_{id}/insightsusinglevel=account.AdsProviderAdapter.getAccountPerformance()— provider-agnostic interface method.AdsBroker.getAccountPerformance()— credential-resolved read method.- Meta adapter normalization for account totals: spend, impressions, reach, clicks, link clicks, CTR, CPC, CPM, actions, purchase value, purchase ROAS, and leads.
- Fallback ROAS calculation from
purchase_value / spendwhen Meta does not returnpurchase_roas. - TikTok adapter returns
NOT_IMPLEMENTEDfor account performance until TikTok account-level reporting is implemented.
- Portfolio and executive reports need account totals for a period, not campaign-by-campaign sums.
- Summing campaign ROAS is mathematically invalid; account ROAS should come from total revenue divided by total spend.
- Meta account-level Insights can be closer to Ads Manager totals for mixed objective, paused, old, CPAS, app, or marketplace campaign setups.
- Fully backward compatible. No breaking API changes.
- Tool count updated from 24 to 25.
- Existing campaign/adset/ad performance tools remain unchanged and should be used for drill-down analysis.
Date: 2026-06-23
ads_list_campaignsMCP broker tool — list all campaigns under an ad account in remote broker mode.AdsProviderAdapter.listCampaigns()— new interface method for provider-agnostic campaign listing.AdsBroker.listCampaigns()— broker method with credential resolution and permission checks.- Meta adapter uses existing
getCampaigns()tool (Meta APIGET /act_{id}/campaigns). - TikTok adapter uses new
getTikTokCampaigns()tool (TikTok APIGET /campaign/get/). getTikTokCampaigns()— new tool wrapping TikTok Business API campaign endpoint.- Returns error
MISSING_ACCOUNT_IDwhen accountId not provided or resolvable. - 10 new unit tests (420 total, all passing).
meta_get_campaigns(legacy) is blocked in remote broker mode because it cannot resolve credentials from Cuan Insight.ads_get_campaign_performanceonly returns campaigns with spending data in a given period, not a full listing.- Users connecting via Cuan Insight connection key need a way to list all campaigns under their ad account.
- Fully backward compatible. No breaking API changes.
- Tool count updated from 23 to 24.
Date: 2026-06-20
metaPost()— new method on MetaClient for POST mutations to Meta Graph API.pauseCampaign()— pause a campaign via POST{status: PAUSED}.resumeCampaign()— resume a campaign via POST{status: ACTIVE}.updateCampaignBudget()— update daily budget with safety guard (max 200% increase).renameCampaign()— rename a campaign via POST{name}.- Approval workflow —
previewCampaignMutation()(dry-run, show before→after) +executeCampaignMutation()(audit log). - AdsBroker
executeWrite()with permissions check. - MetaAdsAdapter: 4 write methods + capabilities
['read', 'write']. - MCP tools:
ads_pause_campaign,ads_resume_campaign,ads_update_campaign_budget,ads_rename_campaign. - 21 new unit tests (413 total, all passing).
- Real API dry-run verified against live Meta account.
- Fully backward compatible. Read-only tools unchanged.
- TikTok adapter returns NOT_IMPLEMENTED for write ops.
Date: 2026-06-19
- Pagination loop —
MetaClient.metaGet(paginate: true)auto-fetches all pages via cursor/after. - Rate limit safety — parses
X-Ad-Account-Usage, auto-delays at >80%, retries 429 with exponential backoff. - New
paginate,maxPages,pageDelayoptions on all 3 insight tools. - CI pipeline — GitHub Actions runs
tsc --noEmit+npm test+ gitleaks on every PR. - 16 new unit tests for pagination and rate limit (391 total).
- ESLint migrated to flat config (
eslint.config.js) for v9 compatibility.
- Fully backward compatible. Default
paginate: falsepreserves existing behavior.
Date: 2026-06-03
- Added Cuan Insight Connection Key auth mode via
CUAN_INSIGHT_AUTH_MODE=connection_key. - Added
CUAN_INSIGHT_CONNECTION_KEYenv var support. - Added
x-cuan-mcp-connection-keyresolver header sent to Cuan Insight credential endpoint. - Documented hosted Cuan Insight credential control plane setup in README and docs.
- Added connection key redaction to
redactErrorMessageandredactTokenLikeValues. - Added 25 new tests covering config parsing, header behavior, URL construction, and redaction.
- Fixed credential resolver URL construction to preserve base paths such as
/functions/v1(PR #23).
- Live production smoke test passed using Cuan Insight Connection Key:
tools/listreturned 13 MCP tools.ads_list_accountsreturned 25 Meta ad accounts.- Provider-level credential discovery resolved successfully (200 OK).
- Revoked connection key was rejected with 401.
- No fallback to other credential modes.
- No providerToken, raw connection key, key_hash, or Authorization header leaked in any output.
- Existing
CUAN_INSIGHT_MCP_TOKENflow remains the default and unchanged. CUAN_INSIGHT_AUTH_MODEdefaults tomcp_token.- All 13 MCP tools preserved.
- Legacy
meta_*tools still available in local mode.
| PR | Description |
|---|---|
| #21 | Connection Key compatibility layer |
| #22 | Documentation update |
| #23 | Fix credential URL construction |
- Connection key redaction covers:
x-cuan-mcp-connection-key,connectionKey,connection_key,connection-key. redactErrorMessagemasks all auth headers and token-like values in error output.gitleaksclean (7 findings all false positives or gitignored).
- MCP server with stdio, SSE, and Streamable HTTP transports
- 13 read-only tools for Meta Ads analysis
- Remote credential resolution via Cuan Insight
- Rule engine with 26 pre-built templates
- AI skills for natural language ad analysis
- 26 pre-built rule templates (ecommerce, leadgen, brand, general)
- Campaign performance analysis
- Recommendation engine
- TypeScript library for Meta Marketing API
- 6 read-only tools
- MetaClient HTTP wrapper