Last Updated on June 11, 2026

You wasted hours this week on work Gemini could have done for you.

Recently, I gave a 7-minute lightning talk on that idea at Google Search Central Live Sydney 2026. The talk was a teaser — enough to show what’s possible, not enough to actually get you set up.

This guide is the full version: the exact commands, real examples, and the stuff that I couldn’t fit on my slides.



Why I’m telling you this

When I’m not presenting at Google events I’m the SEO Lead at Airtasker, Australia’s leading local services marketplace. There I manage multiple sites, hundreds of thousands of pages across six global markets. Like many SEO on large sites I’ve spent countless hours scrolling through spreadsheets with 10,000s of rows at 3am looking for patterns after a core update screaming Why Google? Why? 😂

The first time I heard someone say “just let AI do it” I found the idea jarring. I remember thinking to myself “yeah sure mate”. The pitch sounded like every other automation promise that never quite worked. But once I actually spent time with tools like Gemini CLI — properly, not just opening it once and giving up — I genuinely can’t do my job without them now.

That’s the version I’d want someone to give me if I were starting today. Skip the hype, skip the chatbot demos, get straight to the stuff that’s actually changed how I work.

Why coding agents are the new SEO stack

For the last couple of years, most of the AI conversation in SEO has been about chat interfaces. Type a question, get an answer. Useful for some things, genuinely limited for others.

As it stands Gemini has probably the best brain on the market right now, especially for anything touching Google products. But the Gemini chat interface is just a brain in a jar. It can think about your problem. It can’t actually do anything about it. The CLI is where it gets hands.

The Gemini chat app can’t access your Search Console data; it just asks you to export and paste the data manually
The Gemini chat app can’t access your Search Console data; it just asks you to export and paste the data manually

Coding agents are different. They’re not chatbots with a nicer interface; they’re agents that can use your file system, run shell commands, connect to external services, and act on your behalf. You give them a goal, and they figure out the steps.

Gemini CLI’s built-in tool list — shell, file read/write, web search, and more, available before any MCPs are added
Gemini CLI’s built-in tool list — shell, file read/write, web search, and more, available before any MCPs are added

If you’ve heard of Claude Code, OpenAI Codex, or Cursor, you’re in the same territory. These tools have changed how developers work. Gemini CLI is Google’s entry into that space, and for SEO specifically, it’s worth paying attention to.

Here’s why SEO is a natural fit: our work has always involved touching a lot of systems. Search Console, Analytics, Ahrefs, Semrush, spreadsheets, CMS, and internal tools. An agent that can reach all of those, reason across them, and take action without you manually copying data between tabs is genuinely useful in a way that a chat window isn’t.

The wrong unlock

Most of the AI-for-SEO discourse has been about generating content. Spin up a thousand pages, scale your output, watch the traffic roll in. We’ve all seen how that ends — commodity content, no real experience behind it, no E-E-A-T, no value.

IMO, content is exactly where you, as a human, add the most value. It’s the part you shouldn’t be outsourcing.

The real unlock is the other half of your week. Sifting through tens of thousands of rows of GSC data and matching keywords across five tools. Running the same Monday-morning audit you’ve run every Monday for the last two years. That’s where AI earns its keep — the tedious, repeatable, mundane work. Save your brain for the things that actually need it.

In this post, I’m going to dive into six stages of working with Gemini CLI or any coding agent, really. But first, let’s get Gemini set up.

Getting started

Install is straightforward.

If you’re on Mac with Homebrew:

Or via npm:

Then just run:

For auth, the easiest path is signing in with your personal Google account; this gives you access to a generous free tier (1,000 requests per user per day). If you’d rather use an API key, grab one from Google AI Studio and set it as an environment variable:

Either way, you’re up and running in a couple of minutes. No complex setup, no local model downloads.

The six stages, and why this order

Each stage builds on the one before it. Context sharpens the built-in tools. MCPs add live data that those tools can act on. The extensions package wraps entire workflows. Plan Mode orchestrates everything you’ve installed. Skills make any plan you’ve nailed repeatable.

You can use Gemini CLI without going past Stage 2 and still get value. But the compounding effect is the point — the further you go, the less you have to set up next time.

Stage 1: Context (GEMINI.md)

Tell Gemini who you are.

The first thing to do before you run any actual SEO work is to set up your context files.

Gemini CLI uses GEMINI.md files to load context automatically at the start of every session. There’s a global one at ~/.gemini/GEMINI.md that applies everywhere, and you can add a project-level one inside any folder you’re working in. Both load without you having to ask.

The mental model that works best: think of GEMINI.md as a shortcut list, not documentation. You’re not trying to explain everything; you’re trying to save the agent from asking the same questions over and over.

Here’s a starter GEMINI.md you can copy and adapt:

What to put in yours

A few things that make a real difference:

  • Your role and goal: Something simple like “I’m an SEO consultant. I work across multiple client sites. Default to Australian English.” This stops you from repeating it every session and makes a big difference to the context of the responses you’ll get.
  • Property IDs and site identifiers: If you’re working on a specific project, put the GSC site URL, GA property ID, and any other relevant identifiers directly in the project-level GEMINI.md. Every time the agent has to go and figure out which property is the right one, that’s MCP calls and tokens you’re burning. Pre-loading this stuff cuts down on unnecessary back-and-forth.
  • Site structure references: If your site has a specific URL structure or folder convention that matters for audits, note it (e.g. /service/{type}/{location}). The agent doesn’t need to explore and infer it every session.
  • Shortcuts for your tools. This is one that saves me so much frustration by stopping the agent from going down some delusional path. In my GEMINI.md I have something like: “When I refer to ‘the attached Sheet’ or ‘the Spreadsheet’, use Google Workspace tools.” This means I don’t have to spell out which tools to reach for every time.

The key discipline is keeping it short, as this file is loaded with each chat interaction. A bloated GEMINI.md that tries to document everything just adds noise. Short, specific, actionable.

Stage 2: Tools

Stop updating spreadsheets manually.

Out of the box, before you add any MCPs or extensions, Gemini CLI has a solid set of built-in tools:

  • Read and write files on your local system
  • Run shell commands
  • Fetch web pages
  • Google Search

That’s enough to do real work. Here’s a practical example: a content audit.

Export a CSV from Search Console (pages, clicks, impressions, and position changes for the last 90 days). Drop it in your working directory. Then:

Gemini reads every row, makes a call based on the data, and writes the output file. What used to take a few hours of manual work runs in the background while you’re doing something else.

The file tool, in particular, changes a lot. Once you stop copying and pasting between tools and let the agent read and write directly, a whole category of tedious work just disappears.

Stage 2 — Gemini classifying a GSC CSV row by row and writing the output file
GSC CSV fed to Gemini, classified as keep/improve/remove, output file written to disk

Stage 3: MCP

Close all your tabs.

MCP (Model Context Protocol) is how Gemini connects to external services:** your SEO tools, analytics platforms, and data sources. Instead of exporting a CSV and importing it somewhere else, you can query these tools directly.

To add an MCP server:

It’ll walk you through the config. For SEO work, the useful ones are:

Setting up the Ahrefs MCP

One thing that catches people out with the Ahrefs MCP specifically: gemini mcp add sets up the connection config, but doesn’t handle auth for you. Ahrefs uses API key authentication, so you need to generate an API key and add it manually.

To get your key: log into AhrefsAccountAPI → generate a key.

Setting up the Ahrefs MCP

One thing that catches people out with the Ahrefs MCP specifically: gemini mcp add sets up the connection config, but doesn’t handle auth for you. Ahrefs uses API key authentication, so you need to generate an API key and add it manually.

Generate an API key for Ahrefs
To get your key: log into AhrefsAccountAPI → generate a key.

Then open ~/.gemini/settings.json and add the key as an Authorization header:

Replace YOUR_AHREFS_API_KEY with the key you just generated. Save the file and restart your Gemini session. It’ll pick up the auth on next launch.

Setting up the Semrush MCP

If you’re a Semrush user instead of (or as well as) Ahrefs, the setup is almost identical: same HTTP transport, just a different URL and a different auth header prefix.

Grab your API key from your Semrush profile, then run:

Or, if you prefer to edit ~/.gemini/settings.json directly:

Note the Apikey prefix — Ahrefs uses Bearer, Semrush uses Apikey. Otherwise, the shape is the same.

The Semrush MCP exposes the Trends API, the SEO API, and the read-only Project API methods.

Heads up: requests consume API units, so the same “wrap it in a skill” advice applies here, too.

Setting up the GSC MCP

The community GSC server from AminForou is the one worth using. It queries the Search Console API directly — performance data, URL inspection, sitemaps, all of it.

The recommended install is via uvx — no cloning, no virtual environments, no Python setup.

First, you’ll need credentials from Google Cloud Console:

  1. Go to console.cloud.google.com and create (or pick) a project
  2. Enable the Search Console API
  3. Go to Credentials → Create Credentials → OAuth client ID → Desktop app → download the JSON and save it somewhere permanent (e.g. ~/Documents/client_secrets.json)

If you don’t have uv installed:

Then add it to ~/.gemini/settings.json:

Replace /Users/yourname with your actual home directory (echo $HOME will tell you). Use the full path — not ~/ — as Gemini CLI won’t expand it. First run opens a browser for the OAuth flow; after that it’s silent.

Setting up the Google Analytics MCP

The official Google Analytics MCP server uses application default credentials — the same auth method as gcloud. The MCP needs the analytics read-only scope, so even if you’ve run gcloud auth application-default login before, you’ll likely need to re-run it with the right scopes:

You’ll also need to enable the Google Analytics Admin API and Google Analytics Data API in your Google Cloud project.

The MCP runs via pipx, so make sure that’s installed (brew install pipx).

Add it to ~/.gemini/settings.json:

One thing that trips people up: GOOGLE_CLOUD_PROJECT is your Google Cloud project ID, not your GA4 property ID. They’re different things. Your GA property ID belongs in GEMINI.md as context so the agent knows which property to default to — not in the MCP config.

The server key (analytics-mcp in the example above) is what shows up when you run /mcp in Gemini CLI. If you’d rather call it google-analytics to match the others, rename the key — it’s purely a label.

Setting up the DataForSEO MCP

DataForSEO covers keyword data, SERP results, competitor pages, and backlinks. It’s what I use for the enrichment step in the content audit skill above — pulling search volume and difficulty for stuck pages, and fetching top competitor URLs for keyword gap analysis.

The MCP server runs via npx, so there’s nothing to install separately. Add it to ~/.gemini/settings.json:

Auth is the username and password from your DataForSEO account. Get them at app.dataforseo.com/api-access. Unlike the other MCPs above, there’s no OAuth flow. It just works once you drop in the credentials.

The DATAFORSEO_SIMPLE_FILTER flag is recommended in DataForSEO’s official Gemini CLI guide — it switches to a simpler filter syntax that LLMs construct correctly more often.

Worth noting: DataForSEO charges per API call. The MCP exposes a lot of endpoints, and a verbose agent can rack up calls quickly in a long session. The same advice applies here as for any MCP — wrap workflows in skills with explicit steps so the agent isn’t making speculative calls trying to figure out what you want.

Once they’re added, you query in plain English. No export, no spreadsheet, no tab-switching:ettings.json:

Auth is username and password from your DataForSEO account. Get them at app.dataforseo.com/api-access. Unlike the other MCPs above, there’s no OAuth flow — it just works once you drop in the credentials.

Worth noting: DataForSEO charges per API call. The MCP exposes a lot of endpoints, and a verbose agent can rack up calls quickly in a long session. The same advice applies here as for any MCP — wrap workflows in skills with explicit steps so the agent isn’t making speculative calls trying to figure out what you want.

Once they’re added, you query in plain English. No export, no spreadsheet, no tab-switching:

Stage 3 — Querying the Ahrefs MCP for stuck-position keywords on a public site
Plain English query for stuck-position keywords on backlinko.com, table results live, no export

The thing nobody tells you about MCPs

Every call to an MCP uses tokens. Every back-and-forth exchange adds to your context window. In a long session with multiple MCP queries, this adds up fast.

Where CLI tools are available as an alternative, they’re worth using; they tend to be more efficient and don’t incur the same context cost. The Google Workspace CLI, for example, is worth looking at instead of the individual Google MCPs.

More importantly: MCPs work much better when you wrap them in skills. A bare MCP call is fine for one-off queries, but the agent doesn’t inherently know which database, which property, or which filter makes sense for your workflow. That’s where a lot of “the MCP isn’t working properly” frustration comes from; the agent is doing too much guessing.

When you define a skill that uses an MCP (more on skills below) and pre-load the relevant IDs in GEMINI.md, the agent stops guessing and starts just doing the right thing.

I’m planning a separate post with a full breakdown of MCPs for SEO — which ones are worth adding, how to configure them, and the ones I use regularly. Will link it here when it’s live.

Stage 4: Extensions

Stop the copy and paste.

Extensions go further than MCPs. They bundle prompts, commands, MCPs, hooks, and pre-built skills into a single installable package. You’re not just getting a tool; you’re getting the instructions on how to use it.

The flagship one for SEO work is the Google Workspace extension:

This gives you direct access to Sheets, Docs, and Slides, plus a large set of pre-built skills. I don’t use all of them, but the ones I use regularly are the ones that close the loop between analysis and output. Clustering keyword data by topic and pushing it directly to a Sheet, for example. Or pulling a content brief into a Doc without manually copying anything.

The same GEMINI.md shortcut principle applies here. I have an entry that says something like: “When I mention ‘the attached Sheet’ or ‘the Doc’, use Google Workspace tools.” The agent then knows what to reach for without me having to specify the tool every time.

Worth exploring: there are other extensions beyond Google Workspace that are useful for SEO workflows. Browse the full catalogue at geminicli.com/extensions. The same wrapping-with-skills approach applies to all of them.

Workspace extension clustering keywords and pushing them to a Google Sheet

Stage 5: Plan Mode

Do tasks in the background.

Plan Mode is where it all comes together. You describe what you want — the goal, the tools to use, what the output should look like — and Gemini drafts a step-by-step plan. You review it, adjust it, approve it, and the agent executes autonomously. It’s also the most underused feature in the CLI.

To enter it, type /plan in the CLI or hit Shift+Tab.

Most people skip Plan Mode for anything that feels small. That’s a huge mistake.

Here’s what happens when you skip it: the agent works on assumptions. It half-infers what you mean from the session context, fills in the gaps with guesses, and starts executing. When something goes wrong, and it will, you’re already three steps into a workflow built on a shaky foundation.

Plan Mode forces the agent to gather context before committing to anything. For SEO tasks that touch multiple data sources, that upfront context gathering is the difference between a clean run and having to start over.

A few things that consistently produce better plans:

  • Give it links to specific files and websites to use: “Use the file at ./gsc-export.csv and the Ahrefs MCP for keyword data.” The more specific you are about inputs, the less it invents.
  • Tell it explicitly not to invent anything: “If you’re unsure about a value, come back and ask rather than assuming.”
  • Tell it what to clarify before acting: “Before you start, confirm the output format with me.”
  • Tell it what not to do: “Don’t write to any file without showing me the output first.”

When the plan starts going in the wrong direction, correct it immediately. If you let the agent continue down a false assumption, the plan compounds the error; every subsequent step builds on something that’s wrong.

Iterate on the plan until you’re genuinely happy with it. Yes, this takes longer upfront. That’s the point. The time you spend getting the plan right is time you don’t spend cleaning up a bad execution.

One more thing: if you find yourself running the same plan repeatedly, that’s your signal. That plan should become a skill.

Plan Mode drafting a four-MCP content audit plan
Plan Mode drafting a four-MCP content audit plan

Stage 6: Agent Skills

Do it whenever you like.

Skills are reusable, self-contained packages of instructions. The practical workflow: you spend time in Plan Mode getting something right — a content audit, a keyword gap analysis, a technical crawl summary. Once you’ve done it properly a couple of times, save it as a skill.

Next month, you have two ways to fire it. You can call it explicitly with a slash command:

Or you can just describe what you want — Gemini reads the description on every saved skill and activates the matching one automatically. So “let’s audit the AU market for stuck pages” works too, even without the slash.

Either way, same structure, same thresholds, same output format, no re-explaining.

What makes a skill worth creating:

  • Anything you’ve run more than twice
  • Anything that requires specific context (property IDs, site structure, output format preferences)
  • Any multi-step workflow that took real effort to get right in Plan Mode

Skills are how you compound the time you’ve already invested. Each one you save is a plan you never have to write again.

What a skill actually looks like

A skill is a directory, not a single file. The minimum is one SKILL.md inside a folder named after the skill. You can also bundle scripts, references, or assets alongside it — they’re all available to the agent when the skill activates.

The SKILL.md itself uses YAML frontmatter with two fields. The name matches the directory name. The description is doing real work — Gemini reads it to decide whether to activate the skill from natural language. Be specific about the trigger phrases.

Here’s the example content-audit skill I used in the slides:

A few things to notice. The skill names the four MCPs by handle (gsc, google-analytics, dataforseo, ahrefs) so Gemini knows exactly which server to call at each step. The Don'ts section guards against the obvious failure modes — anything that writes data, guesses values, or silently broadens the criteria. And the description is loaded with trigger phrases (“content audit”, “striking distance”, “quick wins”, “find stuck pages”) so the skill activates from a natural request, not a special command.

This skill came directly out of Plan Mode. I drafted the plan, iterated until the thresholds felt right for the data I was working with, and saved the result. That’s the workflow: Plan Mode is the design surface, the skill is the saved version of a plan that worked.

For the full reference on creating skills — directory structure, advanced features like bundled scripts and references, and the underlying Agent Skills standard — see the Gemini CLI creating skills guide.

The saved SKILL.md open in vim, then a fresh session firing the skill via /content-audit and pulling data from Search Console
The saved SKILL.md open in vim, then a fresh session firing the skill via /content-audit and pulling data from Search Console

How my workflow has actually changed

How my workflow has actually changed

I’ve been using coding agents — not just Gemini CLI, but also Claude Code and Codex — as a core part of how I work for a while now. So here’s what’s actually different in my day-to-day.

The biggest shift is delegation. I’m continuously sending agents off to research, investigate, and analyse in the background while I focus on other things. A keyword gap analysis, a crawl summary, a competitor content audit — these used to require me to sit in front of a spreadsheet for an hour. Now I launch the workflow and come back to the results.

The other shift is moving from reactive to proactive. I used to investigate when something looked wrong. Now I’ve set up regular hygiene workflows that surface insights on a schedule. The insights come to me. I’m not chasing problems; I’m getting a consistent read on what’s happening and deciding what warrants attention.

What it replaced: a lot of copy-paste hacks, custom scripts, and automation tools I’d built over the years that did specific things in a janky way. The kinds of things that worked until they didn’t, that required maintenance, and that were always slightly brittle. Most of that is just gone now. Running things as a terminal workflow is more reliable and easier to iterate on.

The honest version: there’s still a learning curve. Getting good at Plan Mode takes practice. Writing useful GEMINI.md files takes iteration. The first few times you use an MCP, it probably won’t do exactly what you want. But the compounding effect of building good skills and context files means it gets faster over time, not slower.

Just give it to Gemini

Next time you’re trawling through thousands of rows in a spreadsheet, just give it to Gemini.

That’s it. The rest is just learning the surface area.

Resources

Everything referenced in this post:

Regan McGregor

Regan McGregor is an experienced B2B and SaaS growth marketer based in Sydney, Australia. He's passionate about SEO, PPC, and Content Marketing. He loves to build things, solve problems and share his learnings with others.

Leave a Reply