You live in the terminal. Gemini CLI is open, you are three commands deep into a build, and a question surfaces mid-flow. Is anyone actually searching for the phrase you just dropped into the page title, or are you about to optimize for a keyword nobody types? The reflex used to be ugly. Break the session, alt-tab to a browser, log into a $129 dashboard, run one lookup, and lose your place by the time you get back to the prompt.
There is a cleaner path now. Gemini CLI, Google’s open-source terminal agent, speaks the Model Context Protocol, the same plug standard that lets it reach GitHub, your file system, and a database. Point it at a live SEO data source and you can ask that keyword question without leaving the terminal, get a real volume and difficulty number back in seconds, and keep the build moving.
This guide covers how to wire SEO data into Gemini CLI, the one config detail that trips almost everyone up, what you can actually ask once it is connected, and the honest limits of doing SEO this way. I build solo, I write my own copy, and I run this every day, so this is the workflow as it actually runs, not a feature list.
- Yes, you can do SEO inside Gemini CLI. It speaks MCP, so a connected SEO server returns live keyword, SERP, and competitor data right in the terminal.
- Setup is one config block. Add the server under
mcpServersin~/.gemini/settings.json, then run/mcpto confirm it loaded. - Use
httpUrl, noturl. For a remote server the key ishttpUrl. Get the key name wrong and the tools never appear. - You ask in plain language. Keyword volume, difficulty, SERP results, domain and competitor data, no dashboard. ContextBolt SEO is zero-setup at $35/month.
- The data is Ahrefs-grade, decision-useful and directional, not Ahrefs’ exact numbers. Plenty for “should I write this”.
Why do SEO inside Gemini CLI
The case is not that Gemini CLI is secretly an SEO tool. It is that the cost of asking an SEO question should be close to zero, and in a terminal workflow it usually is not.
Most builders who do their own SEO touch a thin slice of what a dashboard offers, and only now and then. You want to know if a keyword is winnable before you write the post. You want a quick read on a rival’s traffic. You want to check that the H1 you just committed matches how people actually search. None of that needs a forty-tab Ahrefs session. It needs one number, fast, without leaving the command line and losing your train of thought.
The Model Context Protocol, or MCP, is what makes this possible. It is an open standard, introduced by Anthropic in late 2024, that lets AI agents call external tools and data sources through one common interface. Gemini CLI ships with MCP support built in, so once you register a server the agent can call its tools mid-conversation. SEO data is just another source it can reach, sitting right next to the file tools and shell it already uses.
The payoff is flow. When the answer to “is this keyword soft enough to rank” is one prompt away in the window you are already staring at, you ask it. When it lives behind a login two tabs over, you guess instead, and guessing is how you ship a page tuned for a phrase nobody searches. If you want the longer argument for why asking the agent beats opening the dashboard, the SEO MCP server explainer lays out the full case.
How do you connect SEO data to Gemini CLI?
The whole setup is one JSON file. Gemini CLI reads MCP configuration from a settings.json file, either globally at ~/.gemini/settings.json or per project at .gemini/settings.json in your repo root. Servers hang off an mcpServers object. Miss that object and Gemini CLI ignores the entry entirely.
A hosted server that hands you a single remote URL is the least work. Here is the exact shape for a remote SEO server like ContextBolt SEO, which gives you one URL on signup.
{
"mcpServers": {
"contextbolt-seo": {
"httpUrl": "https://seo.contextbolt.app/mcp/YOUR_TOKEN"
}
}
}
Here is the one detail that trips almost everyone up, and it is worth reading twice. For a remote HTTP server, the key is httpUrl, not url. Gemini CLI treats url as a Server-Sent Events endpoint and command plus args as a local process to spawn. Put a streamable-HTTP address under url and the server either refuses to connect or exposes nothing, with no error that points at the real problem. The tools simply never show up. If your SEO tools are missing after a clean-looking config, this is almost always why.
This bites hardest if you hop between agents, because every one of them names the remote key differently.
| Client | Config file | Remote server key |
|---|---|---|
| Gemini CLI | ~/.gemini/settings.json | httpUrl |
| Cursor | ~/.cursor/mcp.json | url |
| Codex CLI | ~/.codex/config.toml | url |
| Windsurf | mcp_config.json | serverUrl |
| Google Antigravity | JSON settings | serverUrl |
Same idea in all of them, five different spellings. Codex is the extra trap, since its config is TOML rather than JSON, so the block looks nothing like the others even though the url key matches Cursor. If you also work in the editor, the SEO inside Cursor walkthrough uses that url form. For Gemini CLI, stay on httpUrl.
Once the file is saved, verification takes one command. Start Gemini CLI and run /mcp. It lists every connected server and the tools each one exposes, so you can confirm contextbolt-seo is live and its SEO tools loaded before you rely on them. If the server is missing from that list, recheck the key name first, then the URL.
For completeness, url is still correct if you are wiring up an SSE-style server, and command with args is how you register a local stdio server that runs on your own machine. ContextBolt SEO is a remote HTTP service, so httpUrl is the one you want. One privacy note before you move on. That URL contains your personal access token, so treat it like a password. Keep it in your global ~/.gemini/settings.json rather than a project file you might commit, or if you do keep a project config, add it to .gitignore so the token never lands in a public repo.
What can you actually ask once it’s connected?
This is where it stops being a config exercise and starts being useful. You type a question in plain English, the agent picks the tool, the data lands back in the terminal. A few of the moves I run most often.
- Keyword reality checks: “What’s the monthly search volume and difficulty for gemini cli seo?” You get a real number before you commit a single line to the page.
- Topic expansion: “Give me 20 related keywords to ‘seo mcp’ with volume and difficulty, sorted by how winnable they are for a low-authority site.” That is a content plan in one prompt, not an afternoon in a spreadsheet.
- SERP intent reads: “Who ranks in the top 10 for ‘keyword research gemini cli’ and what kind of pages are they?” Tells you whether the intent wants a tutorial, a tool, or a listicle before you pick a format.
- Competitor mining: “What keywords does this rival rank for that I don’t, and which of those are low difficulty?” The classic gap analysis, run without ever leaving the shell.
- Backlink gaps: “Which sites link to my top two competitors but not to me?” A prioritized outreach list you can start working the same afternoon.
- On-page audits: “Audit my site and show the worst pages first.” You get a graded fix-list, and because Gemini CLI writes to disk, you can say fix the top three and re-audit from the same terminal.
The thread through all of these is plain language and chaining. You are not memorizing a tool’s menu or recalling which report hides where. You ask the way you would ask a colleague, then follow up. Pull the SERP, then check the top result’s domain authority, then find its backlink gaps, all in one flowing conversation. The agent translates each step into the right lookup and holds the context, so the third question builds on the answer to the first.
Where ContextBolt SEO fits
ContextBolt SEO is the one I build, and it exists for exactly this workflow. It is a hosted MCP server that wraps Ahrefs-grade data behind a single httpUrl. You paste that URL into your ~/.gemini/settings.json, run /mcp to confirm, and you have nine tools in the terminal. Six research tools, keyword research, keyword difficulty, SERP overview, domain overview, ranked keywords, and competitor keywords, each costing one lookup. Three backlink tools, backlink overview, referring domains, and a competitor gap finder, at three lookups each. It is $35 a month for 1,000 lookups, and the free Google Search Console tools plus automatic cross-session memory do not spend any of them.
Two things make it fit Gemini CLI specifically rather than just any MCP client. First, every tool returns a digested answer with a verdict line, not a wall of raw JSON, so the terminal stays readable while you work. Second, Gemini CLI can write to disk, so every lookup also mirrors to a ./seo-findings/ folder in your project as markdown, one clean file per keyword or domain, plus an INDEX. Your research lives in the repo next to the feature it informed. You can grep it from the same terminal, commit it to git, diff it next month, or open the folder in Obsidian. Ask about the same keyword a week later and the answer leads with what changed since you last looked, because the memory layer carries across sessions with no extra prompt.
One more move is worth knowing, and it only works because Gemini CLI can edit your files. Say “audit my site” and ContextBolt SEO grades the mechanical health of your pages against a strict ruleset, title and meta lengths, a single H1, thin content, broken links, canonical tags, then hands back its own 0-100 score with a fix-list worst first. Because Gemini CLI writes to disk, you say “fix the top three” and it edits the actual pages in the same session, then re-audits and leads with the delta, health 80 to 91. Ahrefs reports the problems. ContextBolt hands them to the thing that can fix them. Find it, then fix it.
The honest framing the product holds to applies here too. This is Ahrefs-grade data, not the same numbers as Ahrefs. It sits on DataForSEO estimates, which are decision-useful and directionally accurate, the same class of data feeding many dashboards you already trust. For deciding what to build and what to write, that is more than enough. The Gemini CLI setup page has the exact steps, and the ContextBolt SEO guide walks through every tool.
The honest limits
Doing SEO inside Gemini CLI is not a drop-in replacement for everything a suite does, and pretending otherwise would be the kind of overclaim this blog tries to avoid.
You do not get a visual dashboard. If you think in charts and like clicking around a keyword explorer, the terminal will feel bare at first. You do not get scheduled rank tracking. An MCP server answers when you ask, it does not watch your positions every day and email you when one moves. If daily rank monitoring is core to your job, keep a tool that does it. And the agent can be confidently wrong about strategy even when the underlying numbers are right, so treat its SEO advice the way you treat its code, fast, useful, and in need of a human check before it ships.
There is a usage shape to respect, too. A metered server has a monthly lookup budget, so you spend it on real questions, not idle curiosity. In practice that is a feature, because it nudges you toward the lookups that actually change a decision. But it is worth knowing going in.
What you gain in return is the thing that matters most when you build solo and time is the scarce resource. The answer arrives in the window you already live in, in the seconds you would otherwise burn context switching, at a price that does not make you wince. For most builders doing their own SEO from the terminal, that trade is an easy yes. The keyword you were nervous about might be wide open, and now you can find out without ever leaving the prompt.