videogen/docs/runbooks/cloudflare-codex-agent-setup.md
caelum0x d56639a594
Some checks are pending
build-images / api (push) Waiting to run
build-images / worker-gpu (push) Waiting to run
build-images / web (push) Waiting to run
codeql / Analyze (javascript-typescript) (push) Waiting to run
codeql / Analyze (python) (push) Waiting to run
perf / API hot-path micro-smoke (budgeted) (push) Waiting to run
perf / Desktop engine crates (release build check) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Waiting to run
vision2026-ci / API phase modules (ruff + pytest) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Waiting to run
vision2026-ci / Python SDK resource tests (push) Waiting to run
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Waiting to run
vision2026-ci / Alembic upgrade + drift check (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Waiting to run
Menivor — open source release (MIT), free to use and fork
Paid, hosted product at menivor.com, now retired as a company project.
Fresh squashed history of the cleaned working tree (secret-scanned,
no .env, no customer data, no outreach logs). Built on
MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
2026-12-04 02:10:26 +03:00

60 lines
2.2 KiB
Markdown

# Cloudflare agent setup for Codex
This repository includes a secret-free helper for the official Cloudflare Codex
setup. It registers these managed Streamable HTTP MCP servers:
- `cloudflare` — full Cloudflare API through Code Mode
- `cloudflare-docs` — current Cloudflare documentation
- `cloudflare-bindings` — Workers bindings
- `cloudflare-builds` — Workers build operations
- `cloudflare-observability` — Workers logs and analytics
The names and endpoints come from the
[Cloudflare Codex setup guide](https://developers.cloudflare.com/agent-setup/codex/).
## Run locally
Run the helper from the repository root in a normal local terminal:
```bash
./scripts/setup-cloudflare-codex.sh
```
The script adds only missing registrations. If an existing name points to a
different endpoint, it stops instead of replacing it. It then runs
`codex mcp list` and `wrangler whoami`. Wrangler logs are redirected to
`${TMPDIR:-/tmp}/videogen-wrangler.log`; set `WRANGLER_LOG_PATH` first if you
want another writable location.
For a read-only verification after setup:
```bash
./scripts/setup-cloudflare-codex.sh --verify-only
```
This repository helper does not install packages, deploy Cloudflare resources,
read `.env`, or copy credentials. It does modify the current user's Codex MCP
configuration when run without `--verify-only`, which is why it must be run
locally rather than from a restricted coding sandbox.
## Skills and OAuth
Cloudflare's preferred Codex flow is to open `/plugins` inside Codex and install
the Cloudflare plugin. That supplies Cloudflare Skills and registers its MCP
servers. If the plugin or Skills are already installed, the helper above safely
fills in or verifies the five core MCP registrations without reinstalling
anything.
The first time Codex calls an account-backed Cloudflare MCP tool, complete the
browser OAuth flow and choose the narrowest permissions needed. Wrangler uses
its separate OAuth session; `wrangler whoami` verifies the login without
deploying anything.
Inside the Codex TUI, `/mcp` shows connection and authentication status. If a
server cannot authenticate, Cloudflare's troubleshooting guidance is to remove
and re-add that server and complete OAuth again; review its current entry first:
```bash
codex mcp get cloudflare
```