How This WordPress Website Was Configured to Be Editable by Codex

Written by

in

This website doubles as a working experiment: can Codex manage WordPress content directly from a conversation? After configuring a WordPress MCP endpoint and correcting the client connection, Codex successfully discovered the available abilities and read the site’s information. This article documents that setup and the troubleshooting that made it work.

The components that connect Codex to WordPress

The site has two active plugins: MCP Adapter (version 0.6.1) and Enable Abilities for MCP (version 2.13.0). The adapter bridges WordPress abilities to the Model Context Protocol, or MCP. The companion plugin exposes additional operations, including reading posts and pages, creating drafts, updating content, and working with metadata.

The connection follows a simple path: Codex sends an authenticated MCP request over HTTPS, the adapter routes it to a WordPress ability, and WordPress returns the result. Each operation still depends on the available ability and the permissions of the authenticated account. Installing the adapter alone does not make every part of a website editable.

The WordPress endpoint

The MCP server for this site is available at https://mcp-test.lucdaigle.net/wp-json/mcp/mcp-adapter-default-server. The site also exposes the ordinary WordPress REST API at /wp-json/.

During the first checks, both the homepage and REST API returned HTTP 200. That established that the site was reachable, but it did not establish an authenticated MCP connection. The MCP endpoint returned HTTP 401 when accessed without credentials, so authentication had to be tested separately.

Configuring Codex

On this Windows computer, the connection was added to C:\Users\luc\.codex\config.toml. The final configuration uses a direct HTTP connection:

[mcp_servers.mcp-test-wp-site]
url = "https://mcp-test.lucdaigle.net/wp-json/mcp/mcp-adapter-default-server"
http_headers = { Authorization = "Basic <base64-encoded-username:application-password>" }

The placeholder above must be replaced with the credential value for the intended WordPress account. For WordPress application-password authentication, the value represents the Base64 encoding of username:application-password. The actual credential is deliberately omitted from this article. Base64 is an encoding, so the encoded value must be treated as a secret too.

Codex supports an HTTP server URL and an http_headers map directly. This avoids starting a local proxy process for this connection. After updating the configuration, Codex was restarted and the connection was tested again.

Two problems in the original configuration

The initial entry used npx mcp-remote to connect to the endpoint. However, npx was not available on the command path visible to the testing session. That made the local launcher a likely startup blocker. Switching to Codex’s native HTTP connection removed that dependency.

The other problem was confirmed by an authentication test. The saved credential had been sent with Authorization: Bearer. A read-only request to the WordPress current-user endpoint returned HTTP 401 with Bearer authentication and HTTP 200 when the same value was sent with Authorization: Basic. For this credential, Basic was the working scheme.

These were separate checks: a website can load normally while the MCP client cannot start, and an MCP endpoint can exist while its authentication header is wrong.

Verifying the working connection

After the configuration change and restart, Codex could access the adapter’s three MCP tools: ability discovery, ability information, and ability execution. Discovery returned the core WordPress abilities and the companion plugin’s ewpa/ abilities.

Codex then inspected the schema for core/get-site-info and executed it with a request for the site name, URL, and WordPress version. The response reported MCP Test Site, https://mcp-test.lucdaigle.net, and WordPress 7.1.2. This verified that a real ability could execute through the configured MCP connection.

What editing through Codex now means

The discovered abilities include operations for creating and updating posts, creating pages, managing taxonomy terms, and reading or writing selected metadata. Codex can inspect an operation’s input schema, prepare its parameters, and invoke it through the adapter. The exposed abilities determine the scope of those changes; this connection does not establish unrestricted access to theme files or arbitrary server code.

A practical content workflow is to ask Codex to prepare a post, save it as a draft, and review it in WordPress before publishing. This post was prepared for that draft workflow using the same connection it describes.

References

WordPress MCP Adapter describes the bridge between WordPress abilities and MCP. The official Codex MCP documentation explains HTTP server configuration and authentication headers.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *