MCP Tavily Search Server

MCP Tavily Search Server

Integrates Tavily's search API with LLMs to provide advanced web search capabilities, including intelligent result summaries, domain filtering for quality control, and configurable search parameters.

Category
Visit Server

Tools

tavily_search

Search the web using Tavily Search API, optimized for high-quality, factual results

tavily_get_search_context

Generate context for RAG applications using Tavily search

tavily_qna_search

Get direct answers to questions using Tavily search

README

mcp-tavily-search


⚠️ Notice

This repository is no longer maintained.

The functionality of this tool is now available in mcp-omnisearch, which combines multiple MCP tools in one unified package.

Please use mcp-omnisearch instead.


A Model Context Protocol (MCP) server for integrating Tavily's search API with LLMs. This server provides intelligent web search capabilities optimized for high-quality, factual results, including context generation for RAG applications and direct question answering.

<a href="https://glama.ai/mcp/servers/1jcttrux58"><img width="380" height="200" src="https://glama.ai/mcp/servers/1jcttrux58/badge" alt="Tavily Search Server MCP server" /></a>

Features

  • 🔍 Advanced web search capabilities through Tavily API
  • 🤖 AI-generated summaries of search results
  • 🎯 Domain filtering for higher quality results
  • 📊 Configurable search depth and parameters
  • 🧠 Context generation for RAG applications
  • ❓ Direct question answering capabilities
  • 💾 Response caching with TTL support
  • 📝 Multiple response formats (text, JSON, markdown)
  • 🔄 Structured result formatting optimized for LLMs
  • 🏗️ Built on the Model Context Protocol

Configuration

This server requires configuration through your MCP client. Here are examples for different environments:

Cline Configuration

Add this to your Cline MCP settings:

{
	"mcpServers": {
		"mcp-tavily-search": {
			"command": "npx",
			"args": ["-y", "mcp-tavily-search"],
			"env": {
				"TAVILY_API_KEY": "your-tavily-api-key"
			}
		}
	}
}

Claude Desktop with WSL Configuration

For WSL environments, add this to your Claude Desktop configuration:

{
	"mcpServers": {
		"mcp-tavily-search": {
			"command": "wsl.exe",
			"args": [
				"bash",
				"-c",
				"source ~/.nvm/nvm.sh && TAVILY_API_KEY=your-tavily-api-key /home/username/.nvm/versions/node/v20.12.1/bin/npx mcp-tavily-search"
			]
		}
	}
}

Environment Variables

The server requires the following environment variable:

  • TAVILY_API_KEY: Your Tavily API key (required)

API

The server implements three MCP tools with configurable parameters:

tavily_search

Search the web using Tavily Search API, optimized for high-quality, factual results.

Parameters:

  • query (string, required): Search query
  • search_depth (string, optional): "basic" (faster) or "advanced" (more thorough). Defaults to "basic"
  • topic (string, optional): "general" or "news". Defaults to "general"
  • days (number, optional): Number of days back to search (news topic only). Defaults to 3
  • time_range (string, optional): Time range for results ('day', 'week', 'month', 'year' or 'd', 'w', 'm', 'y')
  • max_results (number, optional): Maximum number of results. Defaults to 5
  • include_answer (boolean, optional): Include AI-generated summary. Defaults to true
  • include_images (boolean, optional): Include related images. Defaults to false
  • include_image_descriptions (boolean, optional): Include image descriptions. Defaults to false
  • include_raw_content (boolean, optional): Include raw HTML content. Defaults to false
  • include_domains (string[], optional): List of trusted domains to include
  • exclude_domains (string[], optional): List of domains to exclude
  • response_format (string, optional): 'text', 'json', or 'markdown'. Defaults to 'text'
  • cache_ttl (number, optional): Cache time-to-live in seconds. Defaults to 3600
  • force_refresh (boolean, optional): Force fresh results ignoring cache. Defaults to false

tavily_get_search_context

Generate context for RAG applications using Tavily search.

Parameters:

  • query (string, required): Search query for context generation
  • max_tokens (number, optional): Maximum length of generated context. Defaults to 2000
  • search_depth (string, optional): "basic" or "advanced". Defaults to "advanced"
  • topic (string, optional): "general" or "news". Defaults to "general"
  • Other parameters same as tavily_search

tavily_qna_search

Get direct answers to questions using Tavily search.

Parameters:

  • query (string, required): Question to be answered
  • include_sources (boolean, optional): Include source citations. Defaults to true
  • search_depth (string, optional): "basic" or "advanced". Defaults to "advanced"
  • topic (string, optional): "general" or "news". Defaults to "general"
  • Other parameters same as tavily_search

Domain Filtering

The server supports flexible domain filtering through two optional parameters:

  • include_domains: Array of trusted domains to include in search results
  • exclude_domains: Array of domains to exclude from search results

This allows you to:

  • Target specific trusted sources for academic or technical searches
  • Exclude potentially unreliable or irrelevant sources
  • Customize sources based on your specific needs
  • Access all available sources when no filtering is specified

Example domain filtering:

{
	"include_domains": ["arxiv.org", "science.gov"],
	"exclude_domains": ["example.com"]
}

Development

Setup

  1. Clone the repository
  2. Install dependencies:
pnpm install
  1. Build the project:
pnpm build
  1. Run in development mode:
pnpm dev

Publishing

The project uses changesets for version management. To publish:

  1. Create a changeset:
pnpm changeset
  1. Version the package:
pnpm changeset version
  1. Publish to npm:
pnpm release

Contributing

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

License

MIT License - see the LICENSE file for details.

Acknowledgments

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured