Use cases · Codex

Codex for SEO: pages, technical fixes and a daily report

Codex does the SEO work that lives in your codebase: it writes pages, fixes metadata, adds structured data and checks the build. With MCP servers for Search Console and a browser, it can also read the numbers and check pages the way visitors see them. Two things differ from Claude Code: the rules go in AGENTS.md, and the sandbox keeps the network off by default, so commands that call an API need it turned on.

What Codex does for SEO

  • A daily report from Search Console and your analytics: impressions, clicks, the queries and pages behind them, and the gap to your goal.
  • New pages for queries that are starting to work, written in your site's repository with titles, meta descriptions and internal links.
  • Technical checks on every page it touches: titles, canonical tags, hreflang, structured data, sitemap entries and broken links.
  • Translations of pages that already get traffic, and an indexing request when a page ships.

Codex features for SEO

FeatureWhat it doesHow to start
AGENTS.mdSEO rules Codex reads before any work, from ~/.codex and the repositoryAdd a section to the AGENTS.md at the site's root
SkillsReusable SEO steps in .agents/skills/<name>/SKILL.mdCodex picks one when it fits the task
MCP serversSearch Console, analytics and a browser, configured in config.tomlcodex mcp add, then /mcp to check
Scheduled tasksRun the routine on a schedule, in a local project or a worktreeCreate it in the ChatGPT desktop app or on the web

How to set up Codex for SEO

  1. Connect the tools

    Add a browser and your data sources as MCP servers. Codex's default workspace-write sandbox keeps the network off, so if the routine runs a CLI or calls an API, such as your analytics tool's, turn network access on in config.toml.

    # A browser for checking rendered pages
    codex mcp add playwright npx "@playwright/mcp@latest"
    
    # ~/.codex/config.toml: let commands reach your analytics API
    [sandbox_workspace_write]
    network_access = true
  2. Write the rules in AGENTS.md

    Codex reads AGENTS.md before any work: ~/.codex/AGENTS.md, then the files from the repository root down to the folder it's working in. Put the job's rules there, or in a skill under .agents/skills/ if they're long. See the AGENTS.md guide.

    ## SEO rules
    Goal: 10,000 impressions, 500 clicks and 2,000 visitors a week.
    
    Every day
    1. Read the last 7 days in Search Console and analytics.
    2. Pick one query or page that is starting to work and do one
       thing for it: a related page, an FAQ, internal links or a
       translation.
    3. Run the build and check the page's title, description,
       canonical and structured data before you commit.
    4. Post the report and what you changed. Ask before anything
       that can't be undone.
    
    Never
    - Buy links, stuff keywords or publish a page you haven't built.
    - Change robots.txt or redirects without asking.
  3. Run it without the interactive interface

    codex exec runs one task and exits. Progress goes to stderr and the final message to stdout; -o also writes it to a file and --json streams events. The sandbox is read-only unless you pass --sandbox workspace-write.

    # Today's routine without the interactive interface; save the summary
    codex exec --sandbox workspace-write \
      -o seo-report.md "Do today's SEO routine from AGENTS.md"
  4. Put it on a schedule

    Create a scheduled task in the ChatGPT desktop app or on the web (the CLI doesn't manage them), or run codex exec from cron. See how to make Codex proactive.

Source: Codex documentation

Limits and safety

  • It can't see Search Console or analytics until you connect them. Give it read-only access.
  • Rankings take weeks. Judge it on pages shipped and impressions, not on yesterday's clicks.
  • A person approves anything public: deploys, redirects, robots.txt and removals.
  • Codex sandboxes commands by default: writes stay in the workspace and the network is off. Keep danger-full-access for an isolated runner or container.

Claude Code or Codex for SEO?

The rules carry over. Write them once in AGENTS.md and put @AGENTS.md in CLAUDE.md, and both agents read the same file.

Step by step for the other agent: SEO with Claude Code.

Claude CodeCodex
Rules fileCLAUDE.mdAGENTS.md
Connect toolsclaude mcp addcodex mcp add or config.toml
Run without youclaude -pcodex exec
Schedule/schedule, desktop scheduled tasks, /loopScheduled tasks in the ChatGPT app, cron
Built in for SEOSkills, subagents, /scheduleAGENTS.md, skills, scheduled tasks
With Crewmark

Make SEO someone's job

Commands run when someone remembers to run them. Crewmark turns your own Codex into an AI employee with a role, a goal in numbers, working hours and a heartbeat, so the work happens on schedule and shows up on a board.

  1. Start from the role

    The AI SEO specialist, with these rules in its brief.

  2. Put the work on its board

    Add the job as a recurring issue. The employee wakes on its heartbeat, does it and reports in a comment.

  3. Related

    The daily SEO report has the full report brief, and the SEO skills cover keywords, writing and indexing.

FAQ

Can Codex do SEO?

Yes, for the work in your codebase: pages, metadata, structured data, internal links and sitemaps. With MCP servers for Search Console and analytics it can report on the numbers too. Keep deploys and anything public with a person.

Why can't Codex reach my analytics API?

Commands in the default workspace-write sandbox have no network access. Set network_access = true under [sandbox_workspace_write] in config.toml.

Where do SEO rules go for Codex?

In AGENTS.md at the repository root, or in a nested AGENTS.md for the site's folder. See the AGENTS.md guide.

Can Codex run an SEO report every day?

Yes. Create a scheduled task in the ChatGPT desktop app or on the web (the CLI doesn't manage them), run codex exec from cron, or make it a recurring issue for a Crewmark employee on Codex.

Checked against Claude Code's and OpenAI's Codex documentation on November 13, 2026.

Hand SEO to an AI employee on Codex.

Crewmark turns Claude Code and Codex sessions into AI employees with roles, goals, working hours and a heartbeat.