- Explore MCP Servers
- mcp-tavily
Mcp Tavily
What is Mcp Tavily
mcp-tavily is an implementation of a Model Context Protocol (MCP) server specifically designed for the Tavily API, providing advanced search and content extraction capabilities.
Use cases
Use cases for mcp-tavily include academic research for finding relevant literature, customer support for answering user queries, and content curation for extracting and summarizing information from multiple sources.
How to use
To use mcp-tavily, add it to your MCP configuration by specifying the command and arguments in JSON format, including your Tavily API key as an environment variable or directly in the configuration.
Key features
Key features of mcp-tavily include multiple search tools (basic search, context-aware search, and Q&A search), content extraction from URLs, and rich configuration options for search depth and filtering.
Where to use
mcp-tavily can be used in various fields such as information retrieval, content management, and data extraction, where advanced search capabilities are required.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Tavily
mcp-tavily is an implementation of a Model Context Protocol (MCP) server specifically designed for the Tavily API, providing advanced search and content extraction capabilities.
Use cases
Use cases for mcp-tavily include academic research for finding relevant literature, customer support for answering user queries, and content curation for extracting and summarizing information from multiple sources.
How to use
To use mcp-tavily, add it to your MCP configuration by specifying the command and arguments in JSON format, including your Tavily API key as an environment variable or directly in the configuration.
Key features
Key features of mcp-tavily include multiple search tools (basic search, context-aware search, and Q&A search), content extraction from URLs, and rich configuration options for search depth and filtering.
Where to use
mcp-tavily can be used in various fields such as information retrieval, content management, and data extraction, where advanced search capabilities are required.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
MCP Tavily
A Model Context Protocol (MCP) server implementation for Tavily API, providing advanced search and content extraction capabilities.
Features
- Multiple Search Tools:
search: Basic search functionality with customizable optionssearchContext: Context-aware search for better relevancesearchQNA: Question and answer focused search
- Content Extraction: Extract content from URLs with configurable options
- Rich Configuration Options: Extensive options for search depth, filtering, and content inclusion
Usage with MCP
Add the Tavily MCP server to your MCP configuration:
{
"mcpServers": {
"tavily": {
"command": "npx",
"args": [
"-y",
"@mcptools/mcp-tavily"
],
"env": {
"TAVILY_API_KEY": "your-api-key"
}
}
}
}
Note: Make sure to replace
your-api-keywith your actual Tavily API key. You can also set it as an environment variableTAVILY_API_KEYbefore running the server.
API Reference
Search Tools
The server provides three search tools that can be called through MCP:
1. Basic Search
// Tool name: search
{
query: "artificial intelligence",
options: {
searchDepth: "advanced",
topic: "news",
maxResults: 10
}
}
2. Context Search
// Tool name: searchContext
{
query: "latest developments in AI",
options: {
topic: "news",
timeRange: "week"
}
}
3. Q&A Search
// Tool name: searchQNA
{
query: "What is quantum computing?",
options: {
includeAnswer: true,
maxResults: 5
}
}
Extract Tool
// Tool name: extract
{
urls: ["https://example.com/article1", "https://example.com/article2"],
options: {
extractDepth: "advanced",
includeImages: true
}
}
Search Options
All search tools share these options:
interface SearchOptions {
searchDepth?: "basic" | "advanced"; // Search depth level
topic?: "general" | "news" | "finance"; // Search topic category
days?: number; // Number of days to search
maxResults?: number; // Maximum number of results
includeImages?: boolean; // Include images in results
includeImageDescriptions?: boolean; // Include image descriptions
includeAnswer?: boolean; // Include answer in results
includeRawContent?: boolean; // Include raw content
includeDomains?: string[]; // List of domains to include
excludeDomains?: string[]; // List of domains to exclude
maxTokens?: number; // Maximum number of tokens
timeRange?: "year" | "month" | "week" | "day" | "y" | "m" | "w" | "d"; // Time range for search
}
Extract Options
interface ExtractOptions {
extractDepth?: "basic" | "advanced"; // Extraction depth level
includeImages?: boolean; // Include images in results
}
Response Format
All tools return responses in the following format:
{
content: Array<{
type: "text",
text: string
}>
}
For search results, each item includes:
- Title
- Content
- URL
For extracted content, each item includes:
- URL
- Raw content
- Failed URLs list (if any)
Error Handling
All tools include proper error handling and will throw descriptive error messages if something goes wrong.
Installation
Installing via Smithery
To install Tavily API Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @kshern/mcp-tavily --client claude
Manual Installation
npm install @mcptools/mcp-tavily
Or use it directly with npx:
npx @mcptools/mcp-tavily
Prerequisites
- Node.js 16 or higher
- npm or yarn
- Tavily API key (get one from Tavily)
Setup
- Clone the repository
- Install dependencies:
npm install
- Set your Tavily API key:
export TAVILY_API_KEY=your_api_key
Building
npm run build
Debugging with MCP Inspector
For development and debugging, we recommend using MCP Inspector, a powerful development tool for MCP servers.
The Inspector provides a user interface for:
- Testing tool calls
- Viewing server responses
- Debugging tool execution
- Monitoring server state
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
This project is licensed under the MIT License.
Support
For any questions or issues:
- Tavily API: refer to the Tavily documentation
- MCP integration: refer to the MCP documentation
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










