MCP WebSearch Server

MCP WebSearch Server

Enables web searching via Google Search and AI Mode, plus advanced web scraping capabilities including content extraction in multiple formats, link extraction, and batch scraping of multiple URLs.

Category
Visit Server

README

MCP WebSearch Server

MCP Server for web search and advanced web scraping. Uses SearchAPI.io for Google Search and AI Mode.

Quick Start

Option 1: Stdio (npx)

{
  "mcpServers": {
    "websearch": {
      "command": "npx",
      "args": ["-y", "mcp-websearch-server"],
      "env": {
        "SEARCHAPI_KEY": "your-api-key-here"
      }
    }
  }
}

Option 2: HTTP Server (Streamable HTTP)

Run as HTTP server:

MCP_TRANSPORT=http PORT=3000 npx mcp-websearch-server

Then configure MCP client with API key in URL or header:

Option A: API key in URL query parameter

{
  "mcpServers": {
    "websearch": {
      "url": "http://localhost:3000/mcp?apikey=YOUR_KEY",
      "transport": "streamable-http"
    }
  }
}

Option B: API key in header

{
  "mcpServers": {
    "websearch": {
      "url": "http://localhost:3000/mcp",
      "transport": "streamable-http",
      "headers": {
        "X-API-Key": "YOUR_KEY"
      }
    }
  }
}

Option C: Server-side default key

MCP_TRANSPORT=http SEARCHAPI_KEY=default-key PORT=3000 npx mcp-websearch-server

The server implements MCP Streamable HTTP transport (spec 2025-03-26) with:

  • Session management with Mcp-Session-Id headers
  • SSE streaming for server-initiated messages
  • Resumability support with Last-Event-ID
  • Per-user API key support via query param or header

Get your API key at searchapi.io

Tools

Tool Description
web_search Google Search with pagination, time filter, site filter
ai_search Google AI Mode - get AI-generated answers with sources
web_scrape Advanced scraper with multiple extract modes (text/markdown/structured)
get_links Extract links from a webpage with optional filter
scrape_multiple Scrape up to 5 URLs at once

Parameters

web_search

  • query - Search query
  • num_results - Number of results (1-20, default 10)
  • page - Page number for pagination (1-10)
  • time_period - Filter: last_hour, last_day, last_week, last_month, last_year
  • site - Limit to specific site (e.g., "github.com")

ai_search

  • query - Question or topic
  • image_url - Optional image URL for visual questions
  • location - Location for local queries

web_scrape

  • url - URL to scrape
  • selector - CSS selector (optional)
  • extract_mode - text, markdown, or structured
  • include_links - Include links in output
  • max_length - Max content length (1000-50000)

get_links

  • url - URL to extract links from
  • filter - Text filter for URLs/anchors

scrape_multiple

  • urls - Array of URLs (max 5)
  • max_per_page - Max content per page (500-5000)

Deployment

PM2 (Production)

  1. Edit ecosystem.config.js and set your SEARCHAPI_KEY
  2. Run: npm run pm2:start
  3. Check logs: npm run pm2:logs

Or manually:

MCP_TRANSPORT=http PORT=3000 SEARCHAPI_KEY=your-key pm2 start index.js --name mcp-websearch

Docker

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
ENV MCP_TRANSPORT=http PORT=3000
EXPOSE 3000
CMD ["node", "index.js"]

Roadmap

  • [ ] Add Serper.dev provider support
  • [ ] Add SerpAPI provider support
  • [ ] Provider auto-fallback

License

MIT

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
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
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
Qdrant Server

Qdrant Server

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

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured