The Enhanced Google Search MCP server provides advanced, anonymized Google web search capabilities with comprehensive customization options.
Core Features:
- Advanced search queries with support for complex syntax, quotes, operators, and filters
- Configurable results with 1-10 result limits, language/region settings, safe search levels ('off', 'moderate', 'strict'), and time range filtering ('hour', 'day', 'week', 'month', 'year')
- Enhanced anonymization using rotating user agents, dynamic headers, and randomized session IDs
- Anti-detection capabilities with random delays, parameter variation, and comprehensive error handling
- Robust reliability featuring smart retry logic, automatic rate limit handling, and multiple HTML parsing strategies
- MCP integration compatible with Claude Desktop and other MCP clients
- Comprehensive testing with validation suite for real-world scenarios
Provides enhanced Google search capabilities with advanced query support, configurable results filtering by language/region/time, and anti-detection features for web scraping
Enhanced Google Search MCP Server
⚠️ EXPERIMENTAL PROJECT - USE AT YOUR OWN RISK
This is an experimental Google search MCP server that uses web scraping techniques. Please be aware of the following:
- Rate Limiting: Google may block or rate-limit requests from this server
- Reliability: Search results may be inconsistent due to Google's anti-scraping measures
🔍 RECOMMENDED ALTERNATIVES
For production use, we strongly recommend using official search APIs or established MCP servers:
- DuckDuckGo MCP Servers: More reliable and ToS-compliant alternatives
- Bing Search API: Microsoft's official search API with MCP integration
- Google Custom Search API: Google's official search API (requires API key)
- SearXNG MCP: Privacy-focused meta-search engine integration
Use this experimental server only if you understand the risks and limitations.
A powerful Model Context Protocol (MCP) server that provides enhanced Google search capabilities with advanced anonymization and anti-detection features.
Features
🔍 Enhanced Search Capabilities
- Advanced Query Support: Handle complex search queries with quotes, operators, and filters
- Configurable Results: Limit results (1-10), set language, region, safe search, and time range
- Multiple Parsing Strategies: Robust result extraction with fallback mechanisms
🛡️ Advanced Anonymization
- Realistic Browser Fingerprinting: Rotating user agents that mimic real browsers (Chrome, Firefox, Safari, Edge)
- Dynamic Headers: Randomized Accept-Language, Accept-Encoding, and security headers
- Session Randomization: Unique session IDs and request fingerprints
- Request Timing: Random delays to avoid detection patterns
🚀 Reliability Features
- Smart Retry Logic: Exponential backoff with jitter for failed requests
- Rate Limit Handling: Automatic detection and graceful handling of rate limits
- Error Recovery: Comprehensive error handling with user-friendly messages
- Timeout Management: Configurable timeouts with proper error reporting
🔧 Technical Improvements
- Multiple Result Selectors: Adapts to Google's changing HTML structure
- URL Cleaning: Proper handling of Google's redirect URLs
- Content Validation: Ensures all results have valid URLs and content
- Comprehensive Logging: Detailed logging for debugging and monitoring
Installation
Installing via Smithery
To install google-search-mcp for Claude Desktop automatically via Smithery:
Manual Installation
Usage
Development Mode
Start the server in development mode with interactive CLI:
Production Mode
Start the server for production use:
Testing
Run the comprehensive test suite:
For continuous testing during development:
MCP Tool: search
The server provides a single, powerful search tool with the following parameters:
Parameters
query
(required): Search query to executelimit
(optional): Maximum number of results (1-10, default: 5)language
(optional): Language code (e.g., 'en', 'es', 'fr', 'de', 'ja')region
(optional): Region code (e.g., 'us', 'uk', 'ca', 'au')safeSearch
(optional): Filter level ('off', 'moderate', 'strict')timeRange
(optional): Time filter ('hour', 'day', 'week', 'month', 'year')
Example Usage
Configuration with Claude Desktop
Add this configuration to your Claude Desktop MCP settings:
Architecture
Core Components
- UserAgentGenerator: Creates realistic browser fingerprints
- RequestAnonymizer: Handles request anonymization and timing
- SearchParameterBuilder: Constructs optimized search parameters
- ResultParser: Robust HTML parsing with multiple strategies
Anti-Detection Features
- Browser Fingerprint Rotation: Cycles through realistic user agents
- Header Randomization: Varies request headers to avoid patterns
- Timing Randomization: Adds random delays between requests
- Session Management: Generates unique session identifiers
- Parameter Variation: Adds random search parameters
Error Handling
The server provides comprehensive error handling for:
- Rate limiting by Google
- Network timeouts and connectivity issues
- Access denied/blocked requests
- Invalid or empty responses
- Parsing failures with fallback strategies
Development
Project Structure
Code Quality
The project includes:
- TypeScript: Full type safety and IntelliSense support
- ESLint: Code linting with TypeScript rules
- Prettier: Consistent code formatting
- Vitest: Fast and reliable testing framework
Scripts
npm run build
: Compile TypeScript to JavaScriptnpm run start
: Start the server in production modenpm run dev
: Start in development mode with CLInpm run test
: Run the test suitenpm run test:watch
: Run tests in watch modenpm run lint
: Check code quality and typesnpm run format
: Format code with Prettier
Testing
The test suite covers:
- Basic search functionality
- Parameter validation and handling
- Language and region filtering
- Safe search and time range filters
- Complex query handling
- Error scenarios and edge cases
- URL validation and result formatting
All tests use real Google search requests to ensure functionality works in practice.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Run
npm run lint
andnpm run test
- Submit a pull request
License
MIT License - see LICENSE file for details.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
A powerful Model Context Protocol (MCP) server that provides enhanced Google search capabilities with advanced anonymization and anti-detection features.
Related MCP Servers
- AsecurityFlicenseAqualityAn MCP (Model Context Protocol) server that provides Google search capabilities and webpage content analysis tools. This server enables AI models to perform Google searches and analyze webpage content programmatically.Last updated -35283TypeScript
- -securityAlicense-qualityA Model Context Protocol (MCP) based search API server that provides standardized access to Google Maps, Google Flights, Google Hotels and other services. This server enables AI assistants to access various search services through a unified interface.Last updated -57PythonMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that provides web search capabilities using Google Custom Search API and webpage content extraction functionality.Last updated -241JavaScript
- -securityAlicense-qualityModel Context Protocol (MCP) server that provides AI assistants with advanced web research capabilities, including Google search integration, intelligent content extraction, and multi-source synthesis.Last updated -523TypeScriptMIT License