TS

Tavily search

Created 6 months ago

A Model Context Protocol server providing AI-powered web search capabilities using Tavily's search API.

development documentation public AI web search

What is Tavily search?

An MCP server for Tavily's search & news API, with explicit site inclusions/exclusions

Documentation

Tavily MCP Server

Features# Available Tools

  • tavily_web_search - Performs comprehensive web searches with AI-powered content extraction.
  • query (string, required): Search query
  • max_results (integer, optional): Maximum number of results to return (default: 5, max: 20)
  • search_depth (string, optional): Either "basic" or "advanced" search depth (default: "basic")
  • include_domains (list or string, optional): List of domains to specifically include in results
  • exclude_domains (list or string, optional): List of domains to exclude from results
  • tavily_answer_search - Performs web searches and generates direct answers with supporting evidence.
  • query (string, required): Search query
  • max_results (integer, optional): Maximum number of results to return (default: 5, max: 20)
  • search_depth (string, optional): Either "basic" or "advanced" search depth (default: "advanced")
  • include_domains (list or string, optional): List of domains to specifically include in results
  • exclude_domains (list or string, optional): List of domains to exclude from results
  • tavily_news_search - Searches recent news articles with publication dates.
  • query (string, required): Search query
  • max_results (integer, optional): Maximum number of results to return (default: 5, max: 20)
  • days (integer, optional): Number of days back to search (default: 3)
  • include_domains (list or string, optional): List of domains to specifically include in results
  • exclude_domains (list or string, optional): List of domains to exclude from results

Prompts

The server also provides prompt templates for each search type:

  • tavily_web_search - Search the web using Tavily's AI-powered search engine
  • tavily_answer_search - Search the web and get an AI-generated answer with supporting evidence
  • tavily_news_search - Search recent news articles with Tavily's news search

Prerequisites

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

Installation# Option 1: Using pip or uv

pip install mcp-tavily\n\n# Or with uv (recommended)
uv add mcp-tavily

Option 2: From source

git clone https://github.com/RamXX/mcp-tavily.git
cd mcp-tavily\n\n# Create a virtual environment (optional but recommended)
python -m venv .venv
source .venv/bin/activate\n\n# On Windows: .venv\Scripts\activate\n\n# Install dependencies and build
uv sync\n\n# Or: pip install -r requirements.txt
uv build\n\n# Or: pip install -e .\n\n# To install with test dependencies: uv sync --dev\n\n# Or: pip install -r requirements-dev.txt

Configuration# API Key Setup

The server requires a Tavily API key, which can be provided in 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

License

mcp-tavily is licensed under the MIT License. See the LICENSE file for details.

Server Config

{
  "mcpServers": {
    "tavily-search-server": {
      "command": "npx",
      "args": [
        "tavily-search"
      ]
    }
  }
}

Links & Status

Repository: github.com
Hosted: No
Global: No
Official: No

Project Info

Hosted Featured
Created At: May 23, 2025
Updated At: Aug 07, 2025
Author: RamXX
Category: community
License: MIT License
Tags:
development documentation public