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.
“List the tools from my WordPress server.”
| Content | Posts, pages, menus, media |
| Builder | Elementor elements, classes, variables |
| SEO | Titles, meta, schema, redirects |
| GA4, Ads and Tag Manager tags | |
| Safety | Production mode on · writes logged |
On this page
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
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
Step 1 on a test site. The Environment line shows how HyIMPACT reads the site. On production the development abilities stay off. 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
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.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 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 direct HTTP snippet (credentials masked). - macOS and Linux
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.
Explore more
Connect Codex step by step
The setup text comes from HyIMPACT → Configuration on your own site.