Logo van Web Search MCP

Web Search MCP

Community
pranavms13

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

Uitgeverpranavms13
Repositoryweb-search-mcp
TaalPython
Forks
10
Sterren
15
Beschikbare tools
0
Transporttypestdio
Categorieën
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    Web Search MCP biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • Beschikbare tools: 0

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Belangstelling voor het opensourceproject

    Statistieken van de gekoppelde repository (sterren: 15, forks: 10).

Web Search MCP

Ask DeepWiki

A Model Context Protocol (MCP) server that provides web search functionality by scraping Google, DuckDuckGo, and Bing search results through a headless browser.

Install MCP Server

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

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 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 (redirect wrappers resolved to the real destination)
    • domain: Domain name
    • snippet: Text snippet (if enabled)
    • rank: Search result ranking
    • source_engine: Which engine produced the result (google, duckduckgo, or bing)

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

get_search_engine_status

Report the active browser backend and the availability of each search engine.

Returns:

  • Dictionary with a backend key (selenium or obscura) plus each engine name mapped to available or blocked.

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

  1. Install dependencies:

    bash
    # Using uv (recommended)
    uv sync
    
    # Or using pip
    pip install -e .
  2. Install a browser backend (pick one):

    • Selenium (default) — requires Chrome:

      • On macOS: brew install --cask google-chrome
      • On Ubuntu: sudo apt-get install google-chrome-stable
      • On 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

bash
# 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:

json
{
  "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

Browser Backends

The server can render pages with one of two interchangeable backends, selected via the BROWSER_BACKEND environment variable:

BackendValueNotes
Seleniumselenium (default)Headless Chrome via Selenium + webdriver-manager.
ObscuraobscuraObscura 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

  1. Install the Obscura binary (see its releases), e.g. on macOS:

    bash
    curl -LO https://github.com/h4ckf0r0day/obscura/releases/latest/download/obscura-x86_64-macos.tar.gz
    tar xzf obscura-x86_64-macos.tar.gz
  2. Run the server with Obscura selected:

    bash
    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 framework
  • selenium: Web browser automation (Selenium backend)
  • beautifulsoup4: HTML parsing
  • webdriver-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:

  1. Clone the repository
  2. Install in development mode: uv sync or pip install -e .
  3. Make your changes
  4. Run the test suite: uv run pytest test.py -q
  5. Smoke-test the server: python main.py (or BROWSER_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.

Gebruik Web Search MCP MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra Web Search MCP is verbonden, kun je de verbinding dus met verschillende AI-modellen in TypingMind gebruiken, zonder die voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg Web Search MCP toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus op ‘Gereed’ staat.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van Web Search MCP.
  4. Sla de serverlijst op.
  5. Vernieuw de pagina als je wilt controleren of de connectorstatus nog op ‘Gereed’ staat.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "pranavms13-web-search-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van Web Search MCP in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van Web Search MCP in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je Web Search MCP gebruiken om me hiermee te helpen?
Web Search MCP
Zeker. Ik heb het gelezen.
Dit vond ik met Web Search MCP.

Veelgestelde vragen

Waarvoor wordt de MCP-server Web Search MCP gebruikt?

Web Search MCP is een MCP-server waarmee compatibele AI-clients toegang krijgen tot externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik Web Search MCP MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je Web Search MCP gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom Web Search MCP MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als Web Search MCP verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik Web Search MCP MCP met TypingMind?

Web Search MCP werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt Web Search MCP MCP in TypingMind?

Web Search MCP biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om Web Search MCP MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als Web Search MCP authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇