GoBuildWP
The connection guide · GoBuildWP Free

Connect Codex CLI to WordPress. Start with one verified read.

Install GoBuildWP, connect Codex CLI, and read a page from your own WordPress site. Then, when you are ready, give it explicit permission to create a draft you can check in wp-admin.

By GoBuildWPInstructions reviewed 19 October 2026Free 1.22.1 · Pro not required for this workflow

What you need before you begin

MCP lets an AI client call tools on your WordPress site; the pillar guide explains what a WordPress MCP server is. GoBuildWP provides the tools. Codex CLI asks to use them. Sign-in identifies the WordPress user. The site's safety profile and tool permissions decide what it can do.

  • A self-hosted WordPress 6.9+ site on PHP 8.0+. Use a staging site for your first write.
  • Permission to install plugins and manage connections. Direct connection management requires manage_options on a single site, or superadmin on multisite. An ordinary Editor is insufficient.
  • Codex CLI installed and signed in through a supported OpenAI account or API setup. Check codex --version before following client-specific steps.
  • A WordPress URL reachable from the computer running Codex. Use public HTTPS for the direct OAuth example below; local setups may receive a bridge configuration.

Free and Pro are separate from your OpenAI plan. GoBuildWP Free provides the connection and core content workflow used here. Pro adds deeper integrations and workflows; some also require the corresponding third-party plugin or licence. Neither edition supplies an OpenAI subscription or bypasses your workspace controls. See Free vs Pro for feature details.

This page covers the terminal client. ChatGPT web does not read your local config.toml. Use the separate ChatGPT path above if you want to work from a browser conversation.

Step 01

Install GoBuildWP Free

  1. Download the Free plugin

    Get the current Free ZIP from Get started. Keep the ZIP intact; do not upload the Pro add-on for this first connection.

  2. Upload and activate it in WordPress

    In wp-admin, open Plugins → Add Plugin → Upload Plugin. Choose the ZIP, select Install Now, then Activate Plugin. If GoBuildWP is already active, check its version instead of reinstalling it.

WordPress Add Plugins screen with the ZIP upload picker and Install Now button
Local demo capture, 16 October 2026. This is the real WordPress plugin upload screen, before selecting the ZIP. Open the image for a closer look.
Step 02

Prepare the WordPress side

  1. Choose Read Only explicitly

    Open GoBuildWP → Settings, find Agent access, and select Read Only. Production Safe is the default; it is not the same as read-only. Confirm AI abilities are enabled and inspect the individual ability switches.

  2. Choose the client and authentication method

    Open GoBuildWP → Connect, choose Codex, and select OAuth. Copy the complete URL or configuration generated for your site. Leave other clients' entries intact.

GoBuildWP Settings showing AI abilities enabled and the Safety profile set to Read Only
Existing local demo screenshot, GoBuildWP 1.18.5. The Read Only setting is visible; this image does not prove a client connection. Open the image for a closer look.
GoBuildWP Connect screen with OAuth, Application password, Access token and client choices
Existing local demo screenshot, GoBuildWP 1.18.5. This shows WordPress-side setup choices, not a completed connection. Your installed version may use different labels. Open the image for a closer look.

Copy the right endpoint. An endpoint is the full address the client connects to. Direct OAuth uses /wp-json/mcp/wppilot-oauth. Access tokens and Application Passwords use /wp-json/mcp/wppilot. Both use Streamable HTTP, which carries MCP requests over an HTTP connection. OAuth and tokens are different ways to sign in.

Step 03

Add your WordPress site in Codex CLI

Quick path: ask AI to add the MCP server

Try giving the AI your endpoint and asking it to add the connection. A user has reported that their interface adds MCP configuration this way. This shortcut has not been independently demonstrated in the pictured ChatGPT web session; support depends on the client and the tools it can use.

Ask AI to add MCP · public URL only
Add my GoBuildWP WordPress MCP server to this client:
https://your-site.com/wp-json/mcp/wppilot-oauth

Use my actual endpoint from GoBuildWP Connect in place of this example.
Setup guide: https://gobuildwp.com/wordpress-mcp/codex
Do not request passwords or tokens in chat.
Explain any new access and stop for my approval if authorization is needed.
After setup, discover the tools and verify one read. Do not change the site.

A guide URL explains the setup; the MCP endpoint is the connection address. Neither is a secret-bearing install link. With authorized configuration-writing tools, Codex may help save the entry. If that support is unavailable, use the manual fallback below. Configuration added is only the first checkpoint: complete any required sign-in, then verify tools and a real read.

The supplied video demonstrates Codex CLI. It does not demonstrate ChatGPT setup. Watch on YouTube ↗ · GoBuildWP channel ↗

Manual setup fallback

Prefer the terminal? Add the direct OAuth server with the command below, using your generated name and endpoint, then complete sign-in when prompted or run the login command shown in step 2. Use either this command or the TOML entry; do not add the same server twice.

Terminal alternative · example domain
codex mcp add gobuildwp-your-site-com --url https://your-site.com/wp-json/mcp/wppilot-oauth
  1. Merge the generated configuration

    Open ~/.codex/config.toml on macOS or Linux, or %USERPROFILE%\.codex\config.toml on Windows. A project's .codex/config.toml applies only in a trusted project. For a public HTTPS site, the direct OAuth entry has this shape:

    config.toml · OAuth · example domain
    [mcp_servers.gobuildwp-your-site-com]
    url = "https://your-site.com/wp-json/mcp/wppilot-oauth"

    Use the server name and endpoint generated by your Connect screen. Do not overwrite the rest of your configuration.

  2. Complete the browser sign-in

    In a terminal, run the login command with the same server name. Check the WordPress domain and approve the intended identity. This WordPress authorization is separate from signing into Codex itself.

    Terminal · OAuth sign-in
    codex mcp login gobuildwp-your-site-com
  3. Check discovery in a new session

    Run codex mcp list, start a new Codex session, and open /mcp. Check the expected server and tools. A saved or enabled configuration is not a successful read; continue with the next section.

Using a local site or access token?

For a local or firewalled site, GoBuildWP may generate a command = "npx" bridge instead of a direct URL. Use that generated configuration, including its Node.js requirement. Do not combine a bridge command and a native URL in one server table.

If OAuth fails, diagnose its actual error. A token is a separate option: use an already authorized, narrowly scoped token and keep its value in the environment of the process launching Codex. The configuration stores only the variable name:

config.toml · bearer authentication alternative
[mcp_servers.gobuildwp-your-site-com]
url = "https://your-site.com/wp-json/mcp/wppilot"
bearer_token_env_var = "GOBUILDWP_TOKEN"

Replace the endpoint, set the variable privately, and restart Codex so it inherits that environment. Never put the token value in a prompt, screenshot or repository. A token does not use codex mcp login. See credential options.

What the local recording establishes: the 16 October demo used Free 1.18.6 and Codex CLI 0.144.1 with access-token authentication. Its OAuth callback failed with a missing issuer; OAuth success is not claimed. The read shown below ran under Production Safe, so it proves a non-mutating request, not enforcement of the Read Only profile.

Step 04

Verify one real WordPress read

Keep the WordPress profile on Read Only. Ask your client to discover the available tools and use the named server. Direct GoBuildWP exposes MCP adapter tools for discovery, ability information and execution; WordPress abilities may appear behind those adapter tools rather than as separate top-level tools.

Codex CLI · first prompt
Use only my GoBuildWP WordPress MCP connection. Do not change anything.

1. Discover the available abilities and report the active safety profile.
2. Read the site URL and locale with wppilot/get-site-settings.
3. Use wppilot/list-content to list up to five pages.
4. Use wppilot/get-content to read one page from that result.
5. Report the site URL, page ID, title, status and abilities actually called.

If a tool or permission is missing, stop and report the exact error.

In wp-admin, open Pages → All Pages and find the returned title. Open its editor and compare the page ID in the address, content and status. Check the relevant connection record or last-used time in GoBuildWP. A convincing answer without a tool result is not verification.

Actual Codex CLI output reporting completed MCP calls, local WordPress versions, a draft post ID and no changes made
16 October 2026: real Codex process output streamed into a browser terminal. It reports a read of local draft post 7 through a token connection. This recorded example reads a post, while the suggested first prompt above reads a page; it is not a screenshot of that exact prompt. Open the image for a closer look.

Read calls are not entries in the change ledger. Use actual tool results and WordPress records to check reads; inspect the ledger for writes. If you have no pages to read, report the empty result and choose an existing post rather than inventing content.

Step 05

Optional: create a draft, then check it

Only after the read succeeds, decide whether to allow a bounded write on staging. Read Only will refuse it. An authorized site owner must choose a profile that permits the exact content operation, enable its ability, and ensure the connected user can create pages. A token or OAuth grant can impose a narrower cap. Client approval is an additional check, not a replacement for WordPress permission.

Codex CLI · explicit draft-only request
On my staging site only, create one new WordPress page:
Title: GoBuildWP connection test
Content: This draft verifies the connection.
Status: draft

Use GoBuildWP MCP only. Do not publish, edit existing pages, change menus
or change settings. Show the planned action and ask before writing.
After approval, read it back and report its ID and saved status.

Review the intended site, title, content and draft status before approving. Then open Pages → All Pages → Drafts in WordPress and compare the saved record with the client's returned ID. The editor must still show Draft. Preview the content while signed in. Restore Read Only after your test if you no longer need writes.

Real local WordPress Pages list showing Meet Cedar Studio marked Draft
16 October 2026 local demo: a recorded example page remains Draft in WordPress. Its title differs from the suggested test prompt; it is not evidence of a ChatGPT-created page. Open the image for a closer look.

Find the failing part of the connection

Start with the exact client error and the site's diagnostics. Keep reachability, authentication, tool discovery and permission problems separate.

Do I need an OpenAI API key?

WordPress OAuth and your Codex sign-in are separate. Use the OpenAI account or API authentication supported by your Codex installation. Do not put an OpenAI API key into the WordPress MCP endpoint.

Does this work with WordPress.com?

This tutorial demonstrates self-hosted WordPress with the GoBuildWP plugin. A WordPress.com MCP connection is a separate service and workflow. Do not replace the generated GoBuildWP endpoint with a WordPress.com documentation link.

Does connecting ChatGPT also configure Codex CLI?

A ChatGPT Plugins connection and a local Codex config.toml entry are separate configuration surfaces. This guide does not assume that a cloud plugin installs a CLI server. Follow the path for the client you will actually use.

How do I disconnect or revoke access?

For OAuth, use codex mcp logout with the server name, remove the saved entry when no longer needed, and revoke the corresponding grant in WordPress. Revoke a token separately on GoBuildWP Connect. Check which credential other clients share before revoking it.

The server cannot be reached

Confirm WordPress is running and the URL is reachable from the Codex machine. A direct Streamable HTTP entry uses url; a generated local bridge uses command and args. Check startup errors before raising a timeout.

Sign-in fails, loops, or returns 401

Check the endpoint matches the authentication method, the WordPress identity, token expiry and the exact OAuth error. Reauthenticate only after checking those details. For the recorded CLI 0.144.1 local issuer error, the demo used a separate token route; it did not establish an OAuth fix.

Codex ignores the entry

Check the TOML syntax, server name and loaded configuration. A project configuration requires trust. An environment token must be present in the process launching Codex; a variable set in another terminal is not automatically inherited.

Tools are listed but the ability is missing

Refresh the connection metadata or start a new client session. Inspect GoBuildWP's enabled abilities, identity capabilities, safety profile and credential scope. Integration tools may require Pro and the relevant active plugin. Tool discovery is not proof that every operation is authorized.

The draft request is refused

Read Only correctly rejects writes. Confirm an authorized owner enabled only the intended operation and that the client is using the expected grant. A credential's read-only cap remains effective even if the site profile permits writes. Do not widen access just to suppress an error.

Sources, limits and your next step

This guide combines a review of the shipped GoBuildWP connection code, existing demo captures and official OpenAI instructions. Screenshot dates and the authentication method matter: an older local capture does not establish that your current client, account or host will connect.

Direct ChatGPT access needs public HTTPS. Codex local configuration applies on its own host. Neither a client approval nor a successful connection guarantees that every write is reversible; inspect each operation before authorizing it. GoBuildWP is independent of OpenAI.

Make the first result easy to check.

One site. One read. A WordPress ID you can verify. Once those agree, try a single staging draft before expanding the workflow.

Get GoBuildWP Free →