How do I do GEO with Claude Code or Codex?
To do GEO with Claude Code or Codex, connect the agent to an MCP server that holds the method, open it in your website's folder and let it build the pages one step at a time, while something outside the agent checks every page. The agent writes code well; what it lacks is a plan of which pages to write and proof they work live.
Facts
- Anthropic introduced the Model Context Protocol (MCP), the open standard both agents use to call outside tools, on November 25, 2024. (Anthropic: Introducing the Model Context Protocol)
- Claude Code adds a remote server with one command, claude mcp add --transport http <name> <url>, and the /mcp command signs in to servers that use OAuth. (Claude Code docs: Connect Claude Code to tools via MCP)
- Claude Code has 3 scopes for MCP servers; the project scope is stored in a .mcp.json file at the project root so a team can share it. (Claude Code docs: Connect Claude Code to tools via MCP)
- Codex signs in to an OAuth MCP server with codex mcp login <server-name>, and its desktop app, CLI and IDE extension share one configuration in ~/.codex/config.toml. (OpenAI Codex docs: Model Context Protocol)
- easyIndex connects to Claude Code with one command: claude mcp add --transport http easyindex https://easyindex.app/api/mcp. (easyIndex)
Why use a coding agent for GEO?
A coding agent can do GEO because GEO work is mostly code and files: robots.txt, the sitemap, structured data and one page per customer question, all inside your website's repository. The agent already edits that repository, so it can make the changes where they live instead of in a separate tool.
How do I connect Claude Code or Codex to a GEO method?
You connect the agent with one MCP command, run in your website's folder, and then authorize it in the browser. These are the commands for easyIndex:
# Claude Code (then type /mcp, pick easyindex, Authenticate) claude mcp add --transport http easyindex https://easyindex.app/api/mcp # Codex (the second command opens the browser to authorize) codex mcp add easyindex --url https://easyindex.app/api/mcp codex mcp login easyindex
What can go wrong if the agent works alone?
An agent working alone grades its own work: it may report a page as done when the live site still serves the old version, a firewall blocks AI crawlers, or the price differs between pages. The fix is a check the agent does not control, run on the published site.
Claude Code, Codex or another editor: which one should I use?
Use the agent you already have; the method is the same across them because MCP is a shared standard.
| Agent | How it connects | How it signs in |
|---|---|---|
| Claude Code | claude mcp add --transport http | /mcp, then Authenticate |
| Codex (CLI, IDE, desktop app) | codex mcp add --url | codex mcp login |
| Cursor and other MCP editors | Server address in the MCP settings | Connect in the editor |
Step by step
- Open the agent in your website's folder. Start Claude Code or Codex in the repository that builds your site, so it can edit the real pages.
- Add the MCP server. Run the connect command for your agent and authorize it in the browser.
- Ask for the next step. Tell the agent to start; it calls next_step and receives one task: tracking, Search Console, the sitemap, then the pages.
- Let the agent build without publishing. The agent writes the batch of pages and submits each draft for audit before anything goes live.
- Publish the batch and verify it live. Deploy once; the server checks each page on the live site in every language.
- Plan the next batch from the data. Once a month the agent reads which pages AI crawlers read and which brought visitors, and proposes the next pages.
Common mistakes
- Asking the agent to 'do GEO' in one prompt, so it invents a page list with no customer questions behind it.
- Accepting the agent's 'done' without checking the published page.
- Letting the agent publish page by page, so nothing is compared with what was live before.
- Running the agent outside the website's repository, so it writes files that never reach the site.
How easyIndex solves it
easyIndex is the MCP server: it gives your Claude Code or Codex one step at a time, audits each draft, checks it on the live site, notifies Bing through IndexNow and measures AI visitors and crawler reads, for US$ 30 per website a month, with a 7-day free trial.
Frequently asked questions
Does easyIndex write code in my repository?
No. Your coding agent writes every change; easyIndex hands out the steps, audits the drafts and checks the live site.
Do I need a paid Claude or ChatGPT plan?
You need whatever plan your agent requires to run Claude Code or Codex; easyIndex is billed separately.
Can I switch from Claude Code to Codex later?
Yes. The progress lives on the easyIndex server, so another agent connected to the same project continues from the same step.
Will Claude Code make AI recommend my company?
No one can promise that. The agent can make the pages easy to reach and quote, and the results are measured, not assumed.
Continue reading
- How does easyIndex work, what do I need, and how long until results?
- What is GEO (generative engine optimization)?
- How do I write a page that AI assistants cite?
- What is the GEO checklist for a website?
- How much does easyIndex cost?
Last verified on .