Web Search MCP

Web Search MCP

Enables web searching through Google, DuckDuckGo, and Bing using a headless Chrome browser, returning structured results with titles, URLs, and snippets. Also supports fetching and extracting text content from any webpage.

Category
Visit Server

README

Web Search MCP

Ask DeepWiki

A Model Context Protocol (MCP) server that provides web search functionality using a headless Chrome browser to scrape Google, DuckDuckGo and Bing search results.

Install MCP Server

Features

  • Google Search: Search Google and get structured results with titles, URLs, snippets, and rankings
  • Web Page Content: Fetch and extract text content from any webpage
  • Headless Browser: Uses Selenium with Chrome WebDriver for reliable scraping
  • MCP Compatible: Fully compatible with Claude Desktop and other MCP clients

Tools Available

search_web

Search the web using Google and return structured results.

Parameters:

  • query (string): The search query string
  • max_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 title
    • url: Full URL
    • domain: Domain name
    • snippet: Text snippet (if enabled)
    • rank: Search result ranking

get_webpage_content

Fetch and return the text content of a webpage.

Parameters:

  • url (string): The URL of the webpage to fetch
  • max_length (int, optional): Maximum content length (default: 5000, max: 20000)

Returns:

  • Dictionary with:
    • url: The requested URL
    • title: Page title
    • content: Extracted text content
    • length: Content length in characters

Installation

  1. Install dependencies:

    # Using uv (recommended)
    uv sync
    
    # Or using pip
    pip install -e .
    
  2. Install Chrome browser (required for Selenium):

    • On macOS: brew install --cask google-chrome
    • On Ubuntu: sudo apt-get install google-chrome-stable
    • On Windows: Download from Google Chrome website
  3. ChromeDriver will be automatically downloaded and managed by webdriver-manager.

Usage

Running the MCP Server

# Run directly
python main.py

# Or using the installed script
web-search-mcp

The 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/article

Configuration

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

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+
  • Chrome browser
  • Internet connection

Dependencies

  • fastmcp: MCP server framework
  • selenium: Web browser automation
  • beautifulsoup4: HTML parsing
  • webdriver-manager: Chrome driver management
  • requests: HTTP requests
  • lxml: XML/HTML parser

Limitations

  • Respects Google's rate limiting
  • Results may vary based on location and Google's algorithms
  • Some websites may block automated access
  • Chrome browser required for headless operation

Development

To modify or extend the functionality:

  1. Clone the repository
  2. Install in development mode: uv sync or pip install -e .
  3. Make your changes
  4. Test with 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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured