跳转到主要内容

GitHub Copilot + Cloudflare

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 GitHub Copilot**
	Install the GitHub Copilot extension in VS Code from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot). For JetBrains IDEs, Visual Studio, or Xcode, see the [Install the Copilot extension](https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-extension) guide.

2. **Install Cloudflare Skills**

	```bash
	npx skills add https://github.com/cloudflare/skills
	```

3. **Configure the Cloudflare MCP server**

	For VS Code, add to `.vscode/mcp.json`. For Copilot CLI, add to `~/.copilot/mcp-config.json` for user-level configuration or `.mcp.json` or `.github/mcp.json` for project-level configuration. For domain-specific MCP servers, refer to [mcp-server-cloudflare](https://github.com/cloudflare/mcp-server-cloudflare). For the full Cloudflare API MCP server (Code Mode), refer to [cloudflare/mcp](https://github.com/cloudflare/mcp).

	```json
	{
	  "mcpServers": {
	    "cloudflare": { "url": "https://mcp.cloudflare.com/mcp" }
	  }
	}
	```

	:::note
	In Visual Studio Code, `.vscode/mcp.json` uses `servers` as the root key instead of `mcpServers`. For the Visual Studio Code setup, refer to the [Visual Studio Code guide](/agent-setup/visual-studio-code/).
	:::

4. **Try a prompt**

	Open Copilot Chat (**Ctrl+Shift+I**), switch to agent mode, and try a prompt — for example:

	<RandomPrompt />

Cloudflare platform access

Example prompts

Tips

  • The Cloudflare API MCP server uses Code Mode — Copilot writes JavaScript against a typed API to reach any of 2,500+ endpoints in ~1,000 tokens.
  • Use @workspace in Copilot Chat to give the agent full context of your Workers project before asking it to build or deploy.
  • Commit a .github/copilot-instructions.md file with repository-wide conventions — Copilot loads it automatically on every interaction, complementing Skills which are loaded on demand.

FAQ

Yes. GitHub Copilot added Agent Skills support for VS Code agent mode, the Copilot CLI, and the cloud agent. Run `npx skills add https://github.com/cloudflare/skills` to install them. Refer to the [About agent skills](https://docs.github.com/en/copilot/concepts/agents/about-agent-skills) guide for details on where Copilot looks for Skills. All three. Skills load Cloudflare expertise into every agent-mode session. The Cloudflare API MCP server handles platform operations (DNS, WAF, Zero Trust, R2 buckets). Wrangler runs local dev and deploys in the VS Code terminal. The bundled `wrangler` Skill teaches Copilot when to reach for which. For tasks across the whole Cloudflare API, Copilot can also use the [Cloudflare CLI](/cf/), `cf`. Yes. The [Cloudflare CLI](/cf/), `cf`, is in beta and covers the whole Cloudflare API and prints JSON output. Install it with `npm install -g cf`, sign in with `cf auth login`, and tell Copilot to prefer it in `.github/copilot-instructions.md` or `AGENTS.md`. Refer to [Use cf with AI agents](/cf/agents/). It's complementary. Use custom instructions for simple repository-wide conventions that apply to almost every task (coding standards, preferred libraries). Use Skills for detailed, situational guidance Copilot should only load when relevant. Yes, via Wrangler or `cf` in the VS Code terminal, or via a GitHub Actions workflow that Copilot can generate for you.

Troubleshooting

Skills only work in VS Code agent mode, the Copilot CLI, and the cloud agent — not with inline completion or plain chat. Switch Copilot Chat to agent mode. If Skills are still not discovered, refer to [About agent skills](https://docs.github.com/en/copilot/concepts/agents/about-agent-skills) for the paths Copilot checks. Ensure you are using VS Code 1.99+ which supports MCP natively. Add the server configuration to `.vscode/mcp.json`. Point the agent directly at developers.cloudflare.com/llms.txt for a directory of every product, or developers.cloudflare.com/<product>/llms.txt for a product-specific index.

Build agents on Cloudflare

Other agents