🌐 MCP Web Engine & Search Gateway
Privacy-First, Self-Hostable & SSRF-Hardened MCP Server & Web Engine for AI Agents MCP Specification 2026-07-28 Pure Stateless Core & Stdio / HTTP Dual Mode
⚡ Instant Quickstart with uvx (Recommended for AI Agents)
AI agents (Claude Desktop, Cursor, Windsurf, TurboLLM, Hermes Agent) can run mcp-web-engine in an isolated ephemeral environment with zero configuration:
# Run stdio MCP server in an isolated environment (10ms startup, 0% system contamination)
uvx mcp-web-engine
Or run via Git repository:
uvx --from git+https://github.com/Arbolencio/mcp-web-engine mcp-web-engine
📌 What it does & Why it exists
mcp-web-engine is a high-performance Model Context Protocol (MCP) server implementing the MCP Specification 2026-07-28 Pure Stateless Core. It provides AI Agents with secure, private, and SSRF-hardened access to multi-engine web search, raw content fetching, and clean HTML-to-Markdown extraction.
Key Capabilities & Architecture
- Dual Execution Mode:
- Stdio Mode (Default): Runs JSON-RPC over
stdin/stdoutfor direct LLM client integration (uvx mcp-web-engine). - HTTP/SSE Server Mode: Runs FastAPI/Uvicorn server (
mcp-web-engine --serve).
- Stdio Mode (Default): Runs JSON-RPC over
- Pure Stateless Core (Spec 2026-07-28): Zero sessions, zero state, zero initialize handshake required. Every request is completely independent.
- Protocol Methods: Implements
server/discover,tools/list, andtools/callwith standard JSON-RPC 2.0. - Zero Third-Party Tracking: Powered by an internal SearXNG meta-search engine aggregating 70+ sources with DuckDuckGo fallback.
- Automatic URL Normalization: Handled transparently by
normalize_searxng_url()— any providedSEARXNG_URLvariation (http://127.0.0.1:8082,http://127.0.0.1:8082/,http://127.0.0.1:8082/search) automatically appends/searchif missing. - SSRF Hardened: Pre-request DNS resolution checks prevent agents from accessing internal networks (
localhost,127.0.0.1,192.168.x.x,169.254.169.254). Step-by-step HTTP 301/302 redirect re-validation. - Zero
--break-system-packages: Executed 100% in sandboxed virtual environments created on-the-fly byuvorvenv.
🔌 Integration Guides
1. TurboLLM / Local MCP Catalog
{
id: 'mcp-web-engine',
name: 'MCP Web Engine',
cat: 'Search',
desc: 'Privacy-first, self-hostable & SSRF-hardened web search engine and scraper for AI agents.',
cmd: 'uvx mcp-web-engine==1.1.0',
uvx: true,
argNote: 'Requires a running SearXNG instance. No query leaves the host unless ALLOW_DDG_FALLBACK is enabled.',
envs: [
{ key: 'SEARXNG_URL', desc: 'SearXNG meta-search endpoint (default: http://127.0.0.1:8082/search)', required: true },
],
}
2. Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"mcp-web-engine": {
"command": "uvx",
"args": ["mcp-web-engine"],
"env": {
"SEARXNG_URL": "http://127.0.0.1:8082/search"
}
}
}
}
3. Cursor / Windsurf / Hermes Agent
{
"mcpServers": {
"mcp-web-engine": {
"command": "uvx",
"args": ["mcp-web-engine"]
}
}
}
🛠️ Provided MCP Tools
| Tool Name | Parameters | Description |
|---|---|---|
web_search |
query (str), limit (int, default: 10) |
Multi-engine meta-search via SearXNG returning structured JSON results |
fetch_url |
url (str), max_bytes (int, optional) |
Fetches raw web content after strict SSRF security validation |
extract_markdown |
url (str), max_bytes (int, optional) |
Scrapes a webpage and converts HTML into clean, LLM-optimized Markdown |
⚙️ Configuration & Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
SEARXNG_URL |
Yes | http://127.0.0.1:8082/search |
SearXNG meta-search endpoint (Auto-normalizes trailing slashes and missing /search) |
ALLOW_DDG_FALLBACK |
No | false |
Privacy switch. When false (default), a SearXNG failure returns SEARXNG_UNAVAILABLE instead of quietly querying DuckDuckGo. Set to true only if you accept that queries leave your host on failure. |
PORT |
No | 5050 |
HTTP/SSE server port (Used only when running in --serve mode) |
HOST |
No | 0.0.0.0 |
HTTP/SSE server binding host |
API_KEY |
No | "" |
Optional authentication key for HTTP endpoints |
🛠️ Development & Building
# Clone Repository
git clone https://github.com/Arbolencio/mcp-web-engine.git
cd mcp-web-engine
# Build Wheel for PyPI
python3 -m build --wheel
# Run locally in stdio mode via uv
uv run python -m mcp_web_engine.main
# Run locally in HTTP server mode via uv
uv run python -m mcp_web_engine.main --serve
🛡️ Security & Environment Isolation
- SSRF Hardening: Blocks
localhost, loopbacks, private subnets (10.0.0.0/8,192.168.0.0/16,172.16.0.0/12), percent-encoding bypasses (%31%32%37...), and re-validatesLocationheaders on HTTP redirects step-by-step. - Zero Package Pollution: Execution via
uvxorbin/cli.jsnever modifies global site-packages or uses dangerous flags like--break-system-packages.
📄 License
MIT License © 2026 MCP Web Engine Contributors.
Metadata
Release files for mcp-web-engine 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_web_engine-1.1.0.tar.gz | 31.8 kB | Without provenance | Details for mcp_web_engine-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_web_engine-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for mcp_web_engine-1.1.0-py3-none-any.whl |
Total release size: 52.2 kB
Release files / mcp_web_engine-1.1.0.tar.gz
| Download URL | mcp_web_engine-1.1.0.tar.gz |
|---|---|
| Size | 31.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c91ee71e23ac26746118dd5dfa51520ff1fc2f599c49cdaa689bcd5883cd19f
|
|
BLAKE2b-256 checksum How to use checksums |
8cd9819aece428530054ac5e15d834fcf4c2d8cf3dc9507499c489480e62e4f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / mcp_web_engine-1.1.0-py3-none-any.whl
| Download URL | mcp_web_engine-1.1.0-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c31ab952ad1b662530b9077f70d2a4e65d40f5d90cafbd20d7579605fe6e8f02
|
|
BLAKE2b-256 checksum How to use checksums |
244e3e4f55920576ffcc854ba0c92fb2573a0d6dce9a66f27a2706c2d305e01c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for mcp-web-engine 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.