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 whether the trade is worth it. We write our own copy and 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, sign in with/mcp auth contextbolt-seo, then check/mcp. - 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, and whether ChatGPT and Google AI answers name you.
- ContextBolt SEO is the server in that block. Hosted, so there is nothing to install and no key to rotate, and every answer saves itself to your SEO Board. Ahrefs-grade data, decision-useful and directional. Free for 7 days, then $35 a month.
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 uses a shared URL and a separate sign-in.
{
"mcpServers": {
"contextbolt-seo": {
"httpUrl": "https://seo.contextbolt.app/mcp"
}
}
}
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 the remote key changes from one to the next.
| 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, three spellings between them. 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, start Gemini CLI and run /mcp auth contextbolt-seo. Sign in with your ContextBolt SEO account email, enter the email code, and choose Allow connection. Then 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. The shared URL contains no secret. If your client cannot complete OAuth, the connection guide explains the personal-URL compatibility option. Keep that private URL out of Git.
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 we 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 the SEO tools are there in the terminal. Research tools, keyword research, keyword difficulty, SERP overview, domain overview, ranked keywords, and competitor keywords, each cost one credit. Backlink tools, backlink overview, referring domains, and a competitor gap finder, cost three credits each. It is $35 a month for 1,000 credits, 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, every lookup also lands on your SEO Board, one card per keyword or domain, so the research is there to compare next month rather than scrolling out of the terminal. 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.
Is it worth it?
Doing SEO inside Gemini CLI covers the research and the fixes. It does not cover everything a suite does, so here is the scope, said once. Scheduled rank tracking is a different job. Checks here run when you ask, and the Search Console connection takes a daily snapshot of your own clicks and positions. Your research collects on your SEO Board, a dashboard that fills itself, rather than in a keyword explorer you click around in, so if you think in charts the terminal will feel bare at first. 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 credit 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. Start the 7-day trial, drop the httpUrl block into settings.json, and find out without ever leaving the prompt.