# mcp-tavily

> MCP Server

The Tavily MCP Server provides AI-powered web search capabilities for LLMs using Tavily's API, enabling sophisticated searches, direct answers, and recent news retrieval with AI-extracted content. The Tavily MCP Server

## Overview

- **Category:** Search & Knowledge
- **Language:** Python
- **Stars:** 72
- **Forks:** 5
- **Owner:** RamXX
- **GitHub:** https://github.com/RamXX/mcp-tavily
- **Created:** 2024-12-01T18:34:28+00:00
- **Updated:** 2025-03-26T12:19:39+00:00
- **Source:** https://model-context-protocol.com/servers/mcp-server-tavily-api-ai-search

## Setup

## Setup

**Prerequisites:**
- Python 3.11 or later
- A Tavily API key
- `uv` Python package manager (recommended)

**Installation:**

**Option 1: Using pip or uv**

```bash
# With pip
pip install mcp-tavily

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

**Option 2: From source**

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

# Create a virtual environment (optional but recommended)
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 .

# To install with test dependencies:
uv sync --dev  # Or: pip install -r requirements-dev.txt
```

**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
    ```
2.  As an environment variable:
    ```bash
    export TAVILY_API_KEY=your_api_key_here
    ```
3.  As a command-line argument:
    ```bash
    python -m mcp_server_tavily --api-key=your_api_key_here
    ```

**Configure for Claude.app**

Add to your Claude settings:

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

If you encounter issues, you may need to specify the full path to your Python interpreter.

## Tools

## Available Tools

1.  `tavily_web_search` - Performs comprehensive web searches with AI-powered content extraction.
2.  `tavily_answer_search` - Performs web searches and generates direct answers with supporting evidence.
3.  `tavily_news_search` - Searches recent news articles with publication dates.
4.  **tavily_web_search** - Search the web using Tavily's AI-powered search engine (prompt template).
5.  **tavily_answer_search** - Search the web and get an AI-generated answer with supporting evidence (prompt template).
6.  **tavily_news_search** - Search recent news articles with Tavily's news search (prompt template).
