Connect an Agent

Codex

Connect MoraWP in the Codex desktop app, IDE extension, or CLI.

Codex connects to MoraWP over MCP using browser OAuth. You add the server URL, then approve a connection to a Workspace. You do not create or paste a MoraWP static Agent key.

Choose Desktop, IDE extension, or CLI below. The CLI commands were checked against 0.161.0 and OpenAI's documentation on October 9, 2026.

Desktop app

  1. Open Settings → MCP servers in the desktop app. Current OpenAI documentation calls this the ChatGPT desktop app, with Codex available inside it.
  2. Choose Add server, name it morawp, and select Streamable HTTP.
  3. Enter https://mcp.morawp.com/mcp. Leave static authentication headers empty.
  4. Save, select Restart, then Authenticate for MoraWP.
  5. Complete MoraWP's approval in the browser. In the composer, use /mcp to inspect connected servers.

You do not need the terminal commands below if you used this interface.

IDE extension

Open the extension's gear menu → MCP servers → Add server. Use the same name, Streamable HTTP transport, and URL. Save, select Restart extension, then Authenticate.

The desktop app, CLI, and IDE extension share Codex configuration on the same host. Check the active host for remote sessions; a local login does not prove a remote runtime is authenticated. Hosted ChatGPT chats use the ChatGPT plugin flow.

CLI setup

The remaining commands apply to the terminal client.

Before you begin

Connect a WordPress website and make sure you can access its Workspace. On your computer, check that Codex is installed:

Terminal
codex --version

If the command is unavailable, use OpenAI's CLI installation instructions.

Add MoraWP

Choose Connect → Other → All apps → Codex in the Dashboard. That opens this guide in a new tab; it does not create a connection. Use the following commands on your computer.

Run the add command in your terminal:

Terminal
codex mcp add morawp --url https://mcp.morawp.com/mcp

Expected result: Codex saves a server named morawp. Adding the URL alone does not approve access to your Workspace.

If you already configured that name, check its URL before changing anything:

Terminal
codex mcp get morawp

Approve the connection

Start OAuth sign-in:

Terminal
codex mcp login morawp

Use the browser page that opens to sign in to MoraWP and review the request. Confirm the intended app and Workspace, choose the websites and Ability access, then read and acknowledge the data-access notice.

An enabled Integration can expose its complete available data, including private fields. The plugin hides the passwords and tokens it recognizes unless a WordPress administrator turns on Show secrets to Agents. Others can still reach the agent, for example inside exports or code and database results. See Access modes for its limits. Read only restricts changes, not the sensitivity of the information returned. Review the access before approving.

Choose Agree and approve, then return to the terminal. For the shared approval steps, see Approve access in MoraWP.

Expected result: the terminal reports successful authorization and the connection appears in Agents in the selected Workspace.

Verify in Codex

Check the saved server configuration:

Terminal
codex mcp list

Then start a Codex session and use /mcp to inspect the active servers. A configured entry is not proof that WordPress access works. Make a read request:

Use MoraWP to list the websites this Agent can access. Do not make changes.

Expected result: Codex returns the websites allowed for this connection. Continue with Quickstart to verify an actual WordPress read.

Troubleshooting

ProblemNext step
codex is not foundInstall the CLI, reopen your terminal, and run codex --version.
morawp is not configuredRun the add command in the same Codex environment you use for your session.
Authorization was cancelled or expiredRun codex mcp login morawp again and complete the new browser request.
Server is configured but requests require sign-inComplete OAuth login. Check that the Agent connection has not been removed in MoraWP.
Connected, but the expected website is missingCheck the selected Workspace and the Agent's website access in MoraWP.
An Ability is deniedReview the Agent's mode and the Workspace's enabled Abilities. Repeating the same call does not grant access.
WordPress returns an errorUse WordPress tool failed.

Remove access

Remove the connection in MoraWP when Codex should no longer reach the Workspace. For local cleanup, OpenAI also provides:

Terminal
codex mcp logout morawp
codex mcp remove morawp

Local logout or removal is separate from removing the MoraWP Agent connection. Review Agent access when managing other authorized sessions.

See OpenAI's MCP documentation for current Codex configuration options.

MoraWP documentation