build-mcp — Claude command: remote MCP server on Cloudflare
A slash command that walks your agent through building a remote MCP server on Cloudflare Workers, with tools, OAuth 2.0 and deployment.
~/.codex/prompts/build-mcp.mdWhat build-mcp does
build-mcp comes from Cloudflare's plugin and kicks off a guided build of a remote MCP server. The agent starts with skills/building-mcp-server-on-cloudflare/SKILL.md, then pulls official templates from references/examples.md, security and OAuth guidance from references/oauth-setup.md, and fixes for common failures from references/troubleshooting.md. Those files ship alongside the command, so a bare copy of the prompt file gets you nowhere.
What the command covers: deployment to Cloudflare Workers, OAuth 2.0 setup, defining and implementing tools, production deployment patterns, and wiring the result into Claude and other MCP clients. You pass a single argument describing the server you want.
Drop the file at ~/.codex/prompts/build-mcp.md for Claude. Claude expects .claude/commands/build-mcp.md instead, so moving the command between platforms means checking the path, not just the filename.
What it helps with
- stand up a remote MCP server on Cloudflare Workers
- add OAuth 2.0 auth to an MCP server
- define and implement server tools
- deploy the server using production patterns
- connect the finished server to Claude as an MCP client
Example prompts for the agent
- /cloudflare:build-mcp a GitHub integration server
- /cloudflare:build-mcp database query tool with OAuth
- /cloudflare:build-mcp file management MCP server
How to install build-mcp
Manually: put the files in place
~/.codex/prompts/build-mcp.mdCall it with /prompts:build-mcp. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.claude/commands/build-mcp.mdCall it with /build-mcp. For all projects use ~/.claude/commands/
Manually: put the files in place
.github/prompts/build-mcp.prompt.mdManually: put the files in place
.gemini/commands/build-mcp.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about build-mcp
How do I install build-mcp in Claude?
Copy the command file to ~/.codex/prompts/build-mcp.md. After that you invoke it with a description of the server you want.
What does build-mcp do?
It guides your agent through building a remote MCP server on Cloudflare, reading the skill and its references for templates, OAuth and troubleshooting, and helping with tools and deployment.
Which files does the command need?
It points at skills/building-mcp-server-on-cloudflare/SKILL.md plus three reference files: examples.md, oauth-setup.md and troubleshooting.md. Without them the steps won't run.
Source text
build-mcp.md · MIT
--- description: Build a remote MCP server on Cloudflare with tools and OAuth argument-hint: [mcp-description] allowed-tools: [Read, Glob, Grep, Bash, Write, Edit, WebFetch] --- # Build MCP Server on Cloudflare This command helps you build remote Model Context Protocol (MCP) servers on Cloudflare with tools, OAuth authentication, and production deployment. ## Arguments The user invoked this command with: $ARGUMENTS ## Instructions When this command is invoked: 1. Read the skill file at `skills/building-mcp-server-on-cloudflare/SKILL.md` for core guidance 2. Reference `skills/building-mcp-server-on-cloudflare/references/examples.md` for official templates 3. Use `skills/building-mcp-server-on-cloudflare/references/oauth-setup.md` for security and OAuth 4. Consult `skills/building-mcp-server-on-cloudflare/references/troubleshooting.md` for common issues ## Capabilities - Remote MCP server deployment on Cloudflare Workers - OAuth 2.0 authentication setup - Tool definition and implementation - Production-ready deployment patterns - Integration with Codex and other MCP clients ## Example Usage ``` /cloudflare:build-mcp a GitHub integration server /cloudflare:build-mcp database query tool with OAuth /cloudflare:build-mcp file management MCP server ```
© Cloudflare · MIT · openai/plugins