Command Code + Cloudflare
- Quick start
- Cloudflare platform access
- Example prompts
- Tips
- FAQ
- Troubleshooting
- Build agents on Cloudflare
- Other agents
import { Steps } from "/components";
import AgentHeader from "/components/agent-setup/AgentHeader.astro";
import PlatformAccess from "/components/agent-setup/PlatformAccessSection.astro";
import ExamplePromptsList from "/components/agent-setup/ExamplePromptsList.astro";
import RandomPrompt from "/components/agent-setup/RandomPrompt.astro";
import TipsList from "/components/agent-setup/TipsList.astro";
import FAQList from "/components/agent-setup/FAQList.astro";
import FAQItem from "/components/agent-setup/FAQItem.astro";
import TroubleshootingList from "/components/agent-setup/TroubleshootingList.astro";
import TroubleshootingItem from "/components/agent-setup/TroubleshootingItem.astro";
import BuildAgentsCallout from "/components/agent-setup/BuildAgentsCallout.astro";
import OtherAgents from "/components/agent-setup/OtherAgents.astro";
Quick start
1. **Install Command Code** Install [Command Code](https://commandcode.ai). For the full walkthrough, refer to the [Command Code quickstart](https://commandcode.ai/docs/quickstart).
```sh
npm i -g command-code@latest
```
This installs the `command-code` CLI, with the alias `cmd`. On Windows, the alias is `cmdc`. For the full list of models you can run, refer to [Available Models](https://commandcode.ai/docs/reference/cli/models).
2. **Open your Cloudflare project**
Change into the directory that contains your Cloudflare project, where `wrangler.jsonc` lives (if it already exists):
```sh
cd my-worker
```
3. **Install Cloudflare Skills**
```sh
cmd skills add https://github.com/cloudflare/skills
```
This installs the Cloudflare Skills into `.commandcode/skills/`, including `wrangler`, `workers-best-practices`, `durable-objects`, and `agents-sdk`. Pass `--skill <name>` to install a single skill, or `--global` to install into `~/.commandcode/skills/` for every project. For more information, refer to [Command Code Skills](https://commandcode.ai/docs/skills).
4. **Add the Cloudflare MCP server**
```sh
cmd mcp add --transport http cloudflare https://mcp.cloudflare.com/mcp
```
Complete the OAuth flow in your browser when Command Code prompts you, then choose the permissions to grant. For scopes, transports, and per-project configuration, refer to [Command Code MCP](https://commandcode.ai/docs/mcp).
5. **Start a session and try a prompt**
```sh
cmd
```
Ask Command Code to investigate a task, make changes, and run the relevant tests. Review its diffs and command output before keeping changes.
For example:
<RandomPrompt />
Cloudflare platform access
Example prompts
Tips
- Install Cloudflare Skills first. They give Command Code persistent Cloudflare knowledge without spending tokens on tool schemas, so reach for them before adding MCP servers.
cmd skills addwrites to.commandcode/skills/for the current project. Add--globalto install into~/.commandcode/skills/and make the skills available everywhere.- The MCP server is saved to your local config by default. Optionally, add
--scope projectto save it to.mcp.jsoninstead and share it with your team. - Use the Cloudflare API MCP server for account resources and domain-specific servers for focused workflows.
- Record project conventions in
AGENTS.mdso they carry across sessions. Refer to Memory for where Command Code reads and writes them.