websearch-mcp
Meta search via a self-hosted SearXNG instance with speed/balanced/quality modes, domain dedup, and trust scoring.
Click on "Deploy 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., "@websearch-mcp search the web for quantum computing breakthroughs in 2025"
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.
websearch-mcp
A self-hosted MCP server that gives AI agents deep internet research capabilities — no API keys required.
Powered by SearxNG (meta search engine), Playwright (web scraping), and Docker (Python sandbox).
Tools
Tool | Description |
| Meta search via SearxNG with speed/balanced/quality modes, domain dedup, and trust scoring |
| Scrape web pages with Playwright (stealth mode) + Readability extraction |
| Run Python code in an isolated Docker sandbox (no network, resource limits) |
| Get autocomplete suggestions for partial queries |
Related MCP server: Eyes-MCP
Prerequisites
Node.js >= 20
Docker (for SearxNG and Python sandbox)
Playwright Chromium (auto-installed on first run)
Quick Start
1. Start SearxNG
docker compose up -d searxngWait for it to be healthy:
curl -sf http://localhost:8080/healthz2. Install dependencies and build
npm install
npx playwright install chromium
npm run build3. Run the server
node dist/index.jsThe server communicates over stdio (MCP protocol). Connect it to any MCP-compatible client.
MCP Client Configuration
Claude Desktop / Claude Code
Add to your MCP settings:
{
"mcpServers": {
"websearch": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/websearch-mcp/dist/index.js"],
"env": {
"SEARXNG_URL": "http://localhost:8080"
}
}
}
}Tool Reference
search_internet
Search the internet using SearxNG meta-search engine.
Parameters:
Parameter | Type | Default | Description |
| string | required | Search query (1-500 chars) |
| enum |
|
|
| int |
| Max results (1-50) |
| enum |
|
|
| string |
| Language code filter (e.g. |
Features:
Deduplication by exact URL
Max 2 results per domain (ignoring www prefix)
Trust scoring via
config/website-weight-config.json
fetch_page
Fetch and extract content from a web page.
Parameters:
Parameter | Type | Default | Description |
| string | required | URL to fetch (http/https only) |
| enum |
|
|
| int |
| Page load timeout in ms (1000-30000) |
| string | - | CSS selector to wait for before extracting |
Features:
Stealth mode (custom user-agent, webdriver bypass)
Auto-managed browser pool with idle timeout
Content truncated to 50,000 characters
execute_python
Execute Python code in an isolated Docker container.
Parameters:
Parameter | Type | Default | Description |
| string | required | Python code to execute (max 100,000 chars) |
| int |
| Execution timeout in ms (1000-300000) |
| int |
| Memory limit in MB (128-4096) |
| bool |
| Save output files as artifacts |
Security:
Network disabled during code execution
All Linux capabilities dropped
Resource limits enforced (RAM + CPU)
Auto-detects and installs missing pip packages in a separate network-enabled stage
get_search_suggestions
Get autocomplete suggestions for a partial query.
Parameters:
Parameter | Type | Default | Description |
| string | required | Partial query (min 2 chars) |
| int |
| Max suggestions (1-10) |
Falls back to simple query expansion (e.g. "query tutorial", "query examples") when SearxNG autocomplete is unavailable.
Configuration
Environment Variables
Variable | Default | Description |
|
| SearxNG instance URL |
|
| Search request timeout |
|
| Max retries for failed requests |
|
| Base retry delay (exponential backoff) |
|
| Page fetch timeout |
|
| Max content length for fetched pages |
|
| Default Python sandbox memory limit |
|
| Default Python sandbox CPU limit |
|
| Default Python sandbox timeout |
Trust Weights
config/website-weight-config.json defines domain trust scores from -1.0 to 1.0. Domains with negative scores are filtered out. Others are reordered by score (highest trust first).
{
"wikipedia.org": 1.0,
"arxiv.org": 0.95,
"github.com": 0.9,
"stackoverflow.com": 0.85,
"medium.com": 0.5,
"reddit.com": 0.3,
"twitter.com": 0.2
}Development
# Build
npm run build
# Run in dev mode (auto-reload)
npm run dev
# Run tests
npm test
# Lint
npm run lint
# Type check
npm run typecheckProject Structure
websearch-mcp/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── lib/
│ │ ├── browser-pool.ts # Playwright browser pool with stealth mode
│ │ ├── config.ts # Configuration loader
│ │ ├── docker-sandbox.ts # Docker-based Python sandbox
│ │ ├── searxng-client.ts # SearxNG API client with retry
│ │ └── trust-filter.ts # Domain trust scoring and filtering
│ └── tools/
│ ├── fetch.ts # fetch_page tool
│ ├── python.ts # execute_python tool
│ ├── search.ts # search_internet tool
│ └── suggestions.ts # get_search_suggestions tool
├── tests/
├── config/
│ └── website-weight-config.json
├── infra/
│ └── searxng/settings.yml # SearxNG configuration
├── docker-compose.yml # SearxNG container
├── package.json
├── tsconfig.json
└── README.mdLicense
MIT
Available Tools
4 toolsexecute_pythonExecute PythonA
Execute Python code in an isolated Docker sandbox with network disabled, capability dropping, and resource limits (512MB RAM, 1 CPU, 60s timeout). Auto-detects and installs missing packages.
Inputs: code (required), timeout, memory_limit_mb, save_artifacts.
fetch_pageFetch PageA
Fetch and extract content from a web page using Playwright with stealth mode. Supports snippet, readable, and full extraction modes. Content is truncated to 50,000 characters.
Inputs: url (required), extract_mode, timeout, wait_for.
get_search_suggestionsGet Search SuggestionsA
Get autocomplete suggestions for a partial search query from SearxNG. Returns up to max_suggestions suggestion strings. Falls back to simple query expansion when SearxNG autocomplete is unavailable.
Inputs: query (required), max_suggestions.
search_internetSearch InternetA
Search the internet using SearxNG meta-search engine. Returns search results with title, URL, snippet, source engine, and score. Supports speed, balanced, and quality modes. Deduplicates by URL and limits same-domain results to 2. Filters low-trust domains when website-weight-config.json is present.
Inputs: query (required), category, max_results, mode, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: searching, fetching pages, getting suggestions, and running code. No overlap.
All tool names follow a consistent verb_noun pattern in snake_case (execute_python, fetch_page, get_search_suggestions, search_internet).
Four tools is a well-scoped set for a web search server, covering core functionality without being too few or too many.
The set covers searching, suggestions, page fetching, and code execution. Minor gap: no direct image search or URL validation, but execute_python adds flexibility.
Maintenance
Related MCP Connectors
Web search API and MCP server for developers building AI agents.
Free web search for AI agents. No API key required. Hosted MCP in active development.
One MCP server for all web data. Scrape, search, crawl, and AI research in one install.
An MCP server that gives your AI access to the source code and docs of all public github repos
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that gives local LLMs access to Google search, live feeds, YouTube transcriptions, OCR, and more — all without API keys, using headless Chromium and open-source models.38137MIT
- AlicenseNot gradedqualityDmaintenanceA research MCP server that enables AI agents to query the internet using multiple sources like SearXNG, GitHub, Reddit, and YouTube, and returns synthesized answers with citations.MIT
- AlicenseAqualityDmaintenanceAn AI-ready MCP server that performs intelligent web searches using SearxNG and Playwright, with one-step Docker setup.6MIT
- FlicenseNot gradedqualityBmaintenanceA self-hosted MCP server providing private web search, web page fetching, and current date/time tools, powered by a bundled SearXNG instance for API-key-free local search.2-