docs-to-mcp
A Cloudflare Worker that transforms Cloudflare AI Search (AutoRAG) instances into an MCP server for querying documentation. It enables AI models to search and retrieve relevant information from custom document sets stored in R2 buckets.
README
docs-to-mcp
A Cloudflare Worker that turns any AI Search (AutoRAG) instance into an MCP server.
Setup
-
Create an AI Search instance in the Cloudflare dashboard
- Create a R2 bucket and upload all your docs files - markdown, pdfs, text files etc.
- Go to Computer & AI > AI Search(AutorRAG)
- Create a new AI Search instance and select the R2 bucket as source (the one you previously created), just select the defaults.
-
Configure the Worker
Update
wrangler.jsoncwith your AI Search name:"vars": { "AI_SEARCH_NAME": "your-ai-search-name" } -
Install dependencies
pnpm install -
Deploy
pnpm run deploy
Usage
MCP Endpoints
| Endpoint | Transport | Description |
|---|---|---|
/mcp |
Streamable HTTP | Standard MCP HTTP transport |
How did I test this.
I trained it on a fictional TypeScript framework with APIs named after my cat, Ustaad, so I would know it's not hallucinating, you can find these files in fake-knowledge.md
Available Tools
search_docs
Search the documentation and return relevant chunks.
Parameters:
query(required): The search querymax_results(optional): Maximum results (1-50, default 10)rewrite_query(optional): Rewrite query for better retrievalscore_threshold(optional): Minimum score threshold (0-1)
ai_search_docs
Search documentation and get an AI-generated response with sources.
Parameters: Same as search_docs
Connect from MCP Clients
Claude Desktop / Cursor / etc:
{
"mcpServers": {
"docs": {
"command": "npx",
"args": ["mcp-remote", "https://your-worker.workers.dev/mcp"]
}
}
}
Direct remote MCP (if client supports it):
https://your-worker.workers.dev/mcp
Local Development
npm run dev
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.