Tavily Search
STDIOPowerful MCP server powered by Tavily API for high-quality information retrieval.
Powerful MCP server powered by Tavily API for high-quality information retrieval.
I've created a powerful Model Context Protocol (MCP) Server powered by the Tavily API. With this, you can get high-quality, reliable information from business, news, finance, and politics - all through a robust and developer-friendly interface.
In today's fast-paced digital landscape, I recognized the need for quick access to precise information. I needed a web search tool that works with my sequential thinking MCP server. That's why I developed Tavily Search MCP, which excels with:
⚡️ Lightning-fast async search responses
🛡️ Built-in fault tolerance with automatic retries
🎯 Clean, markdown-formatted results
🔍 Smart content snippets
🛠️ Comprehensive error handling
🖼️ Optional image results
📰 Specialized news search
To install Tavily Search for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mcp-tavily-search --client claude
Here's how you can get up and running with my project in minutes:
# 1. Create environment uv venv && .venv\Scripts\activate # Windows # OR uv venv && source .venv/bin/activate # Unix/MacOS # 2. Install dependencies uv pip install -e . # 3. Set up configuration echo TAVILY_API_KEY=your-key-here > .env # 4. Start server cd mcp_tavily_search && uv run server.py
I've optimized the Claude Desktop experience with this configuration:
{ "mcpServers": { "tavily-search": { "command": "uv", "args": [ "--directory", "/path/to/mcp-tavily-search/mcp_tavily_search", "run", "server.py" ], "env": { "TAVILY_API_KEY": "YOUR-API-KEY" } } } }
📁 Configuration paths:
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
I've designed a clean, modular structure to make development a breeze:
mcp-tavily-search/
├── mcp_tavily_search/ # Core package
│ ├── server.py # Server implementation
│ ├── client.py # Tavily API client
│ ├── test_server.py # Server tests
│ ├── test_client.py # Client tests
│ └── __init__.py # Package initialization
├── .env # Environment configuration
├── README.md # Documentation
└── pyproject.toml # Project configuration
Here are some examples of how to use the enhanced search capabilities I've implemented:
{ "name": "search", "arguments": { "query": "Latest news on artificial intelligence" } }
{ "name": "search", "arguments": { "query": "Elon Musk SpaceX achievements", "search_depth": "advanced", "include_images": true, "max_results": 10 } }
{ "name": "search", "arguments": { "query": "Climate change impact on agriculture", "topic": "news", "max_results": 5 } }
{ "name": "search", "arguments": { "query": "Python programming best practices", "include_raw_content": true, "max_results": 3 } }
If things don't work as expected, follow these steps I've outlined:
# Windows type %APPDATA%\Claude\logs\latest.log # Unix/MacOS cat ~/.config/Claude/logs/latest.log
If you're experiencing API issues:
To run the unit tests for this project, follow these steps:
Install the development dependencies:
uv pip install -e ".[dev]"
Run the tests using pytest:
pytest mcp_tavily_search
This will run all the tests in the mcp_tavily_search
directory, including both test_client.py
and test_server.py
.
Security is paramount in my implementation. The server includes:
I've licensed this project under MIT. See the LICENSE file for details.
I'd like to give special thanks to: