Build-time integration for Astro projects that generates search indexes from site content for MCP-based search functionality.
Deploys a Cloudflare Worker with Durable Objects and R2 storage that provides MCP search tools for static websites, enabling full-text search with fuzzy matching across site content.
Generates search indexes from Hugo site content with TOML or YAML frontmatter for MCP-based search functionality.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cloudflare MCP Server for Static Sitessearch my documentation for how to deploy a static site"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cloudflare MCP Server for Static Sites
Turn any static website into an MCP-searchable knowledge base. Deploy a Cloudflare Worker that provides Model Context Protocol search tools for AI assistants like Claude, enabling them to search and retrieve content from your site.
Features
Full-text search with fuzzy matching via Fuse.js
Dynamic tool naming — tools automatically include your site's prefix (e.g.,
search_myblog)Multiple adapters — Astro, Hugo, or generic markdown
Fast R2 storage — search index lives in Cloudflare R2
Zero cold starts — uses Durable Objects for persistent MCP sessions
Simple deployment — single
wrangler deploycommand
Quick Start
1. Clone and Install
2. Configure
Edit wrangler.jsonc with your settings:
3. Create R2 Bucket
4. Generate and Upload Index
Choose an adapter for your site (see Adapters below):
5. Deploy
Your MCP server is now live. Connect an MCP client to start searching.
Adapters
Adapters generate the search index from your content. Each outputs a search-index.json file in the v3.0 index format.
Generic (Markdown)
For any site with markdown files and YAML frontmatter.
See adapters/generic/README.md for full options.
Astro
Build-time integration for Astro projects.
See adapters/astro/README.md for setup instructions.
Hugo
Node.js script for Hugo sites with TOML or YAML frontmatter.
See adapters/hugo/README.md for details.
Configuration
wrangler.jsonc
Key settings to customize:
Field | Description |
| Worker name (appears in Cloudflare dashboard) |
| Your custom domain for the MCP endpoint |
| R2 bucket storing your search index |
Custom domain vs workers.dev:
Index Format
The search index follows the v3.0 schema:
Field | Required | Description |
| Yes | Human-readable site name |
| Yes | Domain without protocol |
| No | Tool name prefix (default: |
| Yes | Path starting with |
| Yes | Page title |
| No | Full content for search (recommended) |
Validate your index:
MCP Client Setup
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Claude Code
Cursor
Add to Cursor settings (mcp.json):
Verify Connection
Once connected, your MCP client will have access to these tools:
Tool | Description |
| Search content by keywords |
| Get full article by URL path |
| Index statistics |
Example queries:
"Search my-site for authentication tutorials"
"Get the article at /getting-started"
Creating Custom Adapters
Build an adapter for your static site generator by outputting the v3.0 index format.
Minimum Requirements
Scan content files — find markdown, HTML, or other content
Extract metadata — title, date, topics from frontmatter
Extract body text — full content for search
Generate URL paths — map file paths to site URLs
Output JSON — write
search-index.json
Template
Upload to R2
After generating, upload to your R2 bucket:
Development
License
MIT