Skip to content

Conversation

emmaanuel
Copy link

@emmaanuel emmaanuel commented Sep 1, 2025

🚀 Enhanced Perplexity MCP Server with Advanced Filtering Capabilities

This PR introduces comprehensive date and domain filtering options to the Perplexity MCP Server, significantly enhancing its search precision and user control.

✨ New Features
Date Filtering System:

  • Publication Date Filters: search_after_date_filter and search_before_date_filter for filtering by original publication date
  • Last Updated Filters: last_updated_after_filter and last_updated_before_filter for filtering by content modification date
  • Recency Filter: search_recency_filter with convenient presets ("day", "week", "month", "year")
  • Flexible Combinations: Mix and match filters (except recency with others) for precise time-based searches

Domain Filtering System:

  • Allowlist Mode: Include only specified domains/URLs (e.g., ["wikipedia.org", "github.com"])
  • Denylist Mode: Exclude unwanted domains using - prefix (e.g., ["-reddit.com", "-pinterest.com"])
  • URL-Level Control: Target specific pages for granular filtering
  • Subdomain Support: Automatic inclusion of all subdomains

📚 Documentation Enhancements

  • 7 Practical Examples: Real-world usage scenarios covering different filtering combinations
  • Clear Format Specifications: Detailed date format requirements (M/D/YYYY)
  • Usage Guidelines: Important notes on limitations and best practices
  • API Consistency: All three tools (perplexity_ask, perplexity_research, perplexity_reason) support the new filters

🎯 Use Cases Enabled

  • Academic Research: Filter to trusted sources like arXiv, Nature, Science.org
  • Recent Updates: Find documentation updated after specific dates
  • Time-bounded Research: Study trends within specific publication periods
  • Quality Control: Exclude low-quality sources like forums and social media
  • Targeted Documentation: Focus on official docs with recent updates

🔧 Implementation Details

  • Backward Compatible: All new parameters are optional
  • Input Validation: Clear constraints (max 20 domains, no mixing modes)
  • Error Prevention: Built-in restrictions prevent invalid filter combinations
  • Type Safety: Proper TypeScript definitions for all new parameters

🌟 User Impact
This enhancement transforms the MCP server from a basic search tool into a sophisticated research assistant, enabling users to:

  • Conduct more targeted and relevant searches
  • Filter out noise and focus on quality sources
  • Perform time-sensitive research with precision
  • Customize searches for specific domains or content types

Ready for review! 🚀

@emmaanuel emmaanuel changed the title Enhance README and index.ts with domain filtering options for Perplexity MCP Server Adding filtering options by date and domain Sep 1, 2025
@emmaanuel emmaanuel changed the title Adding filtering options by date and domain Add advanced date and domain filtering Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant