← Back to Integrations
O
OpenAI Codex CLI MCP Server for WordPress Setup
Model Context Protocol Tutorial
Work on WordPress from OpenAI's terminal coding agent. Codex CLI connects to Easy MCP AI with one codex mcp add command and an API token, through the mcp-remote bridge on your own computer. One command to run.
Location: Easy MCP AI → Dashboard, then your terminal
- In WordPress, open Easy MCP AI → Dashboard, click Connect an AI client (the card is already open if nothing is connected yet) and choose OpenAI Codex CLI.
- Under Get an API token, click Create a token. On Connections → API tokens, choose the user and what the token may do (Read-only, Full access or Custom), then copy the token: it is shown only once. You can also use a token you already have.
- Copy the command below, replace
YOUR_API_TOKENwith your token and the example address with the MCP URL from the dashboard sidebar, and run it in your terminal:
codex mcp add wordpress -- npx -y mcp-remote https://yoursite.com/wp-json/easy-mcp-ai/v1/mcp --header "Authorization:Bearer YOUR_API_TOKEN" --transport http-only
- Back on the Easy MCP AI dashboard, the top of the page shows Connected: 1 API token (a higher number if you already had other connections). Ask Codex something simple, like “List my latest posts”: the call appears under Recent activity in the dashboard sidebar.
Prefer a config file? Add the server to ~/.codex/config.toml instead, with your token in place of YOUR_API_TOKEN:
[mcp_servers.wordpress]
command = "npx"
args = ["-y", "mcp-remote", "https://yoursite.com/wp-json/easy-mcp-ai/v1/mcp", "--header", "Authorization:Bearer YOUR_API_TOKEN", "--transport", "http-only"]
Both options need Node.js, because npx runs the mcp-remote bridge. The bridge runs on your own computer, not on a hosted server.
Need your API Token?
Remember to create your Bearer token in the WordPress admin under Easy MCP AI → Connections → API tokens before completing this setup.
Download Plugin