Tavily Search MCP Agent

Tavily Search MCP Agent

A sophisticated Model Context Protocol (MCP) server that provides comprehensive multi-topic search capabilities powered by the Tavily API. This agent enables intelligent information gathering across business, news, finance, and politics domains with a focus on high-quality, reliable sources.

Features

  • 🔍 Multi-Topic Search: Specialized search configurations for business, news, finance, and politics
  • 📊 Quality Assurance: Minimum of 8 high-quality sources per search
  • 🤖 AI-Powered Summaries: Intelligent summarization of search results
  • 🔄 Deduplication: Smart filtering of duplicate sources
  • Parallel Processing: Concurrent search execution across topics

Prerequisites

  • Python 3.8 or higher
  • UV package installer
  • A Tavily API key (Get one here)
  • Claude Desktop (optional, for GUI interface)

Installation

  1. Clone the Repository
    git clone https://github.com/yourusername/tavily-mcp-search.git cd tavily-mcp-search
  2. Create and Activate Virtual Environment
    # Create virtual environment uv venv # Windows .venv\Scripts\Activate.ps1 # macOS/Linux source .venv/bin/activate
  3. Install Dependencies
    uv pip install mcp>=1.2.0 httpx python-dotenv uv pip install -e .
  4. Configure Environment
    # Windows Set-Content -Path ".env" -Value "TAVILY_API_KEY=your-api-key-here" -Encoding UTF8 # macOS/Linux echo "TAVILY_API_KEY=your-api-key-here" > .env

Usage

As a Standalone Server

  1. Start the server:
    mcp-tavily-search
  2. The server exposes the following tool:
    • comprehensive_search: Performs multi-topic research with a single query

Integration with Claude Desktop

  1. Add the following to your Claude Desktop configuration file (%APPDATA%\Claude\claude_desktop_config.json on Windows):
    { "mcpServers": { "tavily-search": { "command": "PATH_TO_YOUR_VENV\\Scripts\\mcp-tavily-search.exe", "env": { "TAVILY_API_KEY": "your-api-key-here" } } } }
  2. Replace PATH_TO_YOUR_VENV with your actual virtual environment path
  3. Replace your-api-key-here with your Tavily API key
  4. Restart Claude Desktop

Search Topics and Configurations

The agent uses specialized configurations for different topics:

TopicDepthUpdate FrequencyResults
BusinessAdvancedStandard12
NewsBasic24 hours10
FinanceAdvancedStandard12
PoliticsBasic48 hours10

Development

Modifying Search Configurations

Search configurations can be customized in server.py:

TOPIC_CONFIGS = { "business": SearchConfig("advanced", "general", max_results=12), "news": SearchConfig("basic", "news", days=1, max_results=10), # Add or modify configurations }

Adding New Features

  1. Clone the repository
  2. Create a new branch
  3. Make your changes
  4. Submit a pull request

Troubleshooting

Common issues and solutions:

  • Server won't start: Check if the virtual environment is activated
  • API errors: Verify your Tavily API key in the .env file
  • Claude Desktop integration: Ensure the path in config.json is correct

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

Acknowledgments

  • Tavily API for providing the search capabilities
  • Model Context Protocol for the server framework
  • Claude Desktop for the GUI integration capabilities
A
security – no known vulnerabilities (report Issue)
F
license - not found
A
quality - confirmed to work

This MCP server performs multi-topic searches in business, news, finance, and politics using the Tavily API, providing high-quality sources and intelligent summaries.

  1. Features
    1. Prerequisites
      1. Installation
        1. Usage
          1. As a Standalone Server
            1. Integration with Claude Desktop
            2. Search Topics and Configurations
              1. Development
                1. Modifying Search Configurations
                  1. Adding New Features
                  2. Troubleshooting
                    1. Contributing
                      1. License
                        1. Acknowledgments