MCP Web Search Server
This server provides LLM-optimized web search and content extraction with advanced anti-detection capabilities.
Search the web (
web_search): Search using DuckDuckGo (no API key required), Serper.dev, or Bing, with options to control the number of results (1–50), auto-select or specify a provider, and filter by recency (last N days).Fetch & extract page content (
fetch_url): Retrieve clean, readable markdown from any URL, with configurable content length (default 8000 chars) and optional image references — optimized for LLM consumption.Search and fetch in one step (
search_and_fetch): Perform a search and automatically fetch full content from top results (1–20) in a single call, with configurable per-page content length (default 5000 chars).Anti-detection browsing: Stealth headless browser with dynamic fingerprint generation (viewport, UA, locale, timezone), human-like behavior simulation (delays, scrolling, mouse events), BrowserContext isolation, and proxy support.
Resilient operation: Automatic retries with exponential backoff, per-provider circuit breakers, concurrency limiting, and persistent caching for robust performance.
Configurable: Extensive environment variable configuration for API keys, timeouts, cache TTL, result limits, and logging.
Provides web search capabilities using DuckDuckGo's search engine, delivering results optimized for LLM consumption without requiring an API key.
Click on "Deploy 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., "@MCP Web Search Server search for latest developments in quantum computing with top 5 results fetched"
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.
MCP Web Search Server
MCP server for web search with results optimized for LLMs and advanced bot-detection evasion.
Features
Search: DuckDuckGo (no API key), Serper.dev, Bing Web Search
Search aggregation:
fallbackmode ormergemode that queries multiple providers in parallel, deduplicates and ranks results by query relevanceContent extraction: Headless browser with stealth injection, browser page pool, and plain HTTP text fallback when pages are blocked
Anti-detection: Dynamic fingerprint generation (viewport, UA, locale, timezone), human-like behavior, proxy support
LLM formatting: Clean markdown via Turndown, metadata, structured data, links, images, PDF text extraction
OCR: Extract text from image URLs using
tesseract.jsBroken link checker: Scan a page and report the status of its outgoing links
Robustness: Retry with exponential backoff, circuit breaker per provider, token-bucket rate limiting, concurrency limiting, in-flight request deduplication, persistent cache, graceful shutdown
Observability: Structured JSON logging via Pino, latency/error metrics per provider and fetch operation
Config hot reload:
.envchanges are picked up automatically while the server is runningMultiple transports: stdio (default) or HTTP Streamable MCP transport
Related MCP server: webmcp
Installation
npm install
npm run buildConfiguration
Copy .env.example to .env and configure:
# Search providers (optional — DuckDuckGo works without API keys)
SERPER_API_KEY=your_key
BING_API_KEY=your_key
# Search aggregation: "fallback" or "merge"
SEARCH_MERGE_MODE=fallback
# Rate limits (requests per second per provider)
SERPER_RATE_LIMIT=10
BING_RATE_LIMIT=10
DUCKDUCKGO_RATE_LIMIT=1
# Anti-detect
STEALTH_ENABLED=true
HEADLESS=true
PROXY_LIST=http://proxy1:8080,http://proxy2:8080
USER_DATA_DIR=
# Browser page pool size
BROWSER_POOL_SIZE=2
# Limits
MAX_RESULTS=10
MAX_CONTENT_LENGTH=8000
MAX_RESPONSE_SIZE_BYTES=10000000
REQUEST_TIMEOUT=30000
CACHE_TTL=300
# Behavior
MIN_DELAY=500
MAX_DELAY=3000
MAX_CONCURRENT=2
SCROLL_TO_BOTTOM=true
# Fetch fallback when the browser is blocked
TEXT_FETCH_FALLBACK=true
# Optional persistent cache directory
CACHE_DIR=./cache
# Logging
LOG_LEVEL=info
# Transport: stdio or http
MCP_TRANSPORT=stdio
HTTP_HOST=127.0.0.1
HTTP_PORT=8080
# Ethics / safety
ROBOTS_TXT_ENABLED=true
ALLOWED_DOMAINS=
BLOCKED_DOMAINS=
# Debug only — weakens browser security
ALLOW_INSECURE_BROWSER_FLAGS=falseMCP Tools
web_search
Search by query.
{
"query": "latest AI developments 2025",
"num_results": 10,
"provider": "auto",
"recency_days": 7
}fetch_url
Fetch and clean a page.
{
"url": "https://example.com/article",
"max_length": 8000,
"include_images": false,
"include_links": false
}search_and_fetch
Search and automatically fetch top-N results.
{
"query": "quantum computing breakthrough",
"num_results": 5,
"fetch_content": true,
"max_content_length": 5000,
"include_images": false,
"include_links": false
}health_check
Check provider availability, circuit breaker state, and rate limits.
{}ocr_image
Extract text from an image URL.
{
"url": "https://example.com/screenshot.png",
"language": "eng"
}check_links
Fetch a page and check its outgoing links.
{
"url": "https://example.com/article",
"max_links": 20
}Claude Desktop Integration
{
"mcpServers": {
"web-search": {
"command": "node",
"args": ["C:\\Files\\git\\mcp-web-search\\dist\\index.js"],
"env": {
"SERPER_API_KEY": "..."
}
}
}
}HTTP Transport
Set MCP_TRANSPORT=http and HTTP_PORT=8080, then point an MCP client that supports Streamable HTTP at http://127.0.0.1:8080.
Anti-Detection & Reliability
The server uses a layered approach:
puppeteer-extra-plugin-stealth — hides automation fingerprints
Dynamic fingerprint generation — random Chrome on Windows/macOS/Linux with matching timezone
Browser page pool — reusable Puppeteer pages to reduce launch overhead
Human-like behavior — random delays, scroll, mouse events
Proxy support — random proxy selection from
PROXY_LISTText fetch fallback — plain HTTP fetch when the headless browser is blocked
Search result merging & ranking — combine multiple providers and rank by relevance
Circuit breaker — temporarily disables failing providers
Token-bucket rate limiting — per-provider rate limiting
Retry & concurrency limiting — exponential backoff, bounded parallelism, in-flight deduplication
Graceful shutdown — waits for active requests on SIGINT/SIGTERM
Robots.txt respect — honors site crawl rules (can be disabled)
Development
npm run dev # watch mode
npm test # run unit tests
npm run build # compile TypeScript
npm run lint # run ESLint
npm run format # format with PrettierDocker
docker build -t mcp-web-search .
docker run --rm -e SERPER_API_KEY=... mcp-web-searchLicense
MIT
Available Tools
3 toolsfetch_urlC
Fetch and extract clean text content from a URL. Optimized for LLM consumption with metadata.
Inputs: url (required), max_length, include_images.
search_and_fetchA
Search the web and automatically fetch content from top results. Returns combined LLM-formatted output.
Inputs: query (required), num_results, fetch_content, max_content_length.
web_searchB
Search the web for a query. Returns a list of results with title, URL, and snippet. Use provider='auto' to try all available search engines.
Inputs: query (required), provider, num_results, recency_days.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool serves a clearly distinct purpose: web_search returns a list of results, fetch_url extracts content from a specific URL, and search_and_fetch combines search with automatic fetching. No overlap or ambiguity.
Tool names consistently use snake_case and mostly follow a verb_noun pattern (fetch_url, web_search). The exception is search_and_fetch which uses two verbs, but it still clearly conveys its combined functionality.
With 3 tools, the set is on the smaller side but still covers the core needs of web searching and URL fetching. It feels slightly minimal but not insufficient for the stated purpose.
The tool surface covers searching, fetching individual pages, and a combined operation. Minor gaps like lacking custom search parameters or batch fetching exist, but the core workflow is functional.
Maintenance
Related MCP Connectors
Web search API and MCP server for developers building AI agents.
One MCP server for all web data. Scrape, search, crawl, and AI research in one install.
Free web search for AI agents. No API key required. Hosted MCP in active development.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides web search and content fetching using real Chrome browsers via CDP, bypassing bot detection and requiring no API keys.22MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for web search and content extraction using DuckDuckGo or SearXNG, with Playwright-based fetching and LLM-powered data extraction.139MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for internet search via direct Google and DuckDuckGo HTML scraping with AI-powered result normalization and optional summarization, requiring no API keys for search.MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for multi-engine web search and web page fetching, supporting parallel search, content extraction, and optional LLM-powered search summarization and deep search.5MIT