Cloudways MCP Codex Setup: config.toml, Headers and Hosting Prompts

Codex + Cloudways

Cloudways MCP Codex Setup: config.toml, Headers and Hosting Prompts

Cloudways MCP gives Codex a direct path from code reasoning to supported Cloudways infrastructure actions. Cloudways documents both the Codex IDE extension and Codex CLI around the same ~/.codex/config.toml file, using a remote MCP URL and custom HTTP headers.

The configuration generator below builds the TOML block with the correct Cloudways endpoint and host identity. It uses a placeholder for the access token so the secret stays on your machine.

Current Cloudways offer 40% Off Cloudways for 4 Months + Unlimited Free WordPress/WooCommerce Migrations Code: SUMMER404 For new customers. Current Cloudways offer verified August 26, 2026; scheduled to end September 15, 2026.
Get 40% Off Cloudways for 4 Months

Interactive tool

Cloudways MCP Configuration Generator

Choose your AI client and intended permission level. The generator uses a token placeholder only. Your real Cloudways access token should be inserted locally in your client configuration.

Quick answer

How do you configure Cloudways MCP in Codex?

Add an mcp_servers.cloudways block to ~/.codex/config.toml, set the URL to https://mcp.cloudways.com/mcp/, then add X-Access-Token and X-Mcp-Host under mcp_servers.cloudways.http_headers. Cloudways documents codex for the IDE extension and codex-cli for the CLI host value.

Codex CLI can also register the server with codex mcp add cloudways --url https://mcp.cloudways.com/mcp/, after which you add the Cloudways headers to the shared config.toml file.

Codex Cloudways MCP configuration reference

Codex and Codex CLI share the same configuration file but can use different host labels.

Codex Cloudways MCP configuration reference
ItemCodexCodex CLI
Config file ~/.codex/config.toml ~/.codex/config.toml
MCP URL https://mcp.cloudways.com/mcp/ https://mcp.cloudways.com/mcp/
Token header X-Access-Token X-Access-Token
Host header codex codex-cli
Add command Edit config.toml codex mcp add cloudways --url ...
Verify Check MCP availability in Codex codex mcp list

Before you connect an AI client to Cloudways

Start with READ

Validate discovery and account visibility before granting modification rights.

Use a dedicated token

Create a separate token for each AI client so access can be rotated or revoked independently.

Keep secrets local

Never paste a real Cloudways access token into public pages, screenshots, repositories, or support posts.

Be precise on production

Name the target server, application, environment, and intended action before allowing a write operation.

Use Codex with a Cloudways access token, not a legacy API key

Cloudways access tokens let you separate read-only, limited, and full permissions. That is particularly important with a coding agent because the environment may have enough context to perform deployment or infrastructure operations while you are focused on a code task.

Create a dedicated token for Codex, give it an expiry that matches your operational needs, and begin with READ access. Move to Limited Scope for the exact write actions you want available.

Understand the shared Codex configuration

Cloudways documents the Codex IDE extension and CLI as sharing ~/.codex/config.toml. The MCP server entry uses a URL plus an http_headers subsection. This differs from Cursor's JSON format and Gemini's httpUrl key, so copying a configuration from another client will fail even when the endpoint and token are correct.

The host identity matters too. Use codex for the IDE-oriented setup and codex-cli when following Cloudways' CLI-specific example.

Verify the CLI before using infrastructure tools

For Codex CLI, run codex mcp list after adding the Cloudways server. Then start with a read-only request such as listing servers, projects, or applications. This confirms that Codex can discover Cloudways tools before you mix MCP into a deployment workflow.

If a request maps to a tool that is not in the direct set, Cloudways MCP can discover additional toolsets through its meta-tool system. Be specific about the Cloudways feature you want when the agent seems unsure which capability to load.

High-value Codex and Cloudways workflows

Codex can reason about a repository while Cloudways MCP supplies infrastructure context. That makes the combination useful for deployment preparation, environment checks, Git workflows, PHP configuration reviews, staging operations, SSL tasks, service inspection, and post-deployment verification.

Keep production write actions narrow. A good workflow tells Codex which application, server, environment, and action are allowed, and asks it to confirm current state before changing anything.

Troubleshoot config.toml errors

If Codex does not initialize Cloudways MCP, validate the TOML section names and header placement first. Make sure the access token is current, the Cloudways endpoint is exact, and the host value matches the Codex surface you are using.

When tools are missing after a Cloudways MCP update, reload the connection so Codex is not working from a cached tool list. Rotate a token immediately if it has appeared in a repository, shared terminal recording, or public support post.

Current Cloudways offer 40% Off Cloudways for 4 Months + Unlimited Free WordPress/WooCommerce Migrations Code: SUMMER404 For new customers. Current Cloudways offer verified August 26, 2026; scheduled to end September 15, 2026.
Get 40% Off Cloudways for 4 Months

Methodology and primary sources

Cloudzat checks client-specific configuration details against Cloudways' own MCP documentation and uses vendor documentation for plan-dependent client behavior. Last verification date: August 26, 2026.

Frequently asked questions

Where is the Cloudways MCP config for Codex?

Cloudways currently documents ~/.codex/config.toml for both Codex and Codex CLI.

What X-Mcp-Host value should Codex use?

Use codex for the Codex setup and codex-cli for the CLI-specific configuration documented by Cloudways.

Can Codex CLI add the server automatically?

Yes. Cloudways documents codex mcp add cloudways --url https://mcp.cloudways.com/mcp/ and then adding the required headers to config.toml.

Should the Cloudways access token be committed with config.toml?

Do not commit real infrastructure credentials to a public or shared repository. Keep the token secret and rotate it if exposure occurs.

Current Cloudways offer 40% Off Cloudways for 4 Months + Unlimited Free WordPress/WooCommerce Migrations Code: SUMMER404 For new customers. Current Cloudways offer verified August 26, 2026; scheduled to end September 15, 2026.
Get 40% Off Cloudways for 4 Months

Cloudzat may earn a commission if you sign up for Cloudways through links on this page. This does not change your price. Product capabilities, plan availability, promotions, and MCP client interfaces can change; verify critical production settings before acting.

Scroll to Top