Skip to main content
Glama

Open Search MCP

by flyanima
MIT License
2
  • Apple
  • Linux
BEST_PRACTICES.md9.78 kB
# 🎯 Best Practices Guide Maximize your productivity with Open-Search-MCP using these proven strategies and tips. ## 🚀 Getting the Most Out of Open-Search-MCP ### 1. Choose the Right Tool for the Job #### Academic Research ```bash # ✅ Good: Specific and targeted "Search for 'transformer architecture' papers on arXiv from 2023" # ❌ Avoid: Too broad "Search for AI papers" ``` #### Code Search ```bash # ✅ Good: Include language and context "Find React hooks examples for form validation on GitHub" # ❌ Avoid: Vague queries "Find code examples" ``` #### Web Research ```bash # ✅ Good: Specific URLs and purpose "Crawl https://example.com/blog and extract main content" # ❌ Avoid: Generic crawling "Crawl some websites" ``` ### 2. Use Multi-Source Research Effectively #### Intelligent Research ```bash # ✅ Excellent: Comprehensive approach "Research 'quantum computing applications in cryptography' using arXiv, GitHub, and Stack Overflow" # ✅ Good: Specific domain focus "Find information about React performance optimization from GitHub repos and Stack Overflow discussions" ``` #### Deep Research ```bash # ✅ Perfect for complex topics "Perform deep research on 'sustainable energy storage solutions' with iterative refinement" ``` ## 🔧 Configuration Best Practices ### API Key Management #### Environment Variables (Recommended) ```bash # Create a .env file in your project root GITHUB_TOKEN=ghp_your_token_here ALPHA_VANTAGE_API_KEY=your_key_here GOOGLE_API_KEY=your_key_here NEWSAPI_KEY=your_key_here # Load in your shell profile source .env ``` #### Security Best Practices ```bash # ✅ Do: Use environment variables export GITHUB_TOKEN="ghp_your_token_here" # ❌ Don't: Hardcode in configuration files { "env": { "GITHUB_TOKEN": "ghp_your_actual_token_here" // Never do this! } } ``` ### Platform-Specific Optimization #### Claude Desktop ```json { "mcpServers": { "open-search-mcp": { "timeout": 60, // Reasonable timeout "env": { "MAX_CONCURRENT_REQUESTS": "3" // Prevent overwhelming } } } } ``` #### Cursor IDE (with Cline) ```json { "autoApprove": [ "search_arxiv", "search_github", "search_stackoverflow", "intelligent_research" ] // Pre-approve safe tools } ``` #### Windsurf (HTTP Mode) ```bash # Start with appropriate resources MCP_HTTP_PORT=8000 MCP_MAX_CONNECTIONS=50 npm run server:http ``` #### Augment Code (WebSocket Mode) ```bash # Optimize for real-time performance MCP_WS_PORT=8001 MCP_HEARTBEAT_INTERVAL=30000 npm run server:websocket ``` ## 📊 Performance Optimization ### 1. Request Patterns #### Efficient Querying ```bash # ✅ Good: Specific and focused "Search for 'React useEffect cleanup' on Stack Overflow" # ✅ Better: Include context "Find React useEffect cleanup patterns for memory leak prevention on Stack Overflow" # ❌ Avoid: Multiple broad queries in sequence "Search for React" "Search for useEffect" "Search for cleanup" ``` #### Batch Operations ```bash # ✅ Excellent: Single comprehensive request "Crawl these URLs and summarize content: [url1, url2, url3]" # ❌ Avoid: Multiple individual requests "Crawl url1" "Crawl url2" "Crawl url3" ``` ### 2. Caching Strategy #### Leverage Built-in Caching ```bash # Results are cached for 1 hour by default # Repeated queries return instantly # ✅ Good: Ask follow-up questions about same topic "Search for 'machine learning' papers on arXiv" "From those machine learning papers, which focus on neural networks?" ``` #### Cache Configuration ```bash # Adjust cache TTL for your workflow export CACHE_TTL=7200 # 2 hours for research sessions export CACHE_TTL=1800 # 30 minutes for development ``` ### 3. Rate Limit Management #### API Token Benefits ```bash # Without GitHub token: 60 requests/hour # With GitHub token: 5000 requests/hour # ✅ Always use tokens for heavy usage export GITHUB_TOKEN="ghp_your_token_here" ``` #### Smart Request Timing ```bash # ✅ Good: Space out requests naturally "Search for React tutorials on GitHub" # ... review results ... "Find advanced React patterns on Stack Overflow" # ❌ Avoid: Rapid-fire requests # Multiple searches in quick succession ``` ## 🎨 Workflow Integration ### 1. Research Workflows #### Academic Research Pattern ```bash 1. "Search for 'topic' papers on arXiv" 2. "Find related code implementations on GitHub" 3. "Look for discussions about 'topic' on Stack Overflow" 4. "Perform comprehensive research on 'topic' findings" ``` #### Development Workflow ```bash 1. "Search for 'library/framework' examples on GitHub" 2. "Find common issues with 'library' on Stack Overflow" 3. "Look for best practices and patterns" 4. "Crawl official documentation for latest updates" ``` #### Market Research Pattern ```bash 1. "Search for 'company/industry' financial news" 2. "Get company overview and stock data" 3. "Analyze market trends in 'sector'" 4. "Track portfolio performance" ``` ### 2. Collaborative Research #### Team Research Sessions ```bash # ✅ Good: Share comprehensive research "Perform deep research on 'project topic' and create detailed summary" # ✅ Better: Include multiple perspectives "Research 'topic' from technical, business, and user perspectives using multiple sources" ``` #### Documentation Integration ```bash # ✅ Excellent: Research with documentation intent "Research 'API design patterns' and organize findings for team documentation" ``` ## 🔍 Advanced Techniques ### 1. Query Refinement #### Iterative Improvement ```bash # Start broad, then narrow down 1. "Search for 'machine learning' papers on arXiv" 2. "From those results, focus on 'deep learning' papers from 2023" 3. "Find GitHub implementations of those deep learning techniques" ``` #### Context Building ```bash # ✅ Excellent: Build on previous results "Based on the React patterns we found, search for testing strategies for those patterns on Stack Overflow" ``` ### 2. Cross-Platform Strategies #### Platform Strengths - **Claude Desktop**: Best for complex reasoning and analysis - **Cursor IDE**: Excellent for code-focused research - **VS Code**: Great for development workflow integration - **Windsurf**: Ideal for team collaboration - **Augment Code**: Perfect for real-time monitoring #### Multi-Platform Usage ```bash # Use different platforms for different tasks # Claude Desktop: Deep analysis and reasoning # Cursor: Code implementation and debugging # Augment Code: Real-time monitoring and updates ``` ## 🛡️ Security & Privacy Best Practices ### 1. API Key Security #### Secure Storage ```bash # ✅ Good: Use environment variables export GITHUB_TOKEN="$(cat ~/.github_token)" # ✅ Better: Use secure credential managers # macOS: Keychain Access # Linux: gnome-keyring or pass # Windows: Windows Credential Manager ``` #### Key Rotation ```bash # Regularly rotate API keys # Monitor usage in API provider dashboards # Revoke unused or compromised keys immediately ``` ### 2. Data Privacy #### Sensitive Information ```bash # ✅ Good: Generic queries "Search for authentication patterns on GitHub" # ❌ Avoid: Sensitive details "Search for authentication for MyCompanyApp with secret key xyz123" ``` #### Local Development ```bash # Use separate API keys for development vs production # Never commit API keys to version control # Use .env files with .gitignore ``` ## 📈 Monitoring & Maintenance ### 1. Health Monitoring #### Regular Health Checks ```bash # Weekly health check npm run health:platforms # Monitor performance npm run health:monitor ``` #### Log Analysis ```bash # Check for errors and performance issues tail -f logs/mcp-server.log # Monitor API usage grep "rate limit" logs/mcp-server.log ``` ### 2. Updates & Maintenance #### Regular Updates ```bash # Monthly update routine git pull origin main npm install npm run build npm run health:platforms ``` #### Configuration Backup ```bash # Backup configurations before updates cp ~/.config/Claude/claude_desktop_config.json backup/ cp ~/.config/Cursor/.../cline_mcp_settings.json backup/ ``` ## 🎯 Success Metrics ### 1. Productivity Indicators - **Response Time**: < 10 seconds for most queries - **Success Rate**: > 95% successful tool executions - **Cache Hit Rate**: > 60% for repeated queries - **API Rate Limits**: < 80% of limits used ### 2. Quality Metrics - **Result Relevance**: High-quality, targeted results - **Research Depth**: Comprehensive multi-source findings - **Time Savings**: Significant reduction in manual research time ## 🚀 Pro Tips ### 1. Power User Techniques ```bash # Combine tools creatively "Search arXiv for 'topic', find GitHub implementations, then check Stack Overflow for common issues" # Use thinking tools for complex problems "Decompose this complex research question into manageable parts" "Visualize my research process for this investigation" ``` ### 2. Efficiency Hacks ```bash # Use auto-approve for trusted tools # Set up keyboard shortcuts in your platform # Create custom search templates for common queries # Use environment variables for frequently used parameters ``` ### 3. Troubleshooting Shortcuts ```bash # Quick diagnostics npm run health:platforms # Reset if issues persist npm run build && npm run install:multi # Check logs for specific errors grep "ERROR" logs/mcp-server.log | tail -10 ``` --- ## 📚 Related Resources - **[Quick Start Guide](QUICK_START.md)** - Get up and running fast - **[FAQ](FAQ.md)** - Common questions and answers - **[Troubleshooting](TROUBLESHOOTING.md)** - Fix common issues - **[Platform Guides](platforms/)** - Platform-specific documentation --- *Following these best practices will help you get the most out of Open-Search-MCP. Happy researching! 🎉*

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/flyanima/open-search-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server