Skip to main content

Codex SEO: Audit and Fix Your Site from Inside Codex

Codex SEO with RankBrain AI: connect an MCP server, audit your live site, and apply each fix inside Codex after you approve the before and after.

By Kaivalya Deshpande, Founder, RankBrain AI·Published ·6 min read

Codex SEO work is now a single workflow: connect RankBrain AI, an SEO MCP server, ask it to audit a URL, review the before and after for each issue, and approve the ones you want. Codex writes each approved fix into your project file. Every change is a plain file edit, visible in git diff and reversible with git revert. The site looks identical to visitors; search engines and AI assistants can read the updated content.

What Codex needs to do SEO work

Codex reads and edits your project files. A page title or meta description lives in a source file, but its SEO effect depends on what the browser renders and serves to Google. Reading a live URL and parsing its rendered HTML requires a live tool. RankBrain AI provides that tool as an MCP server. The server fetches the live page, checks page titles, meta descriptions, schema markup (JSON-LD), link anchor text, and AI crawler access for GPTBot and ClaudeBot, and returns each issue with the current content and the exact replacement. Codex calls it on demand, the same way it calls any other MCP tool. Google states the same SEO best practices apply to its AI features, including AI Overviews and AI Mode, with no extra requirements.

Add the SEO MCP for Codex in three steps

  1. Sign up at RankBrain AI and open the dashboard. Pick the Codex tab. Copy the setup prompt. Your API key is already in it.
  2. Open a new chat in your Codex project and paste the setup prompt. On Windows, the setup prompt sets the environment variable MCPAPP_TWO_API_KEY, saves a launcher in your user profile, adds the AGENTS.md block to your project, and merges the MCP server entry into ~/.codex/config.toml.
  3. Fully quit Codex including any background processes, then restart it. Open the tool list and confirm maitreya-labs-seo-mcp is connected.

Step 2 adds this section to ~/.codex/config.toml:

[mcp_servers.maitreya-labs-seo-mcp]

The entry includes your API key read from the environment variable, a startup timeout of 60 seconds, and a tool timeout of 120 seconds. The setup prompt writes this for you.

Keep your key out of version control

On Windows, the setup prompt sets the user environment variable MCPAPP_TWO_API_KEY. Keep your key out of files you commit.

Run a Codex SEO audit

After the server is connected, open a Codex chat and paste any of these prompts:

Audit the SEO of https://example.com and list the fixes.
Rewrite the title and meta description of my pricing page and show before and after.
Add Organization schema to my home page and show the diff.
Check whether GPTBot and ClaudeBot can read my site.
Fix the link text on my blog index.

RankBrain AI reads the live page and returns a list of issues. For each issue it shows the current content on the left and the exact replacement on the right. The audit covers page titles, meta descriptions, schema markup (JSON-LD), link anchor text, and AI crawler access for GPTBot and ClaudeBot. The server reads the live site and finds what stops Google and AI assistants from understanding it. Each issue is a separate item with its own approval step. Codex writes nothing until you approve a specific fix.

Approve, apply and undo each fix

Each fix waits for its own approval before Codex writes anything. Codex shows the current content and the exact replacement side by side. Approve one fix and Codex writes the change to the project file. Approving one fix leaves all other fixes pending, so you review each item on its own. After applying fixes, the site looks identical to visitors. Search engines and AI assistants read the updated content.

  • Review every change with git diff.
  • Undo any fix with git revert.
  • Fixes apply one at a time; each is a separate, reversible file edit.

Codex SEO plugin, skill or MCP server: what is the difference

A skill or plugin for an AI coding tool is a set of instructions or scripts loaded into the agent's context at the start of a session. It guides the agent using those instructions and runs entirely within the agent's context. An MCP server is a live tool the agent calls at runtime. It fetches a URL, parses the response, and returns structured data the agent can use to generate and apply fixes. RankBrain AI is an SEO MCP server. Codex calls it to read your live page, then uses the result to find issues and write each fix after you approve it. For more on this distinction, see SEO skill vs MCP server. A standalone free AI SEO audit tool is also available for a quick check with no sign-in.

Three ways to add SEO to a Codex workflow
OptionWhat it isWhat it can do for SEOBest for
PluginSet of scripts loaded into the agent's context at session startGuides the agent through SEO tasks using those scriptsScript-based session guidance
SkillSet of instructions loaded into the agent's context at session startGuides the agent through SEO tasks using those instructionsInstruction-based session guidance
MCP serverLive tool the agent calls at runtimeFetches a live page, parses the response, returns structured data, finds issues, and writes each fix after approvalLive page reads with agent-applied fixes

RankBrain AI is an SEO MCP server that Codex calls to read your live page and generate fixes.

Troubleshooting: server not listed after restart

  • Fully quit Codex including any background processes, then restart it. A partial restart does not reload the MCP server list.
  • Open ~/.codex/config.toml and check for the [mcp_servers.maitreya-labs-seo-mcp] entry. If it is missing, open the RankBrain AI dashboard, copy the setup prompt for Codex, paste it into a Codex chat, and run it again.
  • Confirm MCPAPP_TWO_API_KEY is set in your environment. If the variable is empty, set it to the key from your RankBrain AI dashboard and fully restart Codex.

RankBrain AI: the full Codex SEO fix workflow

RankBrain AI brings the full AI SEO fix workflow into Codex: read the live site, list each issue with the current content and the exact replacement, write each fix after approval. Setup takes three steps. Each fix waits for approval before Codex writes anything. Every change appears in git diff and can be reversed with git revert. The free trial runs for three days with no payment needed, then $5 a month, cancel anytime. One plan covers all features. RankBrain AI is a pre-launch beta from Maitreya Labs. See pricing for details.

RankBrain AI also works with Claude Code (see SEO MCP for Claude Code) and Cursor (see Cursor SEO MCP). To run a check with no sign-in, try the AI SEO checker. Check my site free and see what your site needs.

Frequently asked questions

What does a Codex SEO audit cover?

RankBrain AI checks page titles, meta descriptions, schema markup (JSON-LD), link anchor text, and AI crawler access for GPTBot and ClaudeBot. It reads the live page the way Google and AI assistants see it and returns each issue with the current content and the exact replacement.

Does RankBrain AI guarantee better rankings after I apply the fixes?

Rankings are not guaranteed by any tool. RankBrain AI applies SEO best practices. Google states the same practices apply to its AI features such as AI Overviews and AI Mode, with no extra requirements.

Will the fixes change how my site looks to visitors?

The site looks identical to visitors after each fix. Search engines and AI assistants read the updated content.

Can I undo a fix after Codex applies it?

Yes. Each fix is a plain file edit. Run git revert to undo it. git diff shows the change before you commit.

What is the SEO MCP for Codex server URL?

The server URL is https://rankbrain.app/api/mcp. The setup prompt from the RankBrain AI dashboard configures this automatically; you do not need to enter it by hand.

Does RankBrain AI work with other coding tools besides Codex?

RankBrain AI connects to Claude Code, Cursor, Codex, Windsurf, Cline, Kiro, Grok, OpenCode, Antigravity, Gemini, ChatGPT, and any tool that accepts an MCP connection. The dashboard has a tab for each tool and a Universal tab.

Keep reading

Codex SEO work is now a single workflow: connect RankBrain AI, an SEO MCP server, ask it to audit a URL, review the before and after for each issue, and approve the ones you want. Codex writes each a…

This site is not a part of the Facebook website or Meta Platforms, Inc. Additionally, this site is not endorsed by Meta in any way. Facebook and Instagram are trademarks of Meta Platforms, Inc. This site is also not a part of Google LLC and is not endorsed by Google in any way. Google and YouTube are trademarks of Google LLC. Maitreya Labs runs this site and its offers on its own.