npm installCreate a .env file in the project root:
GOOGLE_API_KEY=your_google_api_key
GOOGLE_SEARCH_ENGINE_ID=your_custom_search_engine_idNote: No Anthropic API key required. The server uses agent-based synthesis with your existing Claude session.
npm run build
npm run start:v3research_topic({
topic: "Your topic here",
depth: "intermediate"
})Claude will automatically launch an agent to synthesize the research.
When you call research_topic:
- MCP Tool searches Google, deduplicates, and ranks sources by quality
- MCP Tool extracts full content from top sources
- MCP Tool packages everything into an agent prompt
- Claude Code launches an agent automatically
- Agent analyzes all sources and synthesizes insights
- Output includes comprehensive research with:
- Executive summary
- Key findings (5-7 for intermediate depth)
- Common themes
- Source quality scores
- Focus area analysis (if requested)
GOOGLE_API_KEY=your_google_api_key
GOOGLE_SEARCH_ENGINE_ID=your_search_engine_id# Only set these if you want Direct API mode instead of Agent mode
ANTHROPIC_API_KEY=your_anthropic_key
USE_DIRECT_API=trueFor 99% of users: Don't set the optional vars. Agent mode is better!
After npm run start:v3, you should see:
============================================================
Google Research MCP Server v3.0.0 (Enhanced)
============================================================
✓ 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
============================================================
If you see AGENT MODE - perfect! You're ready to go.
Try this:
research_topic({
topic: "Docker container security best practices",
depth: "intermediate"
})Expected:
- Tool gathers research from 5 high-quality sources
- Returns agent prompt
- I launch agent automatically
- Agent synthesizes and returns comprehensive analysis
- Takes ~10-15 seconds total
- Check your Google API key is valid
- Verify search engine ID is correct
- Try a different topic
- Make sure you're using v3:
npm run start:v3 - Check server shows "AGENT MODE"
- Look for
[AGENT_SYNTHESIS_REQUIRED]in response
- Set
ANTHROPIC_API_KEYin.env - Set
USE_DIRECT_API=truein.env - Rebuild:
npm run build - Not recommended for interactive use
- Read:
AGENT-MODE.mdfor detailed agent mode explanation - Read:
README-V3.mdfor comprehensive feature documentation - Experiment: Try different depth levels and focus areas
research_topic({
topic: "GraphQL vs REST APIs",
depth: "basic" // 3 sources, quick summary
})research_topic({
topic: "Microservices architecture patterns",
depth: "advanced", // 8-10 sources, deep analysis
focus_areas: ["API gateway", "service mesh", "observability"]
})research_topic({
topic: "Kubernetes security",
depth: "intermediate",
focus_areas: ["RBAC", "network policies", "pod security"],
num_sources: 7
})The tool will work seamlessly with Claude Code, no extra API keys required.