How to connect Codex to Cloudflare
Install the Cloudflare plugin in Codex and use one Worker binding to check your local configuration against the official docs.
Free guide · Updated
Based on official documentation · Checked
Ask your agent
Copy the prompt and paste it into your assistant.
Quick answer
Install the official Cloudflare plugin from Codex, then open an existing Worker project. Use the Cloudflare documentation from Codex to check how one binding in your configuration should be used in code. You can make that first check using your local files and the public docs.
Find your Worker configuration
Start with a sample repository you control. Open the project root and locate its configuration, such as wrangler.jsonc in a Wrangler project or cloudflare.config.ts in a project using the Cloudflare CLI. If there are several Workers in a monorepo, start in the folder for the Worker you want to inspect.
Install Cloudflare in Codex
In the Codex CLI, open the plugin list with /plugins. Search for Cloudflare and install the official plugin. In the Codex desktop app, open Plugins and select Cloudflare. The plugin adds Cloudflare skills and MCP servers. If you already added a Cloudflare server manually, verify which connection Codex is using so you get the expected tools.
/pluginsKeep the first check local
Read one binding from the config, such as a D1 database or KV namespace. A binding name is how Worker code accesses that resource. Inspect the correct environment section as well as the top-level configuration if the project has multiple environments. Local and deployed Workers can use different resources.
Cloudflare may ask you to sign in when Codex uses tools tied to your account. Confirm the intended account before approving access. The following exercise uses documentation and a local config, so it does not require an account grant.
Practice
Verify a Worker binding
- Pick one binding in the Worker configuration and note the environment it belongs to.
- Ask Codex to name the binding, identify its resource type and explain the first runtime API call using Cloudflare documentation. Ask for the source link and keep the task read-only.
- Compare the name with the file and the API call with the documentation for that resource.
Output: A binding name, its resource type and a matching link to the relevant runtime API.
Fix missing or mismatched results
If Codex reports a different binding, check the project root and the environment you named. If Cloudflare tools are missing, check the installed plugin and reconnect or restart the Codex session if needed. To disconnect account access, remove the plugin from the client and revoke the corresponding grant where you authorized it.
Sources
Read the primary material
- Cloudflare Codex installationCloudflare
- Cloudflare Workers bindingsCloudflare