How do I use Gemini CLI for SEO and to show up in AI answers?
Use Gemini CLI as the hands, not the judge: write your page rules in GEMINI.md, connect an MCP server with httpUrl in .gemini/settings.json for live data and checks, and confirm each page on the published site before calling it done. Since June 18, 2026, many personal Google accounts use Antigravity CLI instead, so check which one your login runs first.
Facts
- Gemini CLI connects to MCP servers in 3 ways: command for stdio, url for SSE and httpUrl for Streamable HTTP. (Gemini CLI docs: MCP servers with Gemini CLI)
- gemini mcp add --transport http <name> <url> adds a remote server to the project settings by default, and /mcp auth signs in to servers that use OAuth 2.0. (Gemini CLI docs: MCP servers with Gemini CLI)
- Project settings in .gemini/settings.json override user settings in ~/.gemini/settings.json, as of 2026-10-13. (Gemini CLI docs: Configuration (settings.json))
- Gemini CLI sends the GEMINI.md files it finds, in ~/.gemini and in the workspace and its parent folders, with every prompt. (Gemini CLI docs: Provide context with GEMINI.md files)
- On June 18, 2026, Gemini CLI stopped serving Google AI Pro and Ultra and the free Gemini Code Assist for individuals tier; it stays available with paid Gemini API keys and Code Assist Standard or Enterprise. (Google Developers Blog: Transitioning Gemini CLI to Antigravity CLI (May 19, 2026))
- Antigravity CLI reads existing GEMINI.md files unchanged, and remote MCP servers move to mcp_config.json with url or httpUrl renamed to serverUrl, as of 2026-10-13. (Google Antigravity docs: Migrating from Gemini CLI)
Can I still use Gemini CLI in 2026?
Yes, if you sign in with a paid Gemini API key or a Gemini Code Assist Standard or Enterprise license; other personal plans moved to Antigravity CLI on June 18, 2026.
| How you sign in | What runs since June 18, 2026 |
|---|---|
| Paid Gemini API key | Gemini CLI |
| Gemini Code Assist Standard or Enterprise | Gemini CLI |
| Google AI Pro or Ultra | Antigravity CLI |
| Free Gemini Code Assist for individuals | Antigravity CLI |
Where do I put SEO rules for Gemini CLI?
Put them in GEMINI.md at the root of the site's repository; Gemini CLI sends it with every prompt, and /memory show displays what it loaded. If other coding agents share the repository, add AGENTS.md to context.fileName so one file serves all of them.
# GEMINI.md (project root) ## Rules for new content pages - One H1 per page, phrased as the question the page answers - Unique <title> and meta description; self-referencing canonical - Content rendered on the server, not only after JavaScript runs - JSON-LD only for what the page visibly says - Add every new page to the sitemap - Never change the home page or pages that already work
How do I connect an MCP server to Gemini CLI?
Run gemini mcp add with --transport http in the site's folder, then /mcp auth to sign in. The command writes to .gemini/settings.json; a remote server goes under httpUrl, because url means an SSE server:
# In your site's folder (default scope: this project's .gemini/settings.json)
gemini mcp add --transport http <name> <server-url>
# Inside Gemini CLI: sign in with OAuth, then list the servers
/mcp auth <name>
/mcp
// .gemini/settings.json (this project) or ~/.gemini/settings.json (every project)
{
"mcpServers": {
"<name>": {
"httpUrl": "<server-url>"
}
},
"context": {
"fileName": ["AGENTS.md", "GEMINI.md"]
}
}What can Gemini CLI not check by itself?
Gemini CLI sees your code, not the live site. These checks need the published page or outside data:
| Question | Where the answer is |
|---|---|
| Does the page render with content without JavaScript? | Fetch the live URL, for example with curl |
| Are title, canonical and JSON-LD right? | The live HTML, not the source file |
| Did Google index it? | Search Console |
| Did AI crawlers read it, did AI assistants send visits? | Server logs or an analytics tool that splits AI traffic |
Step by step
- Check your sign-in. Confirm Gemini CLI still serves your account; if not, follow the Antigravity CLI path.
- Write the rules. Create GEMINI.md, or AGENTS.md listed in context.fileName, with your page rules.
- Connect the tools. Run gemini mcp add --transport http with the server's URL, then /mcp auth.
- Ask for one batch of pages. Ask for a few new pages, each answering one question, without touching existing pages.
- Check live. Deploy, open each published URL, check content, title and canonical, then watch indexing and AI visits.
Common mistakes
- Writing a remote server under url, which Gemini CLI reads as SSE, instead of httpUrl.
- Assuming Gemini CLI still works on a Google AI Pro or Ultra login after June 18, 2026.
- Accepting the agent's summary that pages are live without opening the URLs.
- Letting it rewrite the home page or pages that already bring traffic.
How easyIndex solves it
easyIndex connects to Gemini CLI with one command, gemini mcp add --transport http easyindex https://easyindex.app/api/mcp, then /mcp auth easyindex. It is more than a server to call: the method comes inside it, with step-by-step instructions and the current rules, so there is nothing to install or keep updated. Gemini CLI makes every change, and easyIndex never touches your site or repository.
Each page is audited when submitted and checked on the live site after publishing, and a step completes only on evidence easyIndex checks, not on the agent's report. The dashboard then shows AI-assistant visitors per page, which pages AI crawlers read and Search Console data, for US$ 30 per website a month after a 7-day free trial.
Frequently asked questions
Is this the same as getting recommended by Gemini?
No. Gemini CLI is a coding agent that edits your site; whether the Gemini app cites your site is a separate question with its own guide.
My Gemini CLI login stopped working. What now?
Move to Antigravity CLI: it reads GEMINI.md unchanged, but remote MCP servers go to mcp_config.json with url or httpUrl renamed to serverUrl.
Can Gemini CLI read AGENTS.md?
Yes, once you add AGENTS.md to the context.fileName list in settings.json.
Will Gemini CLI get my site cited by AI assistants?
No tool can promise that. It can build clear, crawlable pages; each assistant decides what it cites.
Continue reading
- How do I get my company recommended by Gemini?
- How do I use Google Antigravity for SEO and to get my site cited by AI?
- What should a GEO MCP server for my coding agent do?
- What SEO rules should I put in AGENTS.md or CLAUDE.md?
- How does easyIndex work, what do I need, and how long until results?
- How much does easyIndex cost?
Last verified on .