mcp web search
Provides Google search capabilities, web content extraction, and screenshot functionality with advanced bot detection avoidance through the MCP protocol.
Provides Google search capabilities, web content extraction, and screenshot functionality with advanced bot detection avoidance through the MCP protocol.
An MCP server that provides Google search capabilities and web content viewing with advanced bot detection avoidance.
# Install dependencies
bun install
# Build the TypeScript files
bun run build
For authenticated site access, you'll need to:
BROWSER_COOKIES_PATH
environment variable to the absolute path of your cookies fileAdd the server configuration to your MCP settings file:
%APPDATA%CodeUserglobalStorage
ooveterinaryinc.roo-clinesettingscline_mcp_settings.json
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%Claudeclaude_desktop_config.json
{
"mcpServers": {
"web-search": {
"command": "bun",
"args": [
"run",
"/ABSOLUTE/PATH/TO/web_search_mcp/dist/index.js"
],
"env": {
"GOOGLE_API_KEY": "your_api_key",
"GOOGLE_SEARCH_ENGINE_ID": "your_search_engine_id",
"MAX_CONCURRENT_BROWSERS": "3",
"BROWSER_TIMEOUT": "30000",
"RATE_LIMIT_WINDOW": "60000",
"RATE_LIMIT_MAX_REQUESTS": "60",
"SEARCH_CACHE_TTL": "3600",
"VIEW_URL_CACHE_TTL": "7200",
"MAX_CACHE_ITEMS": "1000",
"BROWSER_POOL_MIN": "1",
"BROWSER_POOL_MAX": "5",
"BROWSER_POOL_IDLE_TIMEOUT": "30000",
"REBROWSER_PATCHES_RUNTIME_FIX_MODE": "addBinding",
"REBROWSER_PATCHES_SOURCE_URL": "jquery.min.js",
"REBROWSER_PATCHES_UTILITY_WORLD_NAME": "util",
"REBROWSER_PATCHES_DEBUG": "0",
"BROWSER_COOKIES_PATH": "C:pathtocookies.json",
"LOG_LEVEL": "info",
"NO_COLOR": "0",
"BUN_FORCE_COLOR": "1",
"FORCE_COLOR": "1"
}
}
}
}
Replace /ABSOLUTE/PATH/TO/web_search_mcp
with the absolute path to your server directory.
The following environment variables control logging behavior:
LOG_LEVEL
: Sets the logging level (error, warn, info, debug). Default: infoNO_COLOR
: Disables colored output when set to "1"BUN_FORCE_COLOR
: Controls colored output in Bun runtime (set to "0" to disable)FORCE_COLOR
: Controls colored output globally (set to "0" to disable)This server uses rebrowser-puppeteer to avoid bot detection:
Maintains access to the main world context
Source URL Masking:
Helps avoid detection of automation tools
Utility World Name:
Prevents detection through world name patterns
Browser Launch Configuration:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%Claudeclaude_desktop_config.json
Add the server configuration as shown in the Configuration section above.
Restart Claude Desktop
{
name: "search",
params: {
query: string;
trustedDomains?: string[];
excludedDomains?: string[];
resultCount?: number;
safeSearch?: boolean;
dateRestrict?: string;
}
}
{
name: "view_url",
params: {
url: string;
includeImages?: boolean;
includeVideos?: boolean;
preserveLinks?: boolean;
formatCode?: boolean;
}
}
Check the logs:
# MacOS/Linux
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
# Windows
type %APPDATA%ClaudeLogsmcp*.log
Common issues:
For more detailed troubleshooting, refer to the MCP debugging guide.
# Run in development mode with watch
bun --watch run dev
# Run tests
bun run test
# Run linter
bun run lint
Some websites may still detect automation through other means
Performance:
MIT