| [ Web Proxy ] |
| Viewing: https://developers.cloudflare.com/agent-setup/github-copilot/ | [Back] [Original] |
Editor extension and CLI with agent mode, workspace context, and native PR integration. Made by GitHub.
Install GitHub Copilot
Install the GitHub Copilot extension in VS Code from the Visual Studio Marketplace . For JetBrains IDEs, Visual Studio, or Xcode, see the Install the Copilot extension guide.
Install Cloudflare Skills
npx skills add https://github.com/cloudflare/skills
Configure Cloudflare MCP servers
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 . For the full Cloudflare API MCP server (Code Mode), refer to cloudflare/mcp .
{
"mcpServers": {
"cloudflare": { "url": "https://mcp.cloudflare.com/mcp" },
"cloudflare-docs": { "url": "https://docs.mcp.cloudflare.com/mcp" },
"cloudflare-bindings": { "url": "https://bindings.mcp.cloudflare.com/mcp" },
"cloudflare-builds": { "url": "https://builds.mcp.cloudflare.com/mcp" },
"cloudflare-observability": { "url": "https://observability.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.
Try a prompt
Open Copilot Chat (Ctrl+Shift+I), switch to agent mode, and try a prompt for example:
Add a cron trigger to my Worker that processes a job queue every hour.
Expand any section to learn more.
Persistent platform context that teaches the agent how Cloudflare works.
Skills are instructions the agent loads on demand. The cloudflare/skills bundle covers every layer of the platform — so the agent knows your conventions without you re-explaining them.
Live access to the Cloudflare API, docs, and observability.
MCP servers provide typed tools to call into Cloudflare at runtime. There are two options: Code Mode a single server that covers the entire Cloudflare API (2,500+ endpoints in ~1,000 tokens) or a set of focused, domain-specific servers hosted in the cloudflare/mcp-server-cloudflare repo. The full catalog is also in the MCP servers for Cloudflare docs.
Local dev, deploys, and Workers-specific commands.
Use Wrangler for local development, deploys, and product-specific commands like wrangler d1 migrations apply or wrangler tail. The bundled wrangler Skill teaches the agent when to reach for it.
What’s next
The unified cf CLI is in technical preview — a next-generation CLI that covers every Cloudflare product with consistent verbs and ergonomic output for agents. Try it with npx cf. Read the announcement →
Token-efficient references optimized for agents.
Append /index.md to any Cloudflare docs URL for a clean markdown version. Every top-level product section also has its own llms.txt a page index sized for a single context window. A few useful ones:
For a full overview of how these docs are structured for agents, refer to the Docs for Agents guide.
Add mTLS authentication and schema validation to protect my API endpoints.Build an AI chat agent using the Cloudflare Agents SDK with persistent conversation history stored in D1.Configure Zero Trust access policies to protect my internal staging environment.Build a multi-tenant SaaS backend where each customer gets an isolated D1 database.Build a serverless AI inference endpoint on Workers AI with streaming responses.@workspace in Copilot Chat to give the agent full context of your Workers project before asking it to build or deploy..github/copilot-instructions.md file with repository-wide conventions Copilot loads it automatically on every interaction, complementing Skills which are loaded on demand.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
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.
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 in the VS Code terminal, or via a GitHub Actions workflow that Copilot can generate for you.
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 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.
Enable the Cloudflare docs MCP server so the agent can fetch
current documentation at runtime. If you prefer not to use the MCP server, 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.
Cloudflare is not just a deploy target for agents, it is a full stack for building your own.
Stateful AI agents with state, scheduling, RPC, email, streaming chat and the Code Mode SDK for token-efficient tool use.
Learn moreShip a remote MCP server on Workers with OAuth, durable state, and streamable HTTP transport.
Learn moreRun open-source LLMs, embedding models, and image models at the edge. Use it as your agent's model provider.
Learn moreLoad user-generated code into isolated Workers on demand. The secure sandbox behind Code Mode.
Learn moreTerminal-based coding agent that understands your codebase, runs commands, edits files, and manages git. Made by Anthropic.
View guideOpenAI coding agent available as a terminal CLI and desktop app. It reads and writes files, runs commands, and browses the web in a sandbox.
View guideAI-first IDE built on VS Code with multi-file Composer edits and background agents. Made by Cursor.
View guideOpen-source terminal agent with a rich TUI that works with 75+ LLMs. Made by Anomaly.
View guideAgentic IDE with Cascade context and Flows for multi-step tasks. Made by Cognition.
View guideFree, open-source code editor with native Model Context Protocol (MCP) client support and Copilot Chat integration. Made by Microsoft.
View guideCommand Code is one of the most used coding agents for open models. It automatically learns your coding taste and self-improves as you work.
View guidePowerful agent for coding and work. Natively local, with open models in the cloud. By LM Studio.
View guide| Web Proxy Viewer | New URL | Original Page |