Tavily MCP Server
Tavily MCP Server 🚀
🔌 Compatible with both Cursor and Claude Desktop!
Tavily MCP is also compatible with any MCP client
📚 Check out our tutorial on combining Tavily MCP with Neo4j MCP server!
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
Prerequisites 🔧
Before you begin, ensure you have:
- Tavily API key
- If you don't have a Tavily API key, you can sign up for a free account here
- Claude Desktop or Cursor
- Node.js (v20 or higher)
- You can verify your Node.js installation by running:
node --version
- You can verify your Node.js installation by running:
- Git installed (only needed if using Git installation method)
- On macOS:
brew install git
- On Linux:
- Debian/Ubuntu:
sudo apt install git
- RedHat/CentOS:
sudo yum install git
- Debian/Ubuntu:
- On Windows: Download Git for Windows
- On macOS:
Tavily MCP server installation ⚡
To install the tavily-mcp server, you can use the following methods:
- Running with NPX
- Git installation
1. Running with NPX
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.
Configuring MCP Clients ⚙️
This repository will explain how to configure both Cursor and Claude Desktop to work with the tavily-mcp server.
Configuring Cursor 🖥️
Note: Requires Cursor version 0.45.6 or higher
To set up the Tavily MCP server in Cursor:
- Open Cursor Settings
- Navigate to Features > MCP Servers
- Click on the "+ Add New MCP Server" button
- Fill out the following information:
- Name: Enter a nickname for the server (e.g., "tavily-mcp")
- Type: Select "command" as the type
- Command: Enter the command to run the server:Copy
Important: Replace
your-api-key
with your Tavily API key. You can get one at app.tavily.com/home
After 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.
Configuring the Claude Desktop app 🖥️
For macOS:
For Windows:
Add the Tavily server configuration:
Replace your-api-key-here
with your actual Tavily API key.
2. Git Installation
- Clone the repository:
- Install dependencies:
- Build the project:
Configuring the Claude Desktop app ⚙️
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.
Usage in Claude Desktop App 🎯
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.
Tavily Search Examples
- General Web Search:
- News Search:
- Domain-Specific Search:
Tavily Extract Examples
- Extract Article Content:
✨ Combine Search and Extract ✨
You can also combine the tavily-search and tavily-extract tools to perform more complex tasks.
Troubleshooting 🛠️
Common Issues
- Server Not Found
- Verify the npm installation by running
npm --verison
- Check Claude Desktop configuration syntax by running
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
- Ensure Node.js is properly installed by running
node --version
- Verify the npm installation by running
- NPX related issues
- If you encounter errors related to
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
- Confirm your Tavily API key is valid
- Check the API key is correctly set in the config
- Verify no spaces or quotes around the API key
Acknowledgments ✨
- Model Context Protocol for the MCP specification
- Anthropic for Claude Desktop
You must be authenticated.
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.