Get the FREE Ultimate OpenClaw Setup Guide →

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.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone or install in editable mode:

    • uv sync
    • or: pip install -e .
  2. 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
  3. Run the MCP server locally:

    • python main.py
    • or use the installed script, for example: web-search-mcp
  4. 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

Sponsor this space

Reach thousands of developers