Google Ads in Codex.
Adwarp is an open-source MCP server and CLI that connects the Codex CLI to Google Ads. Add it with 1 command from your terminal, then ask Codex to research keywords, build paused Search campaigns and pull reports.
$ codex mcp add adwarp -- npx -y adwarp mcp$ codex
> Create the Search campaign in google-brief.json, paused.
adwarp.gads_launch_search_campaign dry run: valid
adwarp.gads_launch_search_campaign apply: PAUSED
Adwarp can't switch it on. Enable it in Google Ads when you're ready.
01Set up
Set up in 3 steps.
Get Google Ads API access
A developer token from your Google Ads manager account, plus a Desktop app OAuth client in Google Cloud.
Sign in from your terminal
Add both to ~/.adwarp/google.json, and Adwarp opens your browser for Google's approval.
npx -y adwarp google auth loginAdd it to Codex
1 command, and Codex can use all 9 Google Ads tools on your machine.
codex mcp add adwarp -- npx -y adwarp mcp
02Try these prompts
5 prompts to try first.
$ codex
> How much search demand is there for sales forecasting software in the UK?
adwarp.gads_keyword_ideas "sales forecasting software", GB: 50 ideas
Monthly searches, competition and top-of-page bid range for each
03Results
Why running Google Ads from Codex gets better results.
Briefs live in your repo
The campaign brief sits next to your code, so the next test reuses it with 1 change.
Every write checked first
Google validates the whole build in a dry run before anything is created.
Waste gets caught early
Search terms and keyword costs are 1 question away, so you check them weekly instead of at month end.
Does Adwarp work with OpenAI Codex for Google Ads?
Yes. Add it to the Codex CLI with codex mcp add, and Codex gets all 9 Google Ads tools, running on your machine.
Can Codex enable a campaign?
No. Adwarp creates Google campaigns paused and has no way to enable them. You switch them on in Google Ads.
Is there an official Google Ads MCP server?
Yes, and it's read-only. Adwarp is independent and open source, and it also researches keywords and builds paused Search campaigns.
Does it work with the hosted endpoint?
Not for Google Ads. The hosted endpoint serves many callers, and Google credentials there would come from shared server settings, so it never registers the Google tools. Run Adwarp on your machine with your own developer token and OAuth client.
What access do I need?
A Google Ads developer token from a manager account and a Desktop app OAuth client. Campaigns and reporting work on Explorer access, and keyword research needs Basic access.
- A developer token from the API Center of a Google Ads manager account. A plain client account can't issue one.
- Explorer access arrives automatically and covers campaigns and reporting. Keyword research needs Basic access, a separate application on the same screen.
- An OAuth client of the Desktop app type, in a Google Cloud project with the Google Ads API enabled.
- A consent screen that isn't left in Testing, which issues sign-ins that stop working after 7 days.
What goes in google.json?
Your OAuth client, developer token and account ids, kept on your machine.
loginCustomerId is your manager account, needed only when you reach the ad account through one. Then run npx -y adwarp google auth login.
{
"clientId": "....apps.googleusercontent.com",
"clientSecret": "...",
"developerToken": "...",
"loginCustomerId": "1234567890",
"defaultCustomerId": "0987654321",
"defaultConversionActionNames": ["Demo Booked"]
}Which Google Ads tools does it add?
9 tools, all running on your machine.
| Tool | What it does |
|---|---|
gads_ | Every Google Ads customer your login can reach. Run it first to prove the setup works. |
gads_ | The client accounts under a manager account. |
gads_ | Search volume, competition and top-of-page bid range for seed terms or a landing page. |
gads_ | Campaigns with their ad groups, paused ones included. |
gads_list_ads | The ads in an ad group, with their responsive search copy. |
gads_ | Conversion actions on the account, so a launch can name 1. |
gads_ | A paused Search campaign from a brief, in 1 atomic change, validated by Google first. |
gads_performance | Rows at campaign, ad group, ad, keyword or search term level. |
gads_search | A raw, read-only GAQL query. |
Which house rules does every campaign follow?
Search network only, people in your target area, manual CPC to start, and created paused.
- Search network only. Display expansion and search partners are off.
- People physically in your target area. US means people in the US, not anyone who searched about it.
- Manual CPC to start. Switch to smart bidding in Google Ads once there's conversion data.
- Created paused, with no tool to enable it. You switch it on in Google Ads.
- Search campaigns only for now. No Performance Max, Display, Shopping, video or Customer Match yet.