cloudflare-search
Integrates with Brave Search API to provide web search results.
Integrates with DuckDuckGo Instant Answer API to provide web search results.
Integrates with Google Custom Search API to provide web search results.
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-searchsearch for latest AI breakthroughs"
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 Search
English | δΈζ
An aggregated search API service based on Cloudflare Workers
Supports MCP (Model Context Protocol), giving AI assistants (OpenClaw, Claude Code, Codex, OpenCode) real-time web search capabilities
Features
π Multi-engine Aggregation - Use multiple search engines at the same time (Google, Brave, DuckDuckGo, Bing)
π€ AI Enhanced (MCP) - Native support for Model Context Protocol, one-click search tool integration for OpenClaw / Claude Code / Codex
β‘ Parallel Search - All search engines are requested concurrently for faster results
π‘οΈ Fault Tolerance - Failure of a single engine does not affect others; unresponsive engines are automatically marked
β±οΈ Timeout Control - Configurable request timeout to avoid long waits
π Token Authentication - Supports token auth to protect the service from abuse
π CORS Support - Full cross-origin resource sharing support
π¨ Web Interface - Provides a clean search UI for easy testing
β‘ Zero-cost Operation - Cloudflare Workers free tier supports 100,000 requests per day
Related MCP server: Deep Search MCP Server
Page Preview

MCP Integration: Use in OpenClaw / Claude Code / AI Agents
With MCP (Model Context Protocol), AI assistants can directly call your search service and get real-time search results.
Installation and Configuration
1. Deploy the Service
First, follow the guide to Deploy Cloudflare Search
2. Add MCP Server Configuration
Edit your config file (configuration guide):
OpenClaw:
~/.openclaw/openclaw.jsonClaude Code:
~/.claude/config.json/~/.claude.jsonClaude Desktop macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonClaude Desktop Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"cloudflare-search": {
"command": "npx",
"args": ["-y", "@yrobot/cf-search-mcp"],
"env": {
"CF_SEARCH_URL": "https://your-worker.workers.dev",
"CF_SEARCH_TOKEN": "your-token-here"
}
}
}
}Environment Variables:
CF_SEARCH_URL: Worker deployment URL (required)CF_SEARCH_TOKEN: Auth token (required if your Worker hasTOKENconfigured)
3. Verify Installation
OpenClaw: Run
openclaw gateway restart+openclaw mcp listand check thatcloudflare-searchappearsClaude Code:
Run
/mcpin Claude Code, and you should see thecloudflare-searchtool.Or run
claude mcp list; seeingcloudflare-search: npx -y @yrobot/cf-search-mcp@latest - β Connectedmeans setup is successful
Installation Methods
Method 1: One-click Deployment (Recommended)
Click the "Deploy to Cloudflare Workers" button above and follow the prompts.
Method 2: Use Wrangler CLI
# 1. Install Wrangler
npm install -g wrangler
# 2. Login to Cloudflare
wrangler login
# 3. Clone the repository
git clone https://github.com/Yrobot/cloudflare-search.git
cd cloudflare-search
# 4. Deploy
wrangler deployMethod 3: Use Cloudflare Dashboard
Sign in to Cloudflare Dashboard
Go to Workers & Pages
Click Create Application > Create Worker
Click Upload to upload your local code folder
Select the cloned
cloudflare-searchfolderOr manually copy
worker.js,envs.js,utils/, and other files
Click Save and Deploy
Get Access URL
After deployment, you will get a Worker URL:
https://your-worker-name.your-subdomain.workers.devNote: The default domain may not be directly accessible in some regions. It is recommended to bind your own custom domain.
Usage
Method 1: Web Interface
Open your Worker URL directly and enter search keywords in the web UI:
https://$YOUR-DOMAIN/Method 2: API Request (GET)
Search using query parameters:
# Basic search
curl "https://$YOUR-DOMAIN/search?q=cloudflare"
# Specify search engines
curl "https://$YOUR-DOMAIN/search?q=cloudflare&engines=google,brave"
# Use token authentication (if TOKEN env var is configured)
curl "https://$YOUR-DOMAIN/search?q=cloudflare&token=$YOUR-TOKEN"Method 3: API Request (POST)
Submit search by POST form:
curl -X POST "https://$YOUR-DOMAIN/search" \
-d "q=cloudflare" \
-d "engines=google,brave"
-d "token=$YOUR-TOKEN" # if TOKEN env var is configuredAPI Reference
/search Endpoint
Used to execute search queries and return aggregated results.
Request Parameters
Parameter | Type | Required | Description | Example |
|
| yes | Search keyword |
|
|
| no | Specify search engines, separated by commas |
|
|
| no/yes | Access token (required when |
|
Supported Search Engines:
google- Google Search (requires API Key configuration)brave- Brave Searchduckduckgo- DuckDuckGo Searchbing- Bing Search
Response Value
{
query: string; // Search keyword
number_of_results: number; // Total number of results
enabled_engines: string[]; // Enabled search engine list
unresponsive_engines: string[]; // Unresponsive search engine list
results: Array<{
title: string; // Result title
description: string; // Result description
url: string; // Result link
engine: string; // Source engine
}>;
}Request Examples
# GET request
curl "https://$YOUR-DOMAIN/search?q=cloudflare&engines=google,brave"
# POST request
curl -X POST "https://$YOUR-DOMAIN/search" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "q=cloudflare&engines=google,brave"Response Example
{
"query": "cloudflare",
"number_of_results": 15,
"enabled_engines": ["google", "brave", "duckduckgo"],
"unresponsive_engines": [],
"results": [
{
"title": "Cloudflare - The Web Performance & Security Company",
"description": "Cloudflare is on a mission to help build a better Internet...",
"url": "https://www.cloudflare.com/",
"engine": "google"
},
{
"title": "Cloudflare Workers",
"description": "Deploy serverless code instantly across the globe...",
"url": "https://workers.cloudflare.com/",
"engine": "brave"
}
]
}Search Engine Notes
Supported Search Engines
Engine | Description | Configuration Required | Enabled by Default |
Google Custom Search API | Requires | yes | |
Brave | Brave Search API | - | yes |
DuckDuckGo | DuckDuckGo Instant Answer API | - | yes |
Bing | Bing Search | - | no (unstable results) |
Basic Working Approach
Parallel Requests: All enabled search engines are requested concurrently to improve response speed
Timeout Control: Timeout of a single engine does not affect others; default timeout is 3 seconds
Result Aggregation: Merge all successfully returned results and mark their source engine
Fault Tolerance: Record unresponsive engines and return partial results instead of failing completely
Environment Variable Configuration
Environment Variables
Variable Name | Type | Default | Description |
|
|
| Timeout per search engine request (milliseconds) |
|
|
| |
|
|
| |
|
|
| Access token. Enables auth when configured to prevent abuse |
Notes:
Google Custom Search API free tier is limited to 100 requests per day
After
TOKENis configured, all requests must provide a valid token
Configuration Methods
Method 1: wrangler.toml File
Edit the [vars] section in wrangler.toml:
[vars]
GOOGLE_API_KEY = "your-google-api-key"
GOOGLE_CX = "your-google-custom-search-cx"
DEFAULT_TIMEOUT = "3000"
TOKEN = "your-secret-token-here"Method 2: Cloudflare Dashboard
Go to the Worker settings page
Find the Environment Variables section
Add variables and save
Use Cases
1. Aggregated Search Service
Build your own aggregated search API and combine results from multiple search engines:
const response = await fetch(
"https://$YOUR-DOMAIN/search?q=javascript&engines=google,brave",
);
const data = await response.json();
console.log(`Found ${data.number_of_results} results`);2. Frontend Search Feature
Add search functionality to your website or app:
async function search(query) {
const response = await fetch(
`https://$YOUR-DOMAIN/search?q=${encodeURIComponent(query)}`,
);
const data = await response.json();
return data.results;
}3. Data Collection and Analysis
Collect results from multiple search engines for comparative analysis:
const engines = ["google", "brave", "duckduckgo"];
const results = await fetch(
`https://$YOUR-DOMAIN/search?q=AI&engines=${engines.join(",")}`,
);
const data = await results.json();
// Group by engine
const byEngine = data.results.reduce((acc, result) => {
acc[result.engine] = acc[result.engine] || [];
acc[result.engine].push(result);
return acc;
}, {});MCP Integration
With MCP (Model Context Protocol), AI assistants can directly call your search service and get real-time search results.
Notes and Reminders
π¨ Important Notes
Use a Custom Domain
The default Cloudflare
*.workers.devdomain may be inaccessible in some regionsIt is strongly recommended to bind your own domain for a better access experience
In Worker settings, click Triggers > Add Custom Domain to add a custom domain
Search Engine Limits
Google API free tier is limited to 100 requests per day
Other search engines generally do not have strict limits, but please use responsibly
Frequent requests may cause temporary rate limiting
Timeout Settings
Default timeout per engine is 3 seconds
Can be adjusted with
DEFAULT_TIMEOUTDo not set it too high to avoid long overall response times
π Security Configuration
Enable Authentication
Configure the
TOKENenvironment variable to protect your service from abuse:
Configure
TOKENinwrangler.tomlConfigure
TOKENin Cloudflare Worker Dashboard
Pass token in requests:
# Access homepage
https://$YOUR-DOMAIN?token=$YOUR-TOKEN
# Request API with token parameter in query/body
curl "https://$YOUR-DOMAIN/search?q=cloudflare&token=$YOUR-TOKEN"
curl -X POST "https://$YOUR-DOMAIN/search" \
-d "q=cloudflare" \
-d "token=$YOUR-TOKEN"FAQ
Q: Why do some search engines return empty results?
A: Possible reasons:
Search engine API is temporarily unavailable or timed out
No relevant results for the search keyword
Search engine has rate-limited access
Google requires API Key configuration before use
You can check the unresponsive_engines field in the response to see which engines did not respond.
Q: How can I improve search speed?
A: Recommendations:
Reduce the number of enabled search engines and only use the engines you need
Adjust timeout (
DEFAULT_TIMEOUT) appropriately
Q: Why is Bing search disabled by default?
A: Bing search results are currently not stable enough, and may return content with low relevance to the query. If needed, you can manually specify engines=bing in requests or modify DEFAULT_ENGINES in envs.js.
Q: How can I protect the service from abuse?
A: It is recommended to configure the TOKEN environment variable to enable authentication:
Set
TOKEN = "your-random-token"inwrangler.tomlOr add it in Environment Variables in Cloudflare Dashboard
After configuration, all requests must provide a valid token
Authentication failure returns a 401 error.
Disclaimer
This project is for learning and research purposes only. Users must comply with the following:
Lawful Use - Only use for legal search purposes. Do not use for illegal or infringing activities
Terms of Service - Comply with the terms of Cloudflare Workers and each search engine
API Limits - Follow usage limits and quotas of each search engine API
Use at Your Own Risk - Any consequences from using this service are the user's responsibility
Commercial Use - For commercial use, ensure compliance with relevant laws, regulations, and service terms
Contributing
Issues and Pull Requests are welcome!
License
Related Links
Support the Project
If this project helps you, you can buy the author a coffee β
Available Tools
2 toolssearchA
Search across multiple search engines (Google, Brave, DuckDuckGo, Bing) and return aggregated results. This tool provides comprehensive search results from multiple sources, with source attribution for each result.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query string | |
| engines | No | Optional: Array of search engines to use. If not specified, uses default engines. Available engines: google, brave, duckduckgo, bing |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must cover behavior. It mentions aggregated results with source attribution but omits rate limits, authentication needs, default engine list, and error handling for individual engine failures.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with no redundancy. First sentence states core purpose, second adds key detail about aggregation and source attribution. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has 2 parameters and no output schema. Description explains return format (aggregated results with source attribution). Missing details on default engine selection and result ordering, but sufficient for typical use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, baseline 3. Description largely restates schema information (query string, engines array with enum values) without adding deeper semantic meaning or usage tips beyond what's in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description uses specific verb 'Search across multiple search engines' and explicitly lists engines and result aggregation. Clearly distinguishes from sibling 'web_search' by emphasizing multi-engine capability.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus the sibling 'web_search'. Does not state prerequisites or scenarios where multi-engine search is preferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
web_searchA
Search the web for current information, news, or any topic. Uses multiple engines (Brave, DuckDuckGo, Google, Bing) simultaneously and returns aggregated results with source URLs. Use this when you need real-time information not in your training data.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query string | |
| engines | No | Optional: Array of search engines to use. If not specified, uses default engines. Available engines: google, brave, duckduckgo, bing |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries the burden. It mentions multi-engine usage and aggregation but does not disclose rate limits, latency, error handling, or result format details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with purpose, no wasted words. Efficient and clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description could detail return format (e.g., title, snippet, URL) but still provides sufficient context for a search tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 100% coverage with descriptions for both params. The description adds value by clarifying that engines are used simultaneously and results are aggregated, which goes beyond schema info.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it searches the web for current information, news, or topics, uses multiple engines simultaneously, and returns aggregated results with source URLs. It distinguishes from sibling 'search' by specifying multi-engine aggregation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Use this when you need real-time information not in your training data,' which provides clear context. However, it lacks guidance on when not to use it or differentiation from the sibling 'search' tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v1.1.0- First observed
search - First observed
web_search
TDQS
Both 'search' and 'web_search' have nearly identical descriptions, both performing aggregated search across multiple engines. An agent cannot distinguish which tool to use, as they appear to do the exact same thing.
Both tools use snake_case naming, which is consistent. However, the names 'search' and 'web_search' are not sufficiently distinct to reflect different functionality, leading to confusion.
With only 2 tools that essentially duplicate functionality, the tool set feels thin and redundant. A search server should offer at least a few distinct search modes or filters to be useful.
The tool set is severely incomplete. There are no tools for filtering by source, date, or type, no citation retrieval, and no configuration options. The duplication of search tools leaves obvious gaps in coverage.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Multi-engine search for AI agents. Trust scoring, local corpus, MCP-native. Self-hostable, BYOK.
Scrape, crawl and search the web for AI agents via MCP.
Provides AI assistants with access to Seltz's powerful Web Search capabilities.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables web search and site-specific search capabilities through the Deepsearch model. Provides unified access to broad web retrieval and targeted site search functionality within the MCP ecosystem.2185Apache 2.0
- FlicenseNot gradedqualityDmaintenanceProvides comprehensive search capabilities including web search, content extraction, news search, academic search, and AI-powered multi-source research. Enables natural language access to web content and research through a production-ready MCP server.-
- AlicenseAqualityDmaintenanceProvides privacy-focused web search capabilities with zero-data-retention for MCP-enabled applications. It allows users to execute search queries and retrieve ranked results using the Synthetic Search API.17MIT
- AlicenseNot gradedqualityAmaintenanceAggregates search results from multiple providers (web, academic, code, finance) with a unified JSON schema, providing both an HTTP API and an MCP server for AI agent tooling.55MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Yrobot/cloudflare-search'
If you have feedback or need assistance with the MCP directory API, please join our Discord server