tavily mcp
This server enables AI systems to integrate with Tavily's search and data extraction tools, providing real-time web information access and domain-specific searches.
This server enables AI systems to integrate with Tavily's search and data extraction tools, providing real-time web information access and domain-specific searches.
? Compatible with Cline, Cursor, Claude Desktop, and any other MCP Clients!
Tavily MCP is also compatible with any MCP client
? tutorial on combining Tavily MCP with Neo4j MCP server!
? tutorial Integrating Tavily MCP with Cline in VS Code ( Demo + Example Use-Cases)
The Model Context Protocol (MCP) is an open standard that enables AI systems to interact seamlessly with various data sources and tools, facilitating secure, two-way connections.
Developed by Anthropic, the Model Context Protocol (MCP) enables AI assistants like Claude to seamlessly integrate with Tavily's advanced search and data extraction capabilities. This integration provides AI models with real-time access to web information, complete with sophisticated filtering options and domain-specific search features.
The Tavily MCP server provides: - Seamless interaction with the tavily-search and tavily-extract tools - Real-time web search capabilities through the tavily-search tool - Intelligent data extraction from web pages via the tavily-extract tool
Before you begin, ensure you have:
node --version
brew install git
sudo apt install git
sudo yum install git
npx -y [email protected]
To install Tavily MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @tavily-ai/tavily-mcp --client claude
Although you can launch a server on its own, it's not particularly helpful in isolation. Instead, you should integrate it into an MCP client. Below is an example of how to configure the Claude Desktop app to work with the tavily-mcp server.
This repository will explain how to configure both Cursor and Claude Desktop to work with the tavily-mcp server.
The easiest way to set up the Tavily MCP server in Cline is through the marketplace with a single click:
Alternatively, you can manually set up the Tavily MCP server in Cline:
### For macOS:
# Using Visual Studio Code
code ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
# Or using TextEdit
open -e ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
### For Windows:
code %APPDATA%CodeUserglobalStoragesaoudrizwan.claude-devsettingscline_mcp_settings.json
Replace your-api-key-here
with your actual Tavily API key.
{
"mcpServers": {
"tavily-mcp": {
"command": "npx",
"args": ["-y", "[email protected]"],
"env": {
"TAVILY_API_KEY": "your-api-key-here"
},
"disabled": false,
"autoApprove": []
}
}
}
Save the file and restart Cline if it's already running.
When using Cline, you'll now have access to the Tavily MCP tools. You can ask Cline to use the tavily-search and tavily-extract tools directly in your conversations.
Note: Requires Cursor version 0.45.6 or higher
To set up the Tavily MCP server in Cursor:
env TAVILY_API_KEY=your-api-key npx -y [email protected]
> Important: Replace your-api-key
with your Tavily API key. You can get one at app.tavily.com/homeAfter adding the server, it should appear in the list of MCP servers. You may need to manually press the refresh button in the top right corner of the MCP server to populate the tool list.
The Composer Agent will automatically use the Tavily MCP tools when relevant to your queries. It is better to explicitly request to use the tools by describing what you want to do (e.g., "User tavily-search to search the web for the latest news on AI"). On mac press command + L to open the chat, select the composer option at the top of the screen, beside the submit button select agent and submit the query when ready.
# Create the config file if it doesn't exist
touch "$HOME/Library/Application Support/Claude/claude_desktop_config.json"
# Opens the config file in TextEdit
open -e "$HOME/Library/Application Support/Claude/claude_desktop_config.json"
# Alternative method using Visual Studio Code (requires VS Code to be installed)
code "$HOME/Library/Application Support/Claude/claude_desktop_config.json"
code %APPDATA%Claudeclaude_desktop_config.json
Replace your-api-key-here
with your actual Tavily API key.
{
"mcpServers": {
"tavily-mcp": {
"command": "npx",
"args": ["-y", "[email protected]"],
"env": {
"TAVILY_API_KEY": "your-api-key-here"
}
}
}
}
Clone the repository:
git clone https://github.com/tavily-ai/tavily-mcp.git
cd tavily-mcp
Install dependencies:
npm install
Build the project:
npm run build
Follow the configuration steps outlined in the Configuring the Claude Desktop app section above, using the below JSON configuration.
Replace your-api-key-here
with your actual Tavily API key and /path/to/tavily-mcp
with the actual path where you cloned the repository on your system.
{
"mcpServers": {
"tavily": {
"command": "npx",
"args": ["/path/to/tavily-mcp/build/index.js"],
"env": {
"TAVILY_API_KEY": "your-api-key-here"
}
}
}
}
Once the installation is complete, and the Claude desktop app is configured, you must completely close and re-open the Claude desktop app to see the tavily-mcp server. You should see a hammer icon in the bottom left of the app, indicating available MCP tools, you can click on the hammer icon to see more detial on the tavily-search and tavily-extract tools.
Now claude will have complete access to the tavily-mcp server, including the tavily-search and tavily-extract tools. If you insert the below examples into the Claude desktop app, you should see the tavily-mcp server tools in action.
General Web Search:
Can you search for recent developments in quantum computing?
News Search:
Search for news articles about AI startups from the last 7 days.
Domain-Specific Search:
Search for climate change research on nature.com and sciencedirect.com
Extract the main content from this article: https://example.com/article
You can also combine the tavily-search and tavily-extract tools to perform more complex tasks.
Search for news articles about AI startups from the last 7 days and extract the main content from each article to generate a detailed report.
npm --verison
code ~/Library/Application Support/Claude/claude_desktop_config.json
Ensure Node.js is properly installed by running node --version
NPX related issues
npx
, you may need to use the full path to the npx executable instead. You can find this path by running which npx
in your terminal, then replace the "command": "npx"
line with "command": "/full/path/to/npx"
in your configuration.
API Key Issues
[
{
"description": "A powerful web search tool that provides comprehensive, real-time results using Tavily's AI search engine. Returns relevant web content with customizable parameters for result count, content type, and domain filtering. Ideal for gathering current information, news, and detailed web content analysis.",
"inputSchema": {
"properties": {
"days": {
"default": 3,
"description": "The number of days back from the current date to include in the search results. This specifies the time frame of data to be retrieved. Please note that this feature is only available when using the 'news' search topic",
"type": "number"
},
"exclude_domains": {
"default": [],
"description": "List of domains to specifically exclude, if the user asks to exclude a domain set this to the domain of the site",
"items": {
"type": "string"
},
"type": "array"
},
"include_domains": {
"default": [],
"description": "A list of domains to specifically include in the search results, if the user asks to search on specific sites set this to the domain of the site",
"items": {
"type": "string"
},
"type": "array"
},
"include_image_descriptions": {
"default": false,
"description": "Include a list of query-related images and their descriptions in the response",
"type": "boolean"
},
"include_images": {
"default": false,
"description": "Include a list of query-related images in the response",
"type": "boolean"
},
"include_raw_content": {
"default": false,
"description": "Include the cleaned and parsed HTML content of each search result",
"type": "boolean"
},
"max_results": {
"default": 10,
"description": "The maximum number of search results to return",
"maximum": 20,
"minimum": 5,
"type": "number"
},
"query": {
"description": "Search query",
"type": "string"
},
"search_depth": {
"default": "basic",
"description": "The depth of the search. It can be 'basic' or 'advanced'",
"enum": [
"basic",
"advanced"
],
"type": "string"
},
"time_range": {
"description": "The time range back from the current date to include in the search results. This feature is available for both 'general' and 'news' search topics",
"enum": [
"day",
"week",
"month",
"year",
"d",
"w",
"m",
"y"
],
"type": "string"
},
"topic": {
"default": "general",
"description": "The category of the search. This will determine which of our agents will be used for the search",
"enum": [
"general",
"news"
],
"type": "string"
}
},
"required": [
"query"
],
"type": "object"
},
"name": "tavily-search"
},
{
"description": "A powerful web content extraction tool that retrieves and processes raw content from specified URLs, ideal for data collection, content analysis, and research tasks.",
"inputSchema": {
"properties": {
"extract_depth": {
"default": "basic",
"description": "Depth of extraction - 'basic' or 'advanced', if usrls are linkedin use 'advanced' or if explicitly told to use advanced",
"enum": [
"basic",
"advanced"
],
"type": "string"
},
"include_images": {
"default": false,
"description": "Include a list of images extracted from the urls in the response",
"type": "boolean"
},
"urls": {
"description": "List of URLs to extract content from",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"urls"
],
"type": "object"
},
"name": "tavily-extract"
}
]