How do I use Codex for SEO and to show up in ChatGPT?

Use Codex as the builder and give it the rules and the checks it lacks. Write your page rules in AGENTS.md, which Codex reads before any work. Connect an MCP server for the steps and data that live outside the repository. Then publish a few pages, check each one on the live site and measure before writing more.

Facts

Does Codex know SEO on its own?

Codex knows the general rules, but it follows your repository's instructions and tools, not an SEO mode. Without rules it writes pages in whatever shape the codebase already has. Without outside tools it cannot see Google indexing, AI crawler reads or AI visits.

What goes in AGENTS.md for SEO?

Put short, checkable rules for every new page. Keep the file small, since Codex stops reading past 32 KiB by default:

  • A unique title and meta description per page
  • One H1 that is the question, answered in the first sentence
  • Content rendered on the server, visible without JavaScript
  • A canonical URL, a sitemap entry and JSON-LD that matches the visible text
  • Never change the home page or pages that already work

How do I connect an MCP server to Codex?

Add it once and every Codex surface sees it, because the CLI, the IDE extension and the desktop app share ~/.codex/config.toml:

# 1. Project rules Codex reads before any work
AGENTS.md                      # in the repository root

# 2. Connect a remote MCP server (opens the browser to authorize)
codex mcp add <name> --url <server-url>
codex mcp login <name>

# 3. Inside codex, list the active servers
/mcp

Why check the live page instead of trusting Codex?

Codex reports what it changed in the code, not what the published page shows. A failed deploy, a page that renders empty without JavaScript or a missing sitemap entry only shows up when someone fetches the live URL the way a crawler does.

Step by step

  1. Write AGENTS.md. Add your page rules to AGENTS.md in the repository root.
  2. Connect an MCP server. Run codex mcp add with the server's URL, then codex mcp login.
  3. Plan by buyer question. Pick the questions your customers ask and write one page per question.
  4. Publish a small batch. Deploy a few pages together and add them to the sitemap.
  5. Check live and measure. Fetch each page live, then watch indexing and AI visits before the next batch.

Common mistakes

  • Asking Codex to "do SEO" with no rules, then getting pages that copy the current templates.
  • Pasting a long SEO manual into AGENTS.md beyond the 32 KiB default limit.
  • Calling the task done when Codex says so, without opening the live URL.
  • Letting Codex rewrite the home page or pages that already bring visitors.

How easyIndex solves it

easyIndex works with a coding agent that has access to the website's repository: Claude Code, Codex, Cursor, Antigravity, Gemini CLI or any other MCP client. easyIndex connects to Codex over MCP and gives it one step at a time: setup (tracking, sitemap, Search Console), mapping, a content batch audited, published together and checked live, then a monthly cycle. A step completes on evidence easyIndex checks, not on Codex's report, and easyIndex never changes your site or repository.

It measures AI-assistant visitors per page and which pages AI crawlers read, for US$ 30 per website a month after a 7-day free trial with one website.

Frequently asked questions

Is there an official OpenAI guide to SEO with Codex?

We did not find one. OpenAI's Codex docs cover AGENTS.md and MCP, which are the two pieces an SEO workflow uses.

Does using Codex help my site show up in ChatGPT?

Not by itself. ChatGPT cites pages it can find and read; Codex only builds them. Nobody can promise a citation.

Can I keep project-only MCP settings?

Yes. Codex also reads .codex/config.toml inside the project, for trusted projects only.

Does the same setup work in the Codex IDE extension?

Yes. The CLI, the IDE extension and the desktop app share the same MCP configuration file.

Continue reading

Last verified on .

How to use Codex for SEO and to show up in ChatGPT