Built by Metorial, the integration platform for agentic AI.

Learn More

cloudflare-docs

Cloudflare Docs

    Server Summary

    • Search Cloudflare documentation

    • Access migration guides

    • Generate Workers code

    • Retrieve API references

Cloudflare Docs MCP Server

A powerful Model Context Protocol (MCP) server that provides direct access to Cloudflare's comprehensive documentation ecosystem. This server enables AI assistants to search through Cloudflare's extensive product documentation and access specialized guides, making it easier to develop, troubleshoot, and optimize applications on the Cloudflare platform. Whether you're working with Workers, Zero Trust, CDN configurations, or any other Cloudflare service, this server brings authoritative documentation directly into your development workflow.

Overview

The Cloudflare Docs MCP server acts as a bridge between AI assistants and Cloudflare's documentation, providing semantic search capabilities across the entire Cloudflare product suite. Instead of manually browsing documentation or switching between your development environment and web browsers, you can query documentation directly through your AI assistant and receive contextually relevant information based on your specific needs.

This server is particularly valuable for developers working with Cloudflare's extensive product portfolio, which includes compute platforms like Workers and Pages, storage solutions such as R2 and D1, AI/ML tools including Workers AI and Vectorize, security products under the Zero Trust umbrella, and infrastructure services like CDN, DNS, and DDoS protection. The semantic search capability ensures that you receive the most relevant documentation chunks for your queries, even when you're not sure of the exact terminology or product names.

Features

Comprehensive Product Coverage

The server provides access to documentation for Cloudflare's entire product ecosystem, including:

  • Compute and Development Platforms: Workers, Pages, Workflows
  • Storage Solutions: R2, D1, Durable Objects, KV, Queues
  • AI and Machine Learning: AutoRAG, Workers AI, Vectorize, AI Gateway
  • Media Services: Images, Stream, Browser Rendering
  • Security and Zero Trust: Access, Tunnel, Gateway, Browser Isolation, WARP
  • Network Services: DDoS protection, Magic Transit, Magic WAN
  • Core Infrastructure: CDN, Cache, DNS, Hyperdrive
  • Developer Tools: Zaraz, Argo, Rulesets, Terraform
  • Account Management: Billing and account administration

Semantic Search Technology

Rather than requiring exact keyword matches, the search functionality uses semantic similarity to understand the intent behind your queries. This means you can ask questions in natural language and receive relevant documentation chunks that address your specific use case, even if the exact words you used don't appear in the documentation.

Migration Guidance

The server includes specialized access to migration guides, ensuring that you have authoritative, step-by-step instructions when transitioning between Cloudflare services. This is particularly important for complex migrations that require careful planning and execution.

Optimized Code Generation

With access to detailed prompts specifically designed for Cloudflare Workers development, the server enables AI assistants to generate more accurate and idiomatic code that follows Cloudflare's best practices and conventions.

Tools

search_cloudflare_documentation

Search through Cloudflare's documentation using semantic similarity matching.

Purpose: This is your primary tool for finding information about any Cloudflare product, feature, or service. The search returns semantically similar documentation chunks that are most relevant to your query.

When to use: Whenever you need information about Cloudflare products, troubleshooting guidance, API references, configuration details, or best practices for any Cloudflare service.

Parameters:

  • query (required, string): Your search query in natural language. Can be a question, a topic, a feature name, or a problem description.

Example queries:

  • "How do I set up a Worker to handle authentication?"
  • "R2 storage pricing and limits"
  • "Configure Zero Trust access policies"
  • "Stream live video with Cloudflare"

migrate_pages_to_workers_guide

Access the official guide for migrating Cloudflare Pages projects to Workers.

Purpose: Provides comprehensive instructions and best practices for migrating existing Pages projects to the Workers platform. This guide should always be consulted before beginning a Pages-to-Workers migration to ensure a smooth transition.

When to use: Before starting any migration from Cloudflare Pages to Workers, or when planning such a migration and needing to understand the implications and steps involved.

Parameters: None required. The tool returns the complete migration guide.

Prompts

workers-prompt-full

A comprehensive, detailed prompt specifically designed for generating Cloudflare Workers code and working with other Cloudflare developer platform products.

Purpose: This prompt contains expert guidance and best practices for code generation on Cloudflare's developer platform. It comes directly from Cloudflare's official documentation and represents the recommended approach for building applications on Workers and related services.

When to use: When generating new Workers code, creating Pages functions, working with Durable Objects, or developing any application on Cloudflare's developer platform. This prompt helps ensure that generated code follows Cloudflare's conventions and leverages platform features effectively.

Content source: https://developers.cloudflare.com/workers/prompt.txt

Use Cases

Rapid Development

Quickly access API references, configuration examples, and code snippets without leaving your development environment. Ask questions about specific features and receive relevant documentation instantly.

Troubleshooting

When encountering errors or unexpected behavior, search for solutions and debugging guidance directly through your AI assistant. The semantic search helps find relevant troubleshooting information even when you're not sure what's causing the issue.

Learning and Exploration

Discover new Cloudflare features and products by asking exploratory questions. Learn about capabilities you might not have known existed and understand how different Cloudflare services work together.

Migration Planning

Access detailed migration guides and understand the implications of moving between different Cloudflare services before making architectural decisions.

Code Generation

Generate more accurate, idiomatic Cloudflare Workers code by leveraging the official development prompts that incorporate Cloudflare's best practices and platform-specific patterns.

Getting Started

Once the server is configured and connected to your MCP client, you can immediately start querying Cloudflare documentation. Simply ask your AI assistant questions about Cloudflare products, and the assistant will automatically use the search tool to find relevant documentation.

For code generation tasks involving Cloudflare Workers or other developer platform products, the assistant can leverage the workers-prompt-full to ensure generated code follows best practices.

When planning a Pages-to-Workers migration, make sure to access the migration guide first to understand all the steps and considerations involved in the transition.

Benefits

Contextual Assistance

Receive documentation that's relevant to your specific question or problem, rather than browsing through entire documentation sections manually.

Time Savings

Eliminate context switching between your development environment, documentation websites, and your code editor. Access everything through your AI assistant.

Authoritative Information

All documentation comes directly from Cloudflare's official sources, ensuring accuracy and reliability.

Improved Code Quality

Generate better Cloudflare Workers code by leveraging official prompts and best practices embedded in the documentation.

Comprehensive Coverage

Access documentation for the entire Cloudflare ecosystem through a single interface, making it easier to work with multiple Cloudflare products simultaneously.