Logo di 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.

Pubblicato dapranavms13
Repositoryweb-search-mcp
LinguaPython
Fork
10
Stelle
15
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    Web Search MCP mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • Strumenti disponibili: 0

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni se il server li fornisce.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse della comunità open source

    Stelle: 15; fork: 10 (repository collegato).

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.

Usa Web Search MCP MCP con più modelli AI

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso Web Search MCP, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura connettore.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura connettore e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con l’opzione «Questo dispositivo» selezionata
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi Web Search MCP come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di Web Search MCP.
  4. Salva l'elenco dei server.
  5. Se vuoi verificare che il connettore sia ancora pronto, aggiorna la pagina.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "pranavms13-web-search-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di Web Search MCP, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di Web Search MCP.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare Web Search MCP per aiutarmi con questa attività?
Web Search MCP
Certo. L’ho letto.
Ecco cosa ho trovato con Web Search MCP.

Domande frequenti

A cosa serve il server MCP Web Search MCP?

Web Search MCP è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare il server MCP Web Search MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare Web Search MCP con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP Web Search MCP con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando Web Search MCP, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego il server MCP Web Search MCP a TypingMind?

Web Search MCP funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre il server MCP Web Search MCP in TypingMind?

Web Search MCP mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare il server MCP Web Search MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se Web Search MCP richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇