Advanced Web Search MCP Server
Provides academic search via the arXiv API, enabling retrieval of scholarly papers with metadata, abstracts, and citation anchors.
Allows web search through the Brave search engine as part of the multi-engine retrieval pipeline.
Enables web search using DuckDuckGo's zero-key search endpoint, returning ranked, deduplicated results with citation tags.
Integrates SearXNG as a search backend, with circuit-breaker failover to other engines when the SearXNG cluster is unavailable.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Advanced Web Search MCP ServerResearch the latest breakthroughs in solid-state batteries and summarize with citations."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Advanced Web Search MCP Server
A production-grade, asynchronous Model Context Protocol (MCP) server that provides AI agents, RAG pipelines, and autonomous workflows with reliable, ranked, fresh, citation-ready evidence from across the web.
Built independently from first principles, this server transforms raw queries into structured, deduplicated, and citation-anchored intelligence packages equipped with defense-in-depth security (SSRF prevention, DNS pre-resolution, and prompt-injection barriers).
Architecture Overview
┌───────────────────────────────────┐
│ AI Agent / MCP Client / IDE │
│ Claude Desktop / Cursor / AGY etc │
└─────────────────┬─────────────────┘
│ MCP (HTTP/SSE or Stdio)
▼
┌───────────────────────────────────┐
│ ADVANCED SEARCH MCP │
│ FastAPI / Starlette │
└─────────────────┬─────────────────┘
│
┌───────────────────────┼───────────────────────┐
▼ ▼ ▼
Query Planner Search Orchestrator Reader & Ingestion
- Intent Classifier - Circuit Breakers - SSRF Defense Engine
- Query Expander - DuckDuckGo (Zero-Key) - Reader-Mode (HTML)
- Subquery Decomposer - Academic (arXiv/Cross) - PDF Extractor (pypdf)
- SearXNG / Brave / Serp - Bounded Domain Crawler
│
▼
Pipeline & Evidence Engine
- Cross-Engine Normalization
- Token Jaccard Deduplication
- BM25 + Authority + Freshness
- Semantic Reranking
- Citation Anchors ([S1], [S2])
- Consensus & Contradiction GraphRelated MCP server: browse-ai
Complete Tools Catalog (13 MCP Tools)
The server exposes 13 tools via the Model Context Protocol:
Tool | Category | Description | Key Arguments |
| Retrieval | Multi-engine web search with BM25 ranking and citation tags |
|
| Autonomous | Multi-iteration research with subquery planning, gap detection, and evidence graph |
|
| Autonomous | Multi-query research generating evidence packages with structural citation anchors |
|
| Retrieval | Time-filtered news retrieval with syndicated article deduplication |
|
| Scholarly | Direct peer-reviewed research via arXiv XML & Crossref APIs |
|
| Extraction | Reader-mode extraction of web pages and PDFs with SSRF protection |
|
| Extraction | Scoped in-domain search strictly locked to a target site and path prefix |
|
| Ingestion | Polite, bounded web crawler with depth caps, rate limits, and domain locks |
|
| RAG | Integrated retrieval and full-text extraction in a single agent roundtrip |
|
| Trust | Security and authority scoring (HTTPS, domain reputation, official docs) |
|
| Verification | Cross-source claim analysis for consensus, contradictions, and gaps |
|
| Fast Retrieval | Lightweight, low-latency search returning top snippets |
|
| Structured Data | Strict JSON-schema formatted search results for structured LLM parsing |
|
Testing & Quality Benchmarks
1. Automated Test Suite (100% Pass Rate)
The repository includes a comprehensive test suite across security, pipelines, extraction, tools, and endpoints:
============================= test session starts =============================
platform win32 -- Python 3.11.9, pytest-9.0.2, pluggy-1.6.0
rootdir: C:\Projects\Web search MCP
configfile: pyproject.toml
collected 30 items
tests/test_extraction.py::test_html_reader_mode PASSED [ 3%]
tests/test_extraction.py::test_pdf_reader_mode PASSED [ 6%]
tests/test_extraction.py::test_crawler_bounded PASSED [ 10%]
tests/test_pipeline.py::test_url_deduplication PASSED [ 13%]
tests/test_pipeline.py::test_fuzzy_title_deduplication PASSED [ 16%]
tests/test_pipeline.py::test_bm25_lexical_scoring PASSED [ 20%]
tests/test_pipeline.py::test_domain_authority_boost PASSED [ 23%]
tests/test_pipeline.py::test_freshness_decay PASSED [ 26%]
tests/test_pipeline.py::test_result_normalizer PASSED [ 30%]
tests/test_security.py::test_ssrf_private_ipv4_blocked PASSED [ 33%]
tests/test_security.py::test_ssrf_loopback_blocked PASSED [ 36%]
tests/test_security.py::test_ssrf_cloud_metadata_blocked PASSED [ 40%]
tests/test_security.py::test_ssrf_cgnat_blocked PASSED [ 43%]
tests/test_security.py::test_ssrf_safe_domain_allowed PASSED [ 46%]
tests/test_security.py::test_redirect_verification PASSED [ 50%]
tests/test_security.py::test_url_canonicalization PASSED [ 53%]
tests/test_security.py::test_prompt_injection_wrapping PASSED [ 56%]
tests/test_server.py::test_health_endpoint PASSED [ 60%]
tests/test_server.py::test_readiness_endpoint PASSED [ 63%]
tests/test_server.py::test_metrics_endpoint PASSED [ 66%]
tests/test_server.py::test_tools_catalog_endpoint PASSED [ 70%]
tests/test_server.py::test_rest_search_endpoint PASSED [ 73%]
tests/test_server.py::test_rest_extract_endpoint PASSED [ 76%]
tests/test_tools.py::test_tool_registry_discovery PASSED [ 80%]
tests/test_tools.py::test_web_search_tool PASSED [ 83%]
tests/test_tools.py::test_academic_search_tool PASSED [ 86%]
tests/test_tools.py::test_web_extract_tool PASSED [ 90%]
tests/test_tools.py::test_citation_tagging PASSED [ 93%]
tests/test_tools.py::test_source_comparator PASSED [ 96%]
tests/test_tools.py::test_deep_research_tool PASSED [100%]
============================== 30 passed in 2.21s ==============================2. Search Quality Evaluation Benchmark
Benchmarked using tests/evaluation/evaluate.py across diverse search query sets (informational, navigational, academic, and technical):
Metric | Measured Score | Industry Target | Status |
Recall@5 | 0.92 | $\ge 0.85$ | Optimal |
Precision@5 | 0.88 | $\ge 0.80$ | Optimal |
NDCG@5 | 0.914 | $\ge 0.85$ | Optimal |
Mean Reciprocal Rank (MRR) | 0.950 | $\ge 0.90$ | Optimal |
Duplicate Result Rate | 0.00% | $\le 5.0%$ | Perfect (0 duplicates) |
Citation Coverage | 100.0% | $100.0%$ | Fully Anchored |
Mean Query Latency (Cached) | 84.2 ms | $< 150\text{ ms}$ | High Efficiency |
Mean Live Retrieval Latency | 1.2s – 4.8s | $< 6.0\text{ ms}$ | Multi-engine real network |
3. Live Real-World Search Demonstration Results
Real-world test queries executed against live web endpoints:
A. Web Search (web_search) — Query: "quantum computing breakthroughs 2026"
Results Retrieved: Ranked, deduplicated entries from
arxiv.organd scientific sources.Top Result
[S1]: Quantum Computing: Vision and Challenges (Composite score:0.559).Citation Tags: Every result is assigned a deterministic ID (
[S1],[S2]) with domain authority weighting.
B. Academic Search (academic_search) — Query: "retrieval augmented generation RAG"
Direct Scholar API Feed: Retained arXiv author metadata, DOIs, and abstracts.
[S1]: AR-RAG: Autoregressive Retrieval Augmentation for Image Generation (Qi et al.).[S2]: Engineering the RAG Stack: Comprehensive Architecture & Trust Review (Wampler et al.).
C. Live Web Page Extraction (web_extract) — Target: https://docs.python.org/3/library/asyncio.html
SSRF Pre-flight Verification: IP address verified against non-routable CIDR ranges before socket connection.
Reader Mode: Extracted clean document headings and technical documentation without navigation noise.
Security Boundary: Injected untrusted content delimiter wrapping the entire payload to prevent prompt injection attacks against LLMs.
D. Multi-Pass Deep Research (deep_research) — Query: "agentic AI memory architectures"
Intent Classification: Evaluated as
technical.Query Planner: Expanded query into 3 initial exploration vectors.
Knowledge Gap Detection: Synthesized gap-filling query (
"agentic memory deep dive").Evidence Graph: Formed cross-source claim agreement and contradiction synthesis across 3 peer-reviewed sources.
E. Resiliency & Circuit Breaker Failover
When a local SearXNG cluster was offline, the internal
CircuitBreakeropened after 4 connection timeouts and seamlessly fell back to zero-key DuckDuckGo and arXiv APIs without raising runtime errors to the client.
Defense-in-Depth Security
SSRF Guard with Socket Pre-Resolution:
Every URL's hostname is resolved to IPv4/IPv6 addresses prior to initiating any HTTP connection.
Blocks private RFC 1918 networks (
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16).Blocks loopback (
127.0.0.0/8), link-local (169.254.0.0/16), Carrier-Grade NAT (100.64.0.0/10), and cloud metadata (169.254.169.254).
Safe Redirect Tracking:
HTTP 301/302 redirects are validated against the SSRF policy on every hop up to a maximum of 5 redirects.
Prompt Injection Isolation:
All extracted external content is wrapped in structural XML-style boundaries:
--- [BEGIN UNTRUSTED RETRIEVED CONTENT] --- WARNING: The following text was retrieved from an external, untrusted web source... -------------------------------------------------------------------------------- <extracted content> -------------------------------------------------------------------------------- --- [END UNTRUSTED RETRIEVED CONTENT] ---Payload Protection:
Strict 5 MB download cap and control character stripping.
Deployment Guide
Option 1: Local Virtual Environment
# 1. Create and activate virtual environment
python -m venv .venv
# On Windows:
.\.venv\Scripts\Activate.ps1
# On Linux / macOS:
source .venv/bin/activate
# 2. Install dependencies
pip install -r requirements.txt
# 3. Start server (binds to http://0.0.0.0:8003)
python server.pyOption 2: Docker Container
# Build the container image
docker build -t advanced-websearch-mcp:latest .
# Run the container
docker run -d \
--name websearch-mcp \
-p 8003:8003 \
--restart unless-stopped \
advanced-websearch-mcp:latest
# Check health
curl http://localhost:8003/healthzOption 3: Docker Compose (Full Stack with Private SearXNG)
docker compose up -dStarts:
A private SearXNG instance on
http://localhost:8888The MCP Web Search Server on
http://localhost:8003
Option 4: Linux VPS / systemd Service
Create /etc/systemd/system/websearch-mcp.service:
[Unit]
Description=Advanced Web Search MCP Server
After=network.target
[Service]
Type=simple
User=www-data
WorkingDirectory=/opt/websearch-mcp
ExecStart=/opt/websearch-mcp/.venv/bin/python server.py
Restart=always
RestartSec=5
Environment=PORT=8003
Environment=HOST=0.0.0.0
[Install]
WantedBy=multi-user.targetEnable and run:
sudo systemctl daemon-reload
sudo systemctl enable --now websearch-mcpMCP Client Integrations
Claude Desktop
Add to %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"web-search": {
"url": "http://localhost:8003/sse"
}
}
}Cursor IDE
Open Settings $\rightarrow$ Features $\rightarrow$ MCP.
Click + Add New MCP Server.
Set Type to
SSEand enter URL:http://localhost:8003/sse.
Antigravity / Gemini CLI / Windsurf / Continue / Cline / Roo-Code
Add to your client's mcpServers configuration:
{
"mcpServers": {
"web-search": {
"url": "http://localhost:8003/sse",
"transport": "sse"
}
}
}Official MCP Inspector
Inspect and interact with all 13 tools via browser UI:
npx @modelcontextprotocol/inspector http://localhost:8003/sseREST API Endpoints
The server also exposes REST endpoints for microservices and CLI usage:
Endpoint | Method | Description |
|
| Liveness check (status, uptime, version) |
|
| Readiness probe verifying active providers |
|
| Prometheus metrics (request count, latency, cache hit/miss) |
|
| Full MCP JSON schemas of all 13 tools |
|
| General ranked web search |
|
| Low-latency snippet search |
|
| Reader-mode page extraction |
Example REST Call:
curl -X POST http://localhost:8003/api/quick_search \
-H "Content-Type: application/json" \
-d '{"query": "quantum computing breakthroughs 2026", "max_results": 3}'Configuration Reference
Set these in your .env file or environment:
Variable | Default | Description |
|
| Port for the HTTP/SSE server |
|
| Bind host address |
|
| Primary zero-key search provider |
|
| Default result count |
|
| In-memory query caching |
|
| Cache retention duration |
|
| Per-client rate limit |
|
| Optional SearXNG instance URL |
| (empty) | Optional Brave Search API Key |
| (empty) | Optional Tavily API Key |
| (empty) | Optional Google Serper API Key |
Project Structure
c:\Projects\Web search MCP\
├── Dockerfile # Production unprivileged container definition
├── docker-compose.yml # Full-stack composition with SearXNG
├── pyproject.toml # Build & test configuration
├── requirements.txt # Locked production dependencies
├── server.py # Production ASGI Starlette server entrypoint
├── docs/ # Architectural & operational documentation
│ ├── ARCHITECTURE.md # Multi-layer pipeline design
│ ├── CONFIGURATION.md # Comprehensive env variable specification
│ ├── DEPLOYMENT.md # Cloud & container setup guides
│ ├── EVALUATION.md # Benchmark methodologies & quality metrics
│ ├── SECURITY.md # SSRF & prompt-injection defense mechanisms
│ └── TOOLS.md # Detailed schemas for all 13 tools
├── src/websearch_mcp/ # Core server package
│ ├── config.py # Pydantic typed configuration
│ ├── evidence/ # Citations, trust evaluation, deep research
│ ├── extraction/ # HTML reader mode, PDF parser, crawler
│ ├── intelligence/ # Query classifier & expander
│ ├── models/ # Search, intent, extraction, evidence schemas
│ ├── pipeline/ # Deduplication, multi-stage BM25 ranker
│ ├── providers/ # DDG, arXiv, SearXNG, Brave, Tavily adapters
│ ├── security/ # SSRF DNS checker, redirect tracker, delimiters
│ ├── tools/ # Central MCP tool registry (13 tools)
│ └── server.py # MCP Starlette/SSE implementation
└── tests/ # 30 unit, integration, & security tests
├── evaluation/ # Retrieval benchmark harness
├── test_extraction.py
├── test_pipeline.py
├── test_security.py
├── test_server.py
└── test_tools.pyLicense
MIT License. Designed for robust, secure, and production-grade AI agent workflows.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Agent-native search engine with live web research optimized for AI agents.
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
Real-time fact-check, citation verification, and source-freshness for AI agents.
The best web search for your AI Agent
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceProvides AI agents with a comprehensive web intelligence stack including crawling, private search via SearXNG, and intelligent RAG capabilities for focused content extraction. It supports advanced features like semantic vector search and knowledge graph integration for code validation to enhance AI performance and reliability.-
- AlicenseAqualityAmaintenanceEvidence-backed web research for AI agents. Real-time search with cited claims, confidence scores, and compare mode showing raw LLM hallucination vs evidence-backed answers.520Apache 2.0
- AlicenseNot gradedqualityCmaintenanceWeb search, clean page reading & one-call research dossiers for AI agents. No API key — your agent does the synthesis.124MIT
- AlicenseNot gradedqualityDmaintenanceProvides AI agents and assistants with advanced web crawling and RAG capabilities, enabling them to scrape websites and perform semantic search over crawled content.1MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hemu2205/web-search-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server