How I Built a Performance Marketing Agent Using AppsFlyer MCP in 10 Minutes
If you manage mobile marketing campaigns, you know the morning routine. Open your MMP. Check each channel. Eyeball the numbers. Copy them into a spreadsheet. Figure out what went up, what went down, what you need to act on today.
It is tedious. It is manual. And the worst part is that by the time you spot a problem, money has already been wasted. A channel went dark three days ago and nobody caught it. A campaign scaled into a bad audience over the weekend. You only find out when the weekly report lands.
This is manageable when you have one app. Now multiply it across multiple apps, multiple channels, multiple platforms. Every single morning. It does not scale.
I wanted a better way. So I built one.
Reading the demo: the “losing money” labels in the original walkthrough compare cost with revenue observed so far. A seven-day report does not establish lifetime profitability. Validate the cohort, revenue window, refunds and costs before acting on a recommendation. The reusable template below makes that distinction explicit.
What I Built
I now type four words into my terminal: “Run my performance check.” In this demonstration, it returned a prioritized report with ROAS by channel, observed revenue shortfalls and budget suggestions from the connected AppsFlyer data. Those shortfalls need the cohort and payback checks below before they justify a budget change.
In this demonstration, I queried the connected AppsFlyer account through Claude Code and used written instructions to request the analysis. The MCP connection and permissions still need to be configured, and the results need human validation before budget changes.
The tool is called Claude Code, made by Anthropic. The connection to AppsFlyer is through their official MCP (Model Context Protocol). And the whole thing took me about 10 minutes to set up.
Let me show you how.
Setting It Up: Three Steps
You need Claude Code installed and authenticated, access to the intended AppsFlyer account, and permission to connect that data. The ten-minute setup described here is my demonstration, not a guaranteed setup time.
If you are not a technical person, the terminal might look unfamiliar. That is completely fine. You are going to copy and paste a few commands. If you can do that, you can do this
Current setup, checked 29 October 2026: AppsFlyer documents bearer-token authentication for Claude Code. In AppsFlyer, create an MCP token under Account menu > Security Center > AppsFlyer Tokens, following its official Claude Code instructions. This account-level credential inherits its creator’s permissions. Use it only in the authorized account and keep it out of shared files, commits and screenshots.
With Claude Code already installed and authenticated, create a local project folder and add the server. Replace the placeholder locally with your token; do not paste a real token into a public example:
mkdir -p my-appsflyer-agent
cd my-appsflyer-agent
claude mcp add-json appsflyer '{"type":"http","url":"https://mcp.appsflyer.com/auth/mcp","headers":{"Authorization":"Bearer YOUR_APPSFLYER_MCP_TOKEN"}}'
claude . Run claude mcp list to confirm that appsflyer is configured, then ask it to list your apps and check that the returned account and app are the intended ones. A listed server alone does not prove its queries succeed. Typing /mcp alone does not add the server.
These steps describe the setup in this demonstration. Your own setup may take longer and requires an AppsFlyer token, Claude Code authentication, permission to access the account and a successful connection check.
Asking Questions in Plain English
This is where it gets interesting. You do not need to write code. You do not need to build reports. You do not need to wrangle spreadsheets. You just ask.
I started simple:
Show me my apps
Claude found 74 apps in the demo account that AppsFlyer provided. It listed them with their platforms and status. Good. Now something more useful:
Give me spend for the last 7 days for each channel for my gaming app
Behind the scenes, Claude writes API queries and sends them to AppsFlyer through the MCP. A few seconds later, I had a full channel breakdown. Spend on iOS, spend on Android, broken out by media source. No export, no pivot table.
I kept going:
Give me revenue per install for each channel so I can measure efficiency
Revenue, installs, eCPI, revenue per install, all laid out by channel. This is the kind of analysis that normally requires an analyst pulling data into a spreadsheet. Here it took seconds.
Then I asked the question that matters:
Show me ROAS by channel and tell me which channels I should increase spend on and which ones I should decrease
ROAS by channel and platform. Increase spend recommendations. Maintain spend. Decrease spend. This is what a typical UA manager does on a daily basis, surfaced through conversational inputs in seconds.
From Questions to Intelligence
Simple queries are useful. But the real power is building an agent that applies your rules to your data automatically.
I did this with a file called CLAUDE.md. It lives in your project folder. It contains instructions that Claude Code reads every time it starts. Think of it as teaching your assistant how you want things done.
The instructions are written in plain English. Not code. Not SQL. English.
Here is what mine looks like:
When I ask for a performance check:
1. Pull last 7 days from AppsFlyer for all my apps
2. For each paid channel, calculate ROAS (revenue / cost) and cost per install
3. Flag paid channels that have the lowest ROAS
4. Rank all channels by revenue per install, best to worst
5. Compare paid vs organic: what share of installs and revenue comes from organic?
6. If cost per install exceeds revenue per install, flag it as BELOW OBSERVED-PERIOD REVENUE BREAK-EVEN, not proven unprofitable
7. Compare mature cohorts on the same revenue horizon and attribution settings; propose channels to investigate before changing budgets
8. End with a budget reallocation suggestion for human review, stating cohort age, missing data and the payback horizon
Eight rules. Plain English. I saved the file and typed:
Run my performance check
Four words. Claude read my rules and returned ROAS, revenue-per-install rankings and channels whose observed revenue was below spend. The report proposed budget changes for review. These were investigation leads, not proof of lifetime losses or recommendations to execute automatically.
This is not a dashboard. This is an agent that thinks the way I think.
Making It Smarter
Here is the fun part. Making the agent smarter is just adding a sentence.
I added one line to my CLAUDE.md:
Compare performance of iOS versus Android
Saved. Ran my performance check again. The report now included a full iOS versus Android comparison. One sentence, one new capability.
You can keep adding rules. Flag any channel where spend changed more than 30% week over week. Warn if a channel is new this week. Show week-over-week trends for the top channels by spend. Each rule is one line of English. Your agent gets smarter and you write zero code.
The Difference
Before: Open the dashboard. Check each channel. Copy numbers into a spreadsheet. Build a pivot table. Try to spot what changed. Thirty minutes on a good day. And you still might miss something.
After: In my demonstration, a short request returned a prioritized report with channel rankings, observed revenue shortfalls and budget suggestions in about thirty seconds. Check the source totals and cohort maturity before using it.
The CLAUDE.md template and all the commands I used are below. Try it with your own apps. Write your own rules. Make them smarter. Let me know what you build.
CLAUDE.md Template
Copy this into a file called CLAUDE.md in your project folder. Customize the rules to match your own analysis needs.
When I ask for a performance check:
1. Pull last 7 days from AppsFlyer for all my apps
2. For each paid channel, calculate ROAS (revenue / cost) and cost per install
3. Flag paid channels that have the lowest ROAS
4. Rank all channels by revenue per install, best to worst
5. Compare paid vs organic: what share of installs and revenue comes from organic?
6. If cost per install exceeds revenue per install, flag it as BELOW OBSERVED-PERIOD REVENUE BREAK-EVEN, not proven unprofitable
7. Compare mature cohorts on the same revenue horizon and attribution settings; propose channels to investigate before changing budgets
8. End with a budget reallocation suggestion for human review, stating cohort age, missing data and the payback horizon
Want to make it smarter? Add more rules. Examples:
9. Compare performance of iOS versus Android
10. Flag any channel where spend changed more than 30% week over week
11. If a channel is new this week (not present last week), highlight it
12. Show week-over-week trend for the top 3 channels by spend
Command Cheat Sheet
The video records the original demonstration. Use the current setup commands above for today’s connection, then try the queries below. Response times and available data depend on your account, permissions and integration.
Follow the current AppsFlyer setup instructions above, then run claude mcp list to verify the configured server.
Example Queries to Try
Show me my apps
Give me spend for the last 7 days for each channel for [App Name]
Give me revenue per install for each channel so I can measure efficiency
Show me ROAS by channel and tell me which channels to increase and decrease spend on
Run my performance check
Set Up Your CLAUDE.md
Create a file called CLAUDE.md in the my-appsflyer-agent folder. Paste the template from above. Save, then type “Run my performance check” in Claude Code.
Start Building Today
The barrier to building this kind of agent used to be technical skill. It isn’t anymore. If you can paste a command into a terminal and write a sentence in plain English, you can build your own AppsFlyer analyst today. Not next quarter when a project ships. Not after an engineering ticket clears. Today.
My setup in this demonstration took under ten minutes. Your setup time will depend on access, authentication and account configuration. Adding instructions can change the analysis requested; it does not verify the data or guarantee a more accurate report.
Try it with your own apps. Write rules that match how you actually think about performance. Let the agent do the morning grind you’ve been doing by hand.
Resources to Get You Started
- AppsFlyer AI Agents on GitHub — reference implementations and examples for building agents on top of AppsFlyer
- AppsFlyer’s guide to building your first agent — step-by-step walkthrough from AppsFlyer to help you hit the ground running
Published