home / mcp / tavily mcp server

Tavily MCP Server

πŸ” Model Context Protocol (MCP) tool for search using the Tavily API

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "spences10-mcp-tavily-search": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-tavily-search"
      ],
      "env": {
        "TAVILY_API_KEY": "YOUR_TAVILY_API_KEY"
      }
    }
  }
}

You can use Tavily’s Tavily Search MCP server to perform high-quality web searches, generate AI-assisted summaries, and provide ready-to-use context for RAG and QA workflows. It integrates with your MCP client to deliver structured results in multiple formats and supports domain filtering, caching, and configurable depth for precise, factual outputs.

How to use

To use this MCP server, configure your MCP client to launch the Tavily search tool as a standard MCP service. You can run it locally through a command-line interface like npx or via a Windows Subsystem for Linux (WSL) setup. The service exposes three tools you can call from your client: tavily_search for web searches, tavily_get_search_context for generating RAG contexts, and tavily_qna_search for direct question answering. All tools return structured results optimized for consumption by large language models.

How to install

Prerequisites: ensure you have Node.js and a compatible package manager installed on your system. You will also need your Tavily API key to enable authenticated access to the Tavily Search API.

Configuration and usage patterns

Configure the MCP client to run Tavily search as a stdio-based MCP server using either a direct npx invocation or a WSL-based setup. Both configurations require your Tavily API key to be supplied in the environment.

Domain filtering and options

You can tailor search results with include_domains and exclude_domains to focus on trusted sources or to avoid particular sites. Other parameters let you control depth, topic, time range, result format, and caching behavior to suit your needs.

Results formats and caching

The tools support multiple output formats, including text, JSON, and markdown. Response caching with TTL helps reduce repeated requests and speeds up repeated queries.

Available tools

tavily_search

Search the Tavily web API with configurable depth, topic, domains, and result format. Returns structured results suitable for downstream processing and model consumption.

tavily_get_search_context

Generate context for RAG applications using Tavily search with adjustable token limits and depth to balance breadth and conciseness.

tavily_qna_search

Ask direct questions and receive AI-assisted answers with optional source citations and configurable search depth.