MCP Server built for use with Claude Code, Claude Desktop, VS Code, Cline - enable google search and ability to follow links and research websites
npx skills add https://github.com/mixelpixx/Google-Search-MCP-Server --skill find-docsCLI를 사용하여 이 스킬을 설치하고 작업 공간에서 SKILL.md 워크플로 사용을 시작하세요.
https://github.com/mixelpixx/Google-Search-MCP-Server/tree/serpapi-only
Version 3.0.0 - Enhanced research synthesis with intelligent source quality assessment and deduplication.
An advanced Model Context Protocol (MCP) server that provides comprehensive Google search capabilities, webpage content extraction, and AI-powered research synthesis. Built for Claude Code, Claude Desktop, and other MCP-compatible clients.
NEW: This server now supports multiple search providers! Choose the best option for your needs.
# Get free API key: https://api.search.brave.com/app/keys
SEARCH_PROVIDER=brave
BRAVE_API_KEY=your_brave_api_key_here
# Get API key: https://app.tavily.com/sign-in
SEARCH_PROVIDER=tavily
TAVILY_API_KEY=your_tavily_api_key_here
# Only if you already have an API key
SEARCH_PROVIDER=google
GOOGLE_API_KEY=your_google_api_key_here
GOOGLE_SEARCH_ENGINE_ID=your_search_engine_id_here
Migration Guide: See MIGRATION.md for detailed migration instructions.
Google has CLOSED the Custom Search JSON API to new customers as of 2026.
If you don't have a Google API key:
Important Dates:
Current Limits:
Monitor Your Usage:
Error: "not working" or "403 Forbidden"
.envError: "429 Too Many Requests"
Need more than 100/day?
This MCP server transforms Google search into a powerful research tool by:
Run directly without cloning:
# Set environment variables and run
GOOGLE_API_KEY=your_key GOOGLE_SEARCH_ENGINE_ID=your_id npx google-search-mcp
Or create a .env file in your working directory with your credentials, then run:
npx google-search-mcp
# Clone the repository
git clone <https://github.com/mixelpixx/Google-Search-MCP-Server>
cd Google-Research-MCP
# Install dependencies
npm install
# Optional: Install Google API support (only if using Google provider)
# Note: googleapis is now optional - only install if you need Google
npm install googleapis
# Build the project
npm run build
Note: The googleapis package is now optional. If you're using Brave or Tavily, you don't need to install it. This reduces installation size and dependencies.
Create a .env file in the project root:
SEARCH_PROVIDER=brave
BRAVE_API_KEY=your_brave_api_key_here
SEARCH_PROVIDER=tavily
TAVILY_API_KEY=your_tavily_api_key_here
SEARCH_PROVIDER=google # Optional, defaults to google for backwards compatibility
GOOGLE_API_KEY=your_google_api_key
GOOGLE_SEARCH_ENGINE_ID=your_custom_search_engine_id
Note: No Anthropic API key is required. The server uses agent-based synthesis that leverages your existing Claude session.
Track your API usage and costs to prevent unexpected bills:
# Enable usage tracking
USAGE_TRACKING_ENABLED=true
# Persist tracking to SQLite database (optional)
USAGE_TRACKING_PERSIST=true
USAGE_TRACKING_DB_PATH=./.mcp-usage-tracking.db
# Set thresholds for warnings (optional)
USAGE_MAX_SEARCHES_PER_MONTH=2000 # Alert at 80% and 100%
USAGE_MAX_COST_PER_MONTH=10.00 # In USD
Benefits:
# Start v3 server (recommended)
npm run start:v3
# For HTTP mode
npm run start:v3:http
Expected output (with Brave):
============================================================
Google Research MCP Server v3.0.0 (Enhanced)
============================================================
Initializing search provider: brave
✓ Using Brave Search as search provider
Free tier: 2,000 queries/month
✓ Source quality assessment
✓ Deduplication
✓ AI synthesis: AGENT MODE (Claude will launch agents)
└─ No API key needed - uses your existing Claude session
✓ Focus area analysis
✓ Enhanced error handling
✓ Cache metadata
============================================================
Server running on STDIO
Expected output (with Google):
Initializing search provider: google
✓ Using Google Custom Search as search provider
Free tier: 100 queries/day
WARNING: Google Custom Search will sunset on January 1, 2027
Consider migrating to Brave Search: https://brave.com/search/api/
With usage tracking enabled:
✓ Using Brave Search as search provider
✓ Usage tracking enabled
✓ Usage tracking database initialized: ./.mcp-usage-tracking.db
| Depth | Sources | Analysis | Use Case |
|---|---|---|---|
| basic | 3 | Quick overview, 3-5 findings | Fast comparisons, initial research |
| intermediate | 5 | Comprehensive analysis, 5-7 findings | Standard research tasks |
| advanced | 8-10 | In-depth analysis, 7-10 findings, contradictions | Decision-making, comprehensive reviews |
research_topic({
topic: "WebAssembly performance optimization",
depth: "basic"
})
Returns:
research_topic({
topic: "Kubernetes security",
depth: "advanced",
focus_areas: ["RBAC", "network policies", "pod security"],
num_sources: 8
})
Returns:
google_search({
query: "docker container security best practices",
num_results: 10,
dateRestrict: "y1", // Last year only
site: "github.com" // Limit to GitHub
})
Returns:
extract_webpage_content({
url: "https://kubernetes.io/docs/concepts/security/",
format: "markdown",
max_length: 5000,
preview_length: 300
})
Returns:
Agent Mode is the default synthesis method. Instead of requiring a separate Anthropic API key, it uses your existing Claude session:
For automated workflows or scripts, you can use Direct API mode:
# .env
ANTHROPIC_API_KEY=your_anthropic_api_key
USE_DIRECT_API=true
This bypasses agent mode and calls the Anthropic API directly from the MCP server.
src/
├── google-search-v3.ts # Main MCP server (v3)
├── services/
│ ├── google-search.service.ts # Google Custom Search integration
│ ├── content-extractor.service.ts # Web content extraction
│ ├── source-quality.service.ts # Source ranking and scoring
│ ├── deduplication.service.ts # Duplicate detection
│ └── research-synthesis.service.ts # Agent-based synthesis
└── types.ts # TypeScript interfaces
Search Query → Google API → Results
↓
Deduplication
↓
Quality Scoring
↓
Content Extraction
↓
Agent Synthesis
↓
Comprehensive Research Report
Search Google with advanced filtering and quality scoring.
Parameters:
query (string, required) - Search querynum_results (number, optional) - Number of results (default: 5, max: 10)site (string, optional) - Limit to specific domainlanguage (string, optional) - ISO 639-1 language codedateRestrict (string, optional) - Date filter (e.g., "m6" for last 6 months)exactTerms (string, optional) - Exact phrase matchingresultType (string, optional) - Filter by type (image, news, video)page (number, optional) - Paginationsort (string, optional) - Sort by relevance or dateReturns:
Extract clean content from a webpage.
Parameters:
url (string, required) - Target URLformat (enum, optional) - Output format: markdown, html, text (default: markdown)full_content (boolean, optional) - Return full content (default: false)max_length (number, optional) - Maximum content lengthpreview_length (number, optional) - Preview length (default: 500)Returns:
Batch extract content from multiple URLs (max 5).
Parameters:
urls (array, required) - Array of URLs (max 5)format (enum, optional) - Output formatReturns:
Comprehensive research with AI synthesis.
Parameters:
topic (string, required) - Research topicdepth (enum, optional) - Analysis depth: basic, intermediate, advanced (default: intermediate)num_sources (number, optional) - Number of sources (default: varies by depth)focus_areas (array, optional) - Specific aspects to analyzeReturns:
| Variable | Required | Default | Description |
|---|---|---|---|
GOOGLE_API_KEY |
Yes | - | Google Custom Search API key |
GOOGLE_SEARCH_ENGINE_ID |
Yes | - | Custom Search Engine ID |
ANTHROPIC_API_KEY |
No | - | For Direct API mode only |
USE_DIRECT_API |
No | false | Enable Direct API mode |
MCP_TRANSPORT |
No | stdio | Transport mode: stdio or http |
PORT |
No | 3000 | Port for HTTP mode |
| Operation | Typical Duration | Notes |
|---|---|---|
| google_search | 1-2s | Includes quality scoring and deduplication |
| extract_webpage_content | 2-3s | Per URL |
| research_topic (basic) | 8-10s | 3 sources with agent synthesis |
| research_topic (intermediate) | 12-15s | 5 sources with comprehensive analysis |
| research_topic (advanced) | 18-25s | 8-10 sources with deep analysis |
| Metric | v2 | v3 | Improvement |
|---|---|---|---|
| Summary Quality | 2/10 | 9/10 | 350% |
| Source Diversity | Not tracked | Optimized | New |
| Duplicate Removal | 0% | ~30% | New |
| Source Ranking | Random | By quality | New |
| Focus Area Support | Generic | Dedicated | New |
| Error Helpfulness | 3/10 | 9/10 | 200% |
Symptoms: Research returns basic concatenation instead of synthesis
Solutions:
[AGENT_SYNTHESIS_REQUIRED] in responsenpm run start:v3npm run buildSymptoms: Search results don't show quality scores
Solutions:
Solutions:
Contributions are welcome. Please ensure:
npm run buildSee LICENSE file for details.
For issues, questions, or feature requests, please open an issue on GitHub.
Version: 3.0.0
Last Updated: 2025-11-07