- Node.js 18+ installed
- Google API key and Search Engine ID
- Anthropic API key (optional but recommended)
cd /path/to/Google-Research-MCP
npm installThis installs the new @anthropic-ai/sdk package.
Edit .env file:
# Required
GOOGLE_API_KEY=your_google_api_key
GOOGLE_SEARCH_ENGINE_ID=your_search_engine_id
# HIGHLY RECOMMENDED (for AI synthesis)
ANTHROPIC_API_KEY=your_anthropic_api_key
# Optional
MCP_TRANSPORT=stdio
PORT=3000Get Anthropic API Key:
- Go to https://console.anthropic.com/
- Sign up / Log in
- Navigate to API Keys
- Create new key (starts with
sk-ant-) - Copy to
.env
npm run buildThis compiles all the new services:
source-quality.service.tsdeduplication.service.tsresearch-synthesis.service.tsgoogle-search-v3.ts
Option A: Standalone Test
npm run start:v3You should see:
==============================================================
Google Research MCP Server v3.0.0 (Enhanced)
==============================================================
✓ Source quality assessment
✓ Deduplication
✓ AI synthesis: ENABLED ← Should show ENABLED if API key set
✓ Focus area analysis
✓ Enhanced error handling
✓ Cache metadata
==============================================================
Server running on STDIO
Option B: With Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"google-research": {
"command": "node",
"args": [
"/absolute/path/to/Google-Research-MCP/dist/google-search-v3.js"
],
"env": {
"GOOGLE_API_KEY": "your_key",
"GOOGLE_SEARCH_ENGINE_ID": "your_id",
"ANTHROPIC_API_KEY": "your_anthropic_key"
}
}
}
}Restart Claude Desktop.
What to test: AI-powered synthesis instead of "..."
research_topic({
topic: "Docker container security best practices",
depth: "intermediate"
})Expected output:
- Real summary paragraph (not "...")
- 5-7 actual findings extracted from sources
- Themes identified
- Quality metrics shown
- Retrieved timestamp
Failure case: If you see summary: "...", check that:
ANTHROPIC_API_KEYis set in.env- Server startup shows "AI synthesis: ENABLED"
- API key is valid (test at console.anthropic.com)
What to test: Quality scoring and duplicate removal
google_search({
query: "python asyncio tutorial",
num_results: 10
})Expected output:
✓ Removed 2 duplicate sources
✓ 8 unique domains
Results:
1. Python Official Docs
Quality: 95% | Authority: 90% | Type: official_documentation
[snippet]
2. Real Python Tutorial
Quality: 78% | Authority: 60% | Type: blog
[snippet]
...
What to test: Dedicated analysis per focus area
research_topic({
topic: "Kubernetes security",
focus_areas: ["RBAC", "network policies", "pod security"],
depth: "advanced"
})Expected output:
## Focus Area Analysis
### RBAC
Dedicated analysis of Role-Based Access Control...
**Key Points:**
- Finding 1 specific to RBAC
- Finding 2 specific to RBAC
...
**Best Practices:**
- Practice 1
- Practice 2
### network policies
[Dedicated section for network policies]
### pod security
[Dedicated section for pod security]What to test: Helpful error messages
google_search({
query: "xyzabc123notreal"
})Expected output:
Error: No results found for "xyzabc123notreal"
Suggestions:
- Try using broader search terms
- Check spelling of search terms
- Try searching for related concepts
Try these alternative queries:
- "xyzabc basics"
- "xyzabc guide"
What to test: Custom preview lengths
extract_webpage_content({
url: "https://realpython.com/async-io-python/",
preview_length: 300,
max_length: 5000
})Expected output:
Content Preview (300 chars):
[Exactly 300 characters]
Note: Content limited to 5000 characters
Retrieved at: 2025-11-07T...
What to test: Timestamps on all responses
google_search({
query: "rust programming"
})Expected in output:
Retrieved at: 2025-11-07T21:45:00.000Z
[structuredContent includes cache_info]
- Server starts without errors
- Shows
✓ AI synthesis: ENABLED - Research summaries are actual analysis (not "...")
- Sources show quality scores
- Duplicates are removed (check for "Removed X duplicates")
- Focus areas get dedicated sections
- Errors provide helpful suggestions
- All responses include timestamps
- Preview lengths are consistent
Cause: Server not in agent mode or configuration issue
Fix:
- Verify server shows "AGENT MODE" on startup
- Check for
[AGENT_SYNTHESIS_REQUIRED]in output - Rebuild:
npm run build - Restart server
Cause: New dependencies not installed
Fix:
rm -rf node_modules package-lock.json
npm install
npm run buildPossible causes:
- API key not set (check startup message)
- API rate limit reached
- Network issues
Debug:
# Check API key is loaded
npm run start:v3
# Look for this line:
# ✓ AI synthesis: ENABLED ← Should be ENABLEDCause: Using v2 instead of v3
Fix:
# Make sure you're running v3:
npm run start:v3 # NOT start:v2Symptoms: No "Focus Area Analysis" section
Check:
- Did you pass
focus_areasparameter? - Using v3 server?
- AI synthesis enabled?
Example:
research_topic({
topic: "topic name",
focus_areas: ["area1", "area2"], // Must be array
depth: "advanced" // Advanced recommended
})| Operation | Expected Time | Notes |
|---|---|---|
google_search |
1-2s | +0.3s for quality scoring |
extract_webpage_content |
2-3s | Per URL |
research_topic (basic) |
8-10s | 3 sources + AI synthesis |
research_topic (intermediate) |
12-15s | 5 sources + synthesis |
research_topic (advanced) |
18-25s | 8-10 sources + deep analysis |
Note: AI synthesis adds 3-8s depending on content size and depth.
| Depth | Input Tokens | Output Tokens | Est. Cost |
|---|---|---|---|
| basic | ~3,000 | ~500 | $0.01 |
| intermediate | ~6,000 | ~1,000 | $0.02 |
| advanced | ~10,000 | ~1,500 | $0.04 |
Prices based on Claude 3.5 Sonnet rates as of 2025
- Verify all tests pass
- Check agent synthesis is working
- Read
README.mdfor comprehensive documentation - Review
tool-evaluation-report.mdfor detailed analysis - Check
implementation-guide.mdfor implementation details - Start using the improved research capabilities
# Build
npm run build
# Run v3 (STDIO)
npm run start:v3
# Run v3 (HTTP)
npm run start:v3:http
# Run v2 (fallback)
npm run start:v2GOOGLE_API_KEY=xxx # Required
GOOGLE_SEARCH_ENGINE_ID=xxx # Required
ANTHROPIC_API_KEY=xxx # Recommended
MCP_TRANSPORT=stdio # Optional
PORT=3000 # Optional (HTTP mode)google_search- Enhanced search with quality scoresextract_webpage_content- Enhanced with depth controlsextract_multiple_webpages- Batch extractionresearch_topic- Completely rewritten with AI synthesis
- Issues: Check
tool-evaluation-report.mdfirst - Code Examples: See
implementation-guide.md - Full Docs: See
README-V3.md
Setup Complete
The server is now configured with:
- AI-powered research synthesis (agent mode)
- Source quality assessment
- Deduplication
- Focus area analysis
- Enhanced error handling
- All 10 improvements active