Deploy & rotate secrets
All commands use the cf CLI from ~/projects/911cpb-mcp, with CLOUDFLARE_ACCOUNT_ID=edc1a364499054f067488201b7646f09 (ApplyLogics).
Build and deploy
Section titled “Build and deploy”The Worker serves both the MCP server and these docs on https://mcp.911cpb.org. npm run build builds the Starlight site (docs/dist) and then the Worker, which ships the docs as static assets.
cd ~/projects/911cpb-mcpnpx tsc --noEmit # typechecknpm run build # docs + Workercf deployPaths the docs don’t use (/mcp, /api/*, /openapi.json, /authorize, /token, /register, /.well-known/*) fall through to the Worker.
Rotate the auth token
Section titled “Rotate the auth token”openssl rand -hex 32 # new tokencf workers secrets update MCP_AUTH_TOKEN # paste it when promptedThen update .secrets and every client (webapp env var, Claude Code config). Old clients get 401 right away.
Rotate the database password
Section titled “Rotate the database password”- Change the password in Aurora.
- Update Hyperdrive with the new password.
cf cli search "update hyperdrive origin password"finds the command; run--helpon it for the flags. - Check it with any
querycall. No redeploy is needed, because the Worker reads the connection from the binding.
Local development
Section titled “Local development”cf devTo run locally against a different database, set dev.connectionString on the HYPERDRIVE binding in cloudflare.config.ts. Don’t commit a real connection string.