Tavily Search
A search API tailored for LLMs, providing web search, RAG context generation, and Q&A capabilities through the Tavily API.
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.
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 querysearch_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 3time_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 5include_answer(boolean, optional): Include AI-generated summary. Defaults to trueinclude_images(boolean, optional): Include related images. Defaults to falseinclude_image_descriptions(boolean, optional): Include image descriptions. Defaults to falseinclude_raw_content(boolean, optional): Include raw HTML content. Defaults to falseinclude_domains(string[], optional): List of trusted domains to includeexclude_domains(string[], optional): List of domains to excluderesponse_format(string, optional): 'text', 'json', or 'markdown'. Defaults to 'text'cache_ttl(number, optional): Cache time-to-live in seconds. Defaults to 3600force_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 generationmax_tokens(number, optional): Maximum length of generated context. Defaults to 2000search_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 answeredinclude_sources(boolean, optional): Include source citations. Defaults to truesearch_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 resultsexclude_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
- Clone the repository
- Install dependencies:
pnpm install
- Build the project:
pnpm build
- Run in development mode:
pnpm dev
Publishing
The project uses changesets for version management. To publish:
- Create a changeset:
pnpm changeset
- Version the package:
pnpm changeset version
- 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
- Built on the Model Context Protocol
- Powered by Tavily Search API
Serveurs connexes
Custom Elasticsearch
A simple MCP server for Elasticsearch, designed for cloud environments where your public key is already authorized.
Financial AI Agent
An AI agent providing unified access to financial market data and news articles.
Transform SEO
SEO analysis server with 130+ tools for keyword research, competitors, backlinks, and more.
tteg
Unsplash without registration. Search and save real stock photos with zero API keys.
Erick Wendel Contributions
Query Erick Wendel's contributions, including talks, blog posts, and videos, using natural language.
Brave Search
An MCP server for the Brave Search API, providing both web and local search capabilities.
SkillFlow
AI skills marketplace MCP server - search, discover, and install AI agent skills from SkillFlow.builders marketplace
Jina AI Search
Perform semantic, image, and cross-modal searches using Jina AI's neural search capabilities.
Paper Search MCP
Search and download academic papers from sources like arXiv, PubMed, and Google Scholar.
招投标大数据服务
Query comprehensive enterprise information from e-commerce platforms, including store details, sales data, and product statistics.