This MCP server leverages the Tavily API to provide AI-powered search capabilities for AI assistants. It allows assistants to perform web searches and retrieve relevant, up-to-date information with features like search depths, rich search results, AI-generated summaries, and comprehensive search history storage.
git clone https://github.com/it-beard/tavily-server.git
cd tavily-mcp-server
npm install
npm run build
If you're using Cline (the VSCode extension for Claude), create or modify the MCP settings file at:
~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
%APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
~/.config/Cursor/User/globalStorage/saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Add the following configuration (replace paths and API key with your own):
{
"mcpServers": {
"tavily": {
"command": "node",
"args": ["/path/to/tavily-server/build/index.js"],
"env": {
"TAVILY_API_KEY": "your-api-key-here"
}
}
}
}
If you're using the Claude Desktop app, modify the configuration file at:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
Use the same configuration format as shown above.
For other MCP clients, consult their documentation for the correct configuration file location and format. The server configuration should include:
node
)The server provides a single tool named search
with the following parameters:
query
(string): The search query to executesearch_depth
(string): Either "basic" (faster) or "advanced" (more comprehensive)// Example using the MCP SDK
const result = await mcpClient.callTool("tavily", "search", {
query: "latest developments in artificial intelligence",
search_depth: "basic"
});
The server provides both static and dynamic resources for flexible data access:
tavily://last-search/result
: Returns the results of the most recent search query
tavily://search/{query}
: Access search results for any query
tavily://search/artificial%20intelligence
interface SearchResponse {
query: string;
answer: string;
results: Array<{
title: string;
url: string;
content: string;
score: number;
}>;
response_time: number;
}
The server implements comprehensive persistent storage for search results:
data
directorydata/searches.json
contains all historical search resultsThere are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.