mcp-tavily-search
๐ Model Context Protocol (MCP) tool for search using the Tavily API
Documentation
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 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 install3. Build the project:
pnpm build4. Run in development mode:
pnpm devPublishing
The project uses changesets for version management. To publish:
1. Create a changeset:
pnpm changeset2. Version the package:
pnpm changeset version3. Publish to npm:
pnpm releaseContributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see the LICENSE file for details.
Acknowledgments
- Built on the
- Powered by Tavily Search API
Frequently asked questions
What is mcp-tavily-search?
mcp-tavily-search is ๐ Model Context Protocol (MCP) tool for search using the Tavily API
How do I install mcp-tavily-search?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-tavily-search open source?
Yes โ it is hosted on GitHub at https://github.com/spences10/mcp-tavily-search and has 6 stars.
Related MCP tools
๐ฅ Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
Official remote MCP server for Atlassian. Securely connect Jira, Confluence, Jira Service Management, Bitbucket, and Compass to Claude, ChatGPT, Cursor, VS Code, and other AI tools using OAuth 2.1 or API tokens.
The go-to web for your AI coding agent โ local-first search, fetch, crawl & research over MCP. No API keys, no cloud, $0/query. Public beta.
AI Skills, MCP Tools, and CLI for Unity Engine. Full AI develop and test loop. Use cli for quick setup. Efficient token usage, advanced tools. Any C# method may be turned into a tool by a single line. Works with Claude Code, Gemini, Copilot, Cursor and any other absolutely for free.
Cut AI token costs 95%+ on code exploration. The leading MCP server for precise, symbol-level GitHub code retrieval via tree-sitter AST. Works with Claude Code, Cursor & any MCP client. 313B+ tokens saved.
CTTF: MCP integration between Cursor and Figma, allowing Cursor Agentic AI to communicate with Figma for reading designs and modifying them programmatically.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP