MCP Web Search Server
đ MCP Web Search Server
A privacyâfocused web, social media, and archive search server exposing tools via the Model Control Protocol (MCP) for controlled access to external search capabilities.
Table of Contents
đŻ Features
Parallel search across multiple privacyâfocused web engines.
Social media lookup for public content on major platforms.
Archive retrieval from Wayback Machine, archive.today, Google Cache and others.
Dynamic listing of supported engines and archive services.
Result caching with LRU eviction to speed up repeated queries.
đŚ Installation & Quick Start
# Clone the repository (if applicable)
git clone https://github.com/undici77/MCPWebSearch.git
cd MCPWebSearch
# Run the startup script (adjust name if different)
./run.sh -d /path/to/working/directory1ď¸âŁ Create & activate a Python virtual environment (.venv).
2ď¸âŁ Install all required dependencies from requirements.txt.
3ď¸âŁ Launch the MCP Search Server (main.py) which listens onâŻstdin/stdout for JSONâRPC messages.
đ Ensure the startup script is executable:
chmod +x run.sh
âď¸ CommandâLine Options
Option | Description |
| Path to the working directory (default: current process dir). |
The server itself does not require additional CLI flags; all configuration is performed via JSONâRPC.
đ¤ Integration with LMâŻStudio
Add an entry to your mcp.json so LMâŻStudio can start the server automatically:
{
"mcpServers": {
"web-search": {
"command": "/absolute/path/to/run.sh",
"args": [
"-d",
"/absolute/path/to/working/directory"
],
"env": { "WORKING_DIR": "." }
}
}
}đ Make the script executable (
chmod +x /absolute/path/to/run.sh) and run./run.shonce to install the virtual environment before launching LMâŻStudio.
đĄ MCP API Overview
All communication follows JSONâRPCâŻ2.0 over stdin/stdout.
initialize
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {}
}Response: protocol version (2024-11-05), server capabilities (tool enumeration) and basic server info (name, version).
tools/list
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list",
"params": {}
}Response: an array of tool definitions (name, description, input schema).
tools/call
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "<tool_name>",
"arguments": { ⌠}
}
}Note: The tool identifier key is name, not tool.
đ ď¸ Available Tools
web_search
Search the web using multiple privacyâfocused engines in parallel.
Name | Type | Required | Description |
| string | â | Search query (maxâŻ500 characters). |
| string | â (default⯠| Engine to use ( |
| integer | â (defaultâŻ20) | Max results per engine (1â50). |
Example
{
"jsonrpc": "2.0",
"id": 10,
"method": "tools/call",
"params": {
"name": "web_search",
"arguments": {
"query": "privacy focused search engines",
"engine": "duckduckgo",
"max_results": 15
}
}
}The server returns a formatted text block containing titles, URLs and snippets from each selected engine.
social_search
Search public content on major socialâmedia platforms.
Name | Type | Required | Description |
| string | â | Search query (maxâŻ500 characters). |
| string | â (default⯠| Platform to search ( |
Example
{
"jsonrpc": "2.0",
"id": 11,
"method": "tools/call",
"params": {
"name": "social_search",
"arguments": {
"query": "AI ethics research",
"platform": "reddit"
}
}
}The response contains direct URLs that can be opened in a browser.
archives_search
Find archived versions of a URL across multiple webâarchive services.
Name | Type | Required | Description |
| string | â | Complete URL (must include |
| string | â (default⯠| Archive service ( |
| boolean | â (defaultâŻfalse) | When true, the server queries the Wayback Machine API for snapshot statistics. |
Example
{
"jsonrpc": "2.0",
"id": 12,
"method": "tools/call",
"params": {
"name": "archives_search",
"arguments": {
"url": "https://example.com",
"service": "wayback",
"check_availability": true
}
}
}The response lists archive URLs and, if requested, snapshot counts and timestamps.
list_engines
List all available privacyâfocused search engines.
Name | Type | Required | Description |
(No parameters) | â | â | â |
Example
{
"jsonrpc": "2.0",
"id": 13,
"method": "tools/call",
"params": {
"name": "list_engines",
"arguments": {}
}
}The server returns a markdownâformatted overview of each engine and usage notes.
list_archives_services
List all supported webâarchive services.
Name | Type | Required | Description |
(No parameters) | â | â | â |
Example
{
"jsonrpc": "2.0",
"id": 14,
"method": "tools/call",
"params": {
"name": "list_archives_services",
"arguments": {}
}
}The response includes a description of each service, its ID and key features.
clear_cache
Clear the internal searchâresult cache.
Name | Type | Required | Description |
(No parameters) | â | â | â |
Example
{
"jsonrpc": "2.0",
"id": 15,
"method": "tools/call",
"params": {
"name": "clear_cache",
"arguments": {}
}
}The server replies with a confirmation message.
đ Security Features
Query sanitisation â strips control characters, removes HTML tags and enforces
MAX_QUERY_LENGTH(500).Strict URL validation â accepts only
http://orhttps://schemes with a valid domain.Blocked patterns â regexes prevent
<script>injection,javascript:URIs and eventâhandler attributes.Input schema enforcement â each tool validates required fields via the JSONâRPC
inputSchema.Rate limiting â an asyncio semaphore caps concurrent external requests (
MAX_CONCURRENT_SEARCHES).
Š 2025 Undici77 â All rights reserved.
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/undici77/MCPWebSearch'
If you have feedback or need assistance with the MCP directory API, please join our Discord server