Marketing analytics MCP and API guide
Connect ad networks to Claude and ChatGPT through Lemon AI’s unified MCP and API. Query creative metrics, compare attributes, and verify marketing performance.
Connect your ad networks to Lemon AI once, then add its unified MCP to Claude, ChatGPT, or another compatible AI app. Your assistant can retrieve creative performance, inspect individual assets, and compare their assigned attributes through one connection. The same reporting layer is available through a REST API for scripts and custom agents.
This is useful when a follow-up question keeps sending you back to a network dashboard: another week, another country, or the video behind a promising row. Instead of uploading a new spreadsheet each time, the assistant can request the selected data from your connected accounts.
Choose how your assistant gets the data
| Route | When it makes sense | What you take responsibility for |
|---|---|---|
| Export a report and upload it | A one-off question with a fixed dataset | Dates, filters, definitions, file refreshes, and context missing from the export |
| Connect a network's API or MCP | Deep questions about one network's specific objects | Authentication, hosting where required, and that connector's reporting scope |
| Connect Lemon's unified MCP and API | Recurring creative and attribute analysis across connected networks | Account connections and a clearly scoped question |
A direct connector can be the right choice. Google's MCP exposes Google-specific reporting resources; TikTok has a connector listed in Claude's marketplace. Other networks offer reporting APIs that you can wrap in agent tools. Check who operates a connector, what it exposes, and whether it can change campaigns before connecting it.
Lemon's role is the shared reporting layer: cleaned and organized creative data, assigned creative attributes, and available asset-level metrics exposed through one MCP and API. It does not make every source field comparable or fill a missing outcome with an invented number.
Connect your ad networks
In Lemon, open Connections, add the networks you use, and complete their account authorization. Let the initial sync finish, then inspect the intended app, campaign, and dates in Creative Analytics. Each guide below covers network setup, a direct alternative, example prompts, and a reporting trap to check before using the answer.
| Network guide | What the worked example establishes |
|---|---|
| Google Ads MCP | Allocated asset value is not the same as a post-install cohort outcome |
| Meta Ads MCP | A CTR decline is an observation, not proof of creative fatigue |
| AppLovin MCP | Independently estimated asset outcomes do not add to a source total |
| TikTok Ads MCP | Video engagement and revenue require different evidence |
| Apple Ads MCP | Keyword performance does not identify the winning creative |
| Unity Ads MCP | Creative-pack totals cannot be duplicated onto every asset |
| Mintegral MCP | A refreshed report snapshot is not another batch to add |
| Kayzen MCP | Available attributed value does not imply available purchase counts |
Add Lemon to Claude or ChatGPT
Use the same remote MCP server for all the networks you connect in Lemon:
https://api.lemon-ai.com/mcp
In Claude, open Customize → Connectors → + Add → Add custom connector. Enter a name and the URL, continue, and sign in to Lemon. If Claude asks how to register the OAuth client, choose Register automatically. Enable the connector in the conversation. Organization-managed accounts may need an owner to add it first. See the Claude setup instructions.
In ChatGPT, open Plugins, choose Add custom MCP server, and enter the URL. Select OAuth authentication, authorize Lemon, and install the resulting personal plugin. Mention it in a Work chat to use its tools. Availability depends on your workspace settings; follow the current ChatGPT MCP instructions if the interface differs.
Start by asking the assistant to call list_ad_accounts and let you select the intended account. Then use list_filter_values to discover dates and filters. Your ad-network sign-in connects data to Lemon; this second authorization lets the AI app read it. Do not paste network credentials into chat.
Ask for an account before asking for winners
Start with a small, inspectable question:
Use Lemon AI to list my connected ad accounts. Ask me to choose the account and app, then discover available dates and filters. For a complete week, show video creatives ranked by cost, with impressions, clicks, and CTR. Include the account, dates, currency, result count, and any missing fields. Do not change campaigns or budgets.
The account ID comes from list_ad_accounts, not from a guessed name. list_filter_values helps resolve dates, campaigns, apps, and countries. query_creative_performance retrieves the selected metrics and population. get_creative opens a selected asset's details.
The API returns CTR and ROAS as ratios. A CTR of 0.02 is 2%; ROAS of 0.40 is 40%. An assistant should label those units, preserve N/A values, and inspect response metadata before drawing a conclusion.
Move from a creative ranking to its attributes
A list of winners says which files performed well. Attribute analysis asks what those files have in common: an opening hook, format, character, visual treatment, or another label defined in your workspace.
For the same account, app, dates, and video population, list the available creative attributes. Use attribute_insights to compare CTR by a defined hook label. Show coverage, eligible creatives, uncertainty, and missing evidence. Propose one controlled follow-up test; do not describe the association as a causal result.
list_creative_attributes discovers the fields and values. attribute_performance provides grouped reporting, while attribute_insights adds evidence qualification. Use the actual attribute IDs and values returned by the tools. Do not invent tags from campaign names or assume every creative has every label.
For the full reasoning sequence, use the creative performance MCP workflow. For label coverage and accuracy, use the creative-tagging QA protocol.
Compare networks without inventing a universal ROAS
One connection removes repeated setup. It does not remove differences in currencies, attribution, cohort maturity, or reporting grain. Ask the assistant to keep each network separate until those dimensions are compatible.
Synthetic illustration, not customer data: one asset has $40 in value on $100 cost; another has $180 on $300 cost. Their ROAS values are 40% and 60%. If the two rows are additive and share a compatible attribution basis, the combined result is $220 / $400 = 55%, not the simple average of 50%. If the outcomes are independent asset estimates, even that sum may be invalid.
AppLovin asset estimates can be non-additive. Google's conversion-lag windows do not become post-install D7 cohorts because their labels both involve days. Missing purchase counts must not become zero purchases. Check asset-level creative ROAS and attribution windows before building a cross-network scorecard.
Use the same reporting layer through the API
For a script or another AI app, create a Lemon API key in API & MCP. Retrieve your account IDs with GET /v1/ad-accounts, then make a scoped read. This example uses a placeholder account and dates; substitute values returned for your account.
curl --get 'https://api.lemon-ai.com/v1/creatives/performance' \
--header "Authorization: Bearer $LEMON_API_KEY" \
--data-urlencode 'ad_network_account_id=YOUR_ACCOUNT_ID' \
--data-urlencode 'date_from=2026-10-01' \
--data-urlencode 'date_to=2026-10-07' \
--data-urlencode 'metric=impressions' \
--data-urlencode 'metric=clicks' \
--data-urlencode 'metric=cost' \
--data-urlencode 'sort_by=cost' \
--data-urlencode 'sort_order=descending' \
--data-urlencode 'limit=25'
MCP and REST expose Lemon's reporting definitions. Inspect missing fields, result limits, and any outcome metadata before interpreting a result. A limited top-creatives response is not an account total. Use the API documentation for supported fields and pagination.
Check the answer before using it
- Scope: Does the answer name the intended account, app, dates, and filters?
- Coverage: Is this the complete population or a limited set of top rows? MCP performance results are capped at 200 rows; inspect truncation and narrow the question when needed.
- Meaning: Are the currency, ratio units, attribution window, and source grain stated?
- Evidence: Are estimated, immature, missing, and non-additive outcomes identified?
- Decision: Does the proposed next test follow from the evidence, rather than treating an association as proof?
Lemon's public reporting tools are read-only. They do not change budgets, bids, targeting, or campaigns. Authorization still matters: only connect an AI app you intend to let read your reporting data, and keep keys out of prompts and shared files.
Connect your ad accounts to start with your own creative data. Reports and API explains the reporting surfaces, and Attribute Analysis shows how creative labels become comparable evidence.