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
- Sign up at RankBrain AI and open the dashboard. Pick the Codex tab. Copy the setup prompt. Your API key is already in it.
- 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. - Fully quit Codex including any background processes, then restart it. Open the tool list and confirm
maitreya-labs-seo-mcpis 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.
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.tomland 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_KEYis 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.