Web Search MCP
Provides web search functionality by scraping DuckDuckGo search results using a headless Chrome browser, returning structured results with titles, URLs, snippets, and rankings.
Provides web search functionality by scraping Google search results using a headless Chrome browser, returning structured results with titles, URLs, snippets, and rankings.
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., "@Web Search MCPsearch for latest Python web scraping tutorials and show top 3 results"
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.
Web Search MCP
A Model Context Protocol (MCP) server that provides web search functionality by scraping Google, DuckDuckGo, and Bing search results through a headless browser.
Features
Multi-Engine Search: Searches Google, DuckDuckGo, and Bing with automatic fallback when an engine is blocked or returns nothing
Structured Results: Titles, URLs, domains, snippets, and rankings — with redirect URLs unwrapped to their real destinations
Web Page Content: Fetch and extract text content from any webpage
Pluggable Browser Backends: Selenium + headless Chrome (default) or the lightweight Obscura headless browser, selected via an environment variable
MCP Compatible: Fully compatible with Claude Desktop and other MCP clients
Related MCP server: Web Search MCP Server
Tools Available
search_web
Search the web across multiple engines (Google → DuckDuckGo → Bing) with automatic fallback and return structured results.
Parameters:
query(string): The search query stringmax_results(int, optional): Maximum number of results to return (default: 10, max: 100)include_snippets(bool, optional): Whether to include text snippets (default: true)
Returns:
List of search results with:
title: Page titleurl: Full URL (redirect wrappers resolved to the real destination)domain: Domain namesnippet: Text snippet (if enabled)rank: Search result rankingsource_engine: Which engine produced the result (google,duckduckgo, orbing)
get_webpage_content
Fetch and return the text content of a webpage.
Parameters:
url(string): The URL of the webpage to fetchmax_length(int, optional): Maximum content length (default: 5000, max: 20000)
Returns:
Dictionary with:
url: The requested URLtitle: Page titlecontent: Extracted text contentlength: Content length in characters
get_search_engine_status
Report the active browser backend and the availability of each search engine.
Returns:
Dictionary with a
backendkey (seleniumorobscura) plus each engine name mapped toavailableorblocked.
reset_search_engines
Clear the list of engines marked as blocked during the session (useful if an engine recovers).
Returns:
A status message string.
Installation
Install dependencies:
# Using uv (recommended) uv sync # Or using pip pip install -e .Install a browser backend (pick one):
Selenium (default) — requires Chrome:
On macOS:
brew install --cask google-chromeOn Ubuntu:
sudo apt-get install google-chrome-stableOn Windows: Download from the Google Chrome website
ChromeDriver is downloaded and managed automatically by webdriver-manager.
Obscura — no Chrome required. See the Browser Backends section below.
Usage
Running the MCP Server
# Run directly
python main.py
# Or using the installed script
web-search-mcpThe server will start and listen for MCP connections.
Using with Claude Desktop
Add this configuration to your Claude Desktop MCP settings:
{
"mcpServers": {
"web-search-mcp": {
"command": "uvx",
"args": ["git+https://github.com/pranavms13/web-search-mcp"]
}
}
}Example Usage in Claude
Once connected, you can use the tools like this:
Search for "python web scraping tutorials" and show me the top 5 results.
Get the content from this webpage: https://example.com/articleConfiguration
The web searcher uses these Chrome options by default:
Headless mode (no visible browser window)
Window size: 1920x1080
User agent: Modern Chrome browser
Security flags for running in containers
Browser Backends
The server can render pages with one of two interchangeable backends, selected via the BROWSER_BACKEND environment variable:
Backend | Value | Notes |
Selenium |
| Headless Chrome via Selenium + webdriver-manager. |
Obscura |
| Obscura headless browser via its CLI. Lightweight, stealthy, no Chrome needed. |
Both backends produce fully JS-rendered HTML, which is then parsed with BeautifulSoup, so search results are identical in shape regardless of backend.
Using Obscura
Install the Obscura binary (see its releases), e.g. on macOS:
curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-x86_64-macos.tar.gz tar xzf obscura-x86_64-macos.tar.gzRun the server with Obscura selected:
BROWSER_BACKEND=obscura web-search-mcp
If obscura is not on your PATH, point to it explicitly with OBSCURA_BIN=/full/path/to/obscura. When the binary cannot be found, the server logs a warning and falls back to the Selenium backend automatically.
The active backend is reported by the get_search_engine_status tool under the backend key.
Error Handling
The tool includes comprehensive error handling for:
Network timeouts
WebDriver failures
Page parsing errors
Invalid URLs
Errors are logged and graceful fallbacks are provided.
Requirements
Python 3.10+
A browser backend: Chrome (Selenium) or the Obscura binary
Internet connection
Dependencies
fastmcp: MCP server frameworkselenium: Web browser automation (Selenium backend)beautifulsoup4: HTML parsingwebdriver-manager: Chrome driver management (Selenium backend)lxml: XML/HTML parser
The Obscura backend has no Python dependency — it is invoked as an external CLI binary.
Limitations
Search engines may rate-limit or block automated access; the multi-engine fallback mitigates but does not eliminate this
Google in particular often blocks non-stealth headless traffic — DuckDuckGo and Bing typically remain available as fallbacks
Results may vary based on location and each engine's ranking
The Selenium backend requires Chrome; the Obscura backend requires the Obscura binary
Development
To modify or extend the functionality:
Clone the repository
Install in development mode:
uv syncorpip install -e .Make your changes
Run the test suite:
uv run pytest test.py -qSmoke-test the server:
python main.py(orBROWSER_BACKEND=obscura OBSCURA_BIN=/path/to/obscura python main.py)
License
This project is licensed under MIT License. You can check it out at - LICENSE
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
This server cannot be deployed
Maintenance
Related MCP Connectors
Web search, fetch, extract, and research for AI agents. Markdown output + AI-synthesized answers.
Web search, URL content extraction to Markdown, site mapping, and recursive web crawler.
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
Web search, browser automation, scraping, crawling and CAPTCHA solving for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables web searching through DuckDuckGo and fetching content from webpages. Provides search capabilities with configurable result limits and webpage content extraction for AI assistants.-
- FlicenseNot gradedqualityCmaintenanceEnables web search across multiple search engines (DuckDuckGo, Bing, Startpage) with parallel execution and result deduplication. Also provides web page content extraction capabilities.2-
- AlicenseBqualityDmaintenanceEnables web search through DuckDuckGo and webpage content fetching with intelligent text extraction. Features built-in rate limiting and LLM-optimized result formatting for seamless integration with language models.2MIT
- AlicenseAqualityBmaintenanceEnables web search without API keys using DuckDuckGo and Bing search engines, and retrieves webpage content. Supports multiple search engines simultaneously with privacy protection and asynchronous processing.237 PyPI9MIT