How to connect OpenAI Codex to WordPress

Add your WordPress site to Codex as an MCP server with HyIMPACT. Codex can then read and change pages, fields and SEO on the site.

Codex · new sessionExample
Hy
Hy

“List the tools from my WordPress server.”

MCP
hyimpact-example-test connectedServer from HyIMPACT → Configuration · example-roofing.test
ContentPosts, pages, menus, media
BuilderElementor elements, classes, variables
SEOTitles, meta, schema, redirects
GoogleGA4, Ads and Tag Manager tags
SafetyProduction mode on · writes logged
Which pages does my site have?
On this page
  1. ✓Before you start
  2. 1Turn on AI abilities
  3. 2Create an application password
  4. 3Add the server to Codex
  5. 4Restart and test
  6. !Common errors
  7. ?Codex questions
Answer firstTurn on AI abilities, create an application password, then add the HyIMPACT snippet to Codex’s config.toml.

Before you start

  • A WordPress site on HTTPS, with HyIMPACT installed
  • An administrator login
  • OpenAI Codex on your computer
  • Node.js, unless you use the direct HTTP setup
  1. Step 1: Turn on AI abilities

    In WP Admin, open HyIMPACT → Configuration. Tick "Turn on AI Abilities for this site" and choose Save Settings. Your browser asks you to confirm: choose OK. Steps 2 and 3 appear once the setting is saved.

    Example
    HyIMPACT Configuration screen with Turn on AI Abilities for this site ticked
    Step 1 on a test site. The Environment line shows how HyIMPACT reads the site. On production the development abilities stay off.
  2. Step 2: Create an application password

    Under Application Password, choose "Generate application password". HyIMPACT creates the password for your user, shows it once and adds it to the setup text in step 3. To tell your passwords apart later, first open "Customize password name (optional)" and name it after the tool, for example “Codex on laptop”.

    Example
    Application password generated, with the password masked
    The new password (masked in this screenshot).
    Treat it like a password. Don’t share the setup text, and revoke the password under “Manage existing application passwords” if it leaks.
  3. Step 3: Add the server to Codex

    Paste the setup prompt into Codex, or open “Need the JSON config for a specific client?”, choose Codex and add the snippet to config.toml:

    • macOS and Linux~/.codex/config.toml
    • Windows%USERPROFILE%\.codex\config.toml
    • One project only.codex/config.toml
    Example
    The Codex config.toml snippet, password masked
    The Codex snippet (password masked).
    Each server needs its own name in config.toml. To connect a second site, change the name first with "Change server name (optional)".

    No Node.js?

    Open “Need a configuration not requiring npx?” and pick Codex. This snippet connects over HTTP and goes in the project’s .codex/config.toml.

    Example
    The Codex direct HTTP snippet, credentials masked
    The direct HTTP snippet (credentials masked).
  4. Step 4: Restart and test

    Start a new Codex session and ask:

    • “List the tools from my WordPress server.”

    HyIMPACT shows your AI three tools: discover abilities, get ability info and execute ability. Through them it reaches every ability the site has.

Common errors

  • “Unauthorized” or 401A security plugin may block application passwords. Allow them for your user, then create a new one.
  • Application passwords are missingWordPress only offers them on HTTPS sites. Add HTTPS first. On a local site over HTTP, HyIMPACT shows the line to add to wp-config.php: define('WP_ENVIRONMENT_TYPE', 'local');
  • Wrong addressThe endpoint ends in /wp-json/mcp/hyimpact. Use the exact address from the Configuration page.
  • "npx" not foundThis setup runs the connector with Node.js. Install Node.js, then restart your AI tool. Or use the direct HTTP setup in step 3.
  • No tools, or a timeoutRestart Codex: it loads new servers on start. The first start takes longer while npx downloads the connector, and a slow site can time out the first check. Wait a minute and try again.

Codex questions

Is this the WordPress Codex?

No. The WordPress Codex was WordPress’s old documentation site. This guide is about OpenAI’s Codex coding agent.

Can Codex work on several client sites?

Yes. Add each site with its own server name.

The steps

Connect Codex step by step

Turn on AI abilities01
Create an application password02
Paste the setup into your AI tool03
Restart and test04
Ask for your first change05
Check it in WordPress06

The setup text comes from HyIMPACT → Configuration on your own site.

Want help connecting Codex?

We set up your first site with you.

See the WordPress plugin