Back to MCP Catalog

Tavily Search MCP Server

SearchPython
AI-powered web search capabilities using Tavily's search API
Available Tools

tavily_web_search

Performs comprehensive web searches with AI-powered content extraction

querymax_resultssearch_depthinclude_domainsexclude_domains

tavily_answer_search

Performs web searches and generates direct answers with supporting evidence

querymax_resultssearch_depthinclude_domainsexclude_domains

tavily_news_search

Searches recent news articles with publication dates

querymax_resultsdaysinclude_domainsexclude_domains

Tavily Search provides AI-powered web search capabilities through Tavily's search API. This integration enables large language models to perform sophisticated web searches, get direct answers to questions, and search recent news articles with AI-extracted relevant content. With Tavily Search, you can enhance your AI assistant's capabilities by giving it access to up-to-date information from the web. The integration offers multiple search modes including comprehensive web searches, direct answer generation with supporting evidence, and recent news article searches with publication dates.

Overview

Tavily Search is an MCP server that connects to Tavily's AI-powered search API, enabling AI assistants to perform web searches and retrieve relevant information. This integration is particularly useful for accessing current information, researching topics, and providing evidence-based responses.

Prerequisites

  • Python 3.11 or later
  • A Tavily API key (obtain from Tavily's website)
  • uv Python package manager (recommended) or pip

Installation

Option 1: Using pip or uv (Recommended)

You can install the Tavily MCP server using either pip or uv:

# With pip
pip install mcp-tavily

# Or with uv (recommended)
uv add mcp-tavily

Option 2: From source

If you prefer to install from source:

# Clone the repository
git clone https://github.com/RamXX/mcp-tavily.git
cd mcp-tavily

# Create a virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies and build
uv sync  # Or: pip install -r requirements.txt
uv build  # Or: pip install -e .

Configuration

API Key Setup

The server requires a Tavily API key, which can be provided in one of three ways:

  1. Through a .env file in your project directory:
TAVILY_API_KEY=your_api_key_here
  1. As an environment variable:
export TAVILY_API_KEY=your_api_key_here
  1. As a command-line argument:
python -m mcp_server_tavily --api-key=your_api_key_here

Usage with AI Assistants

VS Code Integration

For VS Code users, you can add the following to your User Settings (JSON) file:

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "apiKey",
        "description": "Tavily API Key",
        "password": true
      }
    ],
    "servers": {
      "tavily": {
        "command": "uvx",
        "args": ["mcp-tavily"],
        "env": {
          "TAVILY_API_KEY": "${input:apiKey}"
        }
      }
    }
  }
}

Alternatively, you can create a .vscode/mcp.json file in your workspace with the same configuration (without the outer mcp key).

Claude.app Configuration

To use with Claude.app, add this configuration:

"mcpServers": {
  "tavily": {
    "command": "python",
    "args": ["-m", "mcp_server_tavily"],
    "env": {
      "TAVILY_API_KEY": "your_api_key_here"
    }
  }
}

Example Prompts

Here are some example prompts to use with the Tavily Search integration:

  • For a regular web search:

    Tell me about Anthropic's newly released MCP protocol
    
  • To generate a report with domain filtering:

    Tell me about redwood trees. Please use MLA format in markdown syntax and include the URLs in the citations. Exclude Wikipedia sources.
    
  • To use answer search mode for direct answers:

    I want a concrete answer backed by current web sources: What is the average lifespan of redwood trees?
    
  • For news search:

    Give me the top 10 AI-related news in the last 5 days
    

Related MCPs

SearXNG
SearchTypeScript

Web search capabilities through SearXNG API integration

Hacker News
SearchPython

Access and search Hacker News content programmatically

Web Search
SearchJavaScript

Free Google search integration with no API keys required

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.