web-search
A Model Context Protocol (MCP) server that provides web search functionality using a headless Chrome browser to scrape Google, DuckDuckGo and Bing search results.
claude mcp add --transport stdio pranavms13-web-search-mcp uvx git+https://github.com/pranavms13/web-search-mcp
How to use
This MCP server adds web search capabilities via a headless Chrome browser using Selenium to scrape results from Google, DuckDuckGo, and Bing, and to fetch page content. It exposes two tools: search_web and get_webpage_content. The search_web tool accepts a query string and returns a list of results with title, URL, domain, an optional snippet, and a rank. The get_webpage_content tool fetches and extracts the visible text content from a given URL, returning the page title, URL, content, and content length. You can connect to this MCP server with an MCP client such as Claude Desktop and issue structured tool calls to get search results or page content. Example workflows include performing a Google-based web search and then pulling the content of a result page for deeper analysis.
How to install
Prerequisites:
- Python 3.10+
- pip (Python package manager)
- Chrome browser installed (headless operation requires it)
- Internet access
Installation steps:
-
Clone or install in editable mode:
- uv sync
- or: pip install -e .
-
Install Chrome and the ChromeDriver will be managed automatically by webdriver-manager during runtime.
- Chrome installation varies by OS:
- macOS: brew install --cask google-chrome
- Ubuntu: sudo apt-get install google-chrome-stable
- Windows: Download from the Google Chrome site
- Chrome installation varies by OS:
-
Run the MCP server locally:
- python main.py
- or use the installed script, for example: web-search-mcp
-
If using Claude Desktop or another MCP client, configure the MCP server as an external source (see configuration example in the readme).
Additional notes
Notes and tips:
- The server uses a headless Chrome browser via Selenium, so ensure Chrome is installed and accessible on the host.
- Network access is required for web searches and page fetching.
- The tool respects rate limits and may be affected by target site protections; consider staggering requests.
- You can fine-tune Chrome options or Selenium settings if you need to adjust timeouts or headless behavior in your deployment.
- Environment variables can be added for advanced configurations (e.g., increasing timeouts or controlling headless mode).
Related MCP Servers
web-eval-agent
An MCP server that autonomously evaluates web applications.
mcp-neo4j
Neo4j Labs Model Context Protocol servers
Gitingest
mcp server for gitingest
web-scout
A powerful MCP server extension providing web search and content extraction capabilities. Integrates DuckDuckGo search functionality and URL content extraction into your MCP environment, enabling AI assistants to search the web and extract webpage content programmatically.
fhir
FHIR MCP Server – helping you expose any FHIR Server or API as a MCP Server.
unitree-go2
The Unitree Go2 MCP Server is a server built on the MCP that enables users to control the Unitree Go2 robot using natural language commands interpreted by a LLM.