🔍 My Tavily Search MCP Agent
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.
🌟 Why I Built Tavily Search MCP
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
🚀 Quick Start
Installing via Smithery
To install Tavily Search for Claude Desktop automatically via Smithery:
Installing Manually
Here's how you can get up and running with my project in minutes:
💡 Core Features
⚡️ Performance & Reliability
- I've implemented asynchronous request handling
- Built-in error handling and automatic retries
- Configurable request timeouts
- Comprehensive logging system
🎯 Search Configuration
- I've made the search depth configurable (basic/advanced)
- Adjustable result limits (1-20 results)
- Clean markdown-formatted output
- Snippet previews with source URLs
- Optional image results
- Specialized news search topic
🛡️ Error Handling
- API authentication validation
- Rate limit detection
- Network error recovery
- Request timeout management
🛠️ Developer Integration
Prerequisites
- Python 3.11 or higher
- UV Package Manager (Installation Guide)
- Tavily API key (Get one here)
Claude Desktop Setup
I've optimized the Claude Desktop experience with this configuration:
📁 Configuration paths:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Unix/MacOS:
~/.config/Claude/claude_desktop_config.json
Project Architecture
I've designed a clean, modular structure to make development a breeze:
Key Components
Server (server.py)
- I've implemented the MCP protocol
- Request handling and routing
- Error recovery and health monitoring
Client (client.py)
- Tavily API integration
- Retry mechanism with exponential backoff
- Result formatting and processing
- Error handling and logging
Tests (test_server.py and test_client.py)
- Comprehensive unit tests for both server and client
- Ensures reliability and correctness of the implementation
Usage Examples
Here are some examples of how to use the enhanced search capabilities I've implemented:
- Basic search:
- Advanced search with images:
- News-specific search:
- Search with raw content:
Troubleshooting Guide
Connection Issues
If things don't work as expected, follow these steps I've outlined:
- Verify your configuration paths
- Check the Claude Desktop logs:Copy
- Test the server manually using the quick start commands
API Troubleshooting
If you're experiencing API issues:
- Validate your API key permissions
- Check your network connection
- Monitor the API response in the server logs
Running Tests
To run the unit tests for this project, follow these steps:
- Install the development dependencies:Copy
- Run the tests using pytest:Copy
This will run all the tests in the mcp_tavily_search
directory, including both test_client.py
and test_server.py
.
Community and Support
- I encourage you to report issues and contribute on GitHub
- Share your implementations and improvements
- Join our discussions and help others
Security and Best Practices
Security is paramount in my implementation. The server includes:
- Secure API key handling through environment variables
- Automatic request timeout management
- Comprehensive error tracking and logging
License
I've licensed this project under MIT. See the LICENSE file for details.
Acknowledgments
I'd like to give special thanks to:
- The innovative Tavily API team
- The MCP protocol community
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
This MCP server performs multi-topic searches in business, news, finance, and politics using the Tavily API, providing high-quality sources and intelligent summaries.
- 🌟 Why I Built Tavily Search MCP
- 🚀 Quick Start
- 💡 Core Features
- 🛠️ Developer Integration
- Project Architecture
- Key Components
- Usage Examples
- Troubleshooting Guide
- Running Tests
- Community and Support
- Security and Best Practices
- License
- Acknowledgments
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityMCP Server for AI Summarization, Support for multiple content types: * Plain text * Web pages * PDF documents * EPUB books * HTML contentLast updated -199JavaScript
- AsecurityFlicenseAqualityAn MCP protocol server that enables web search functionality using the Tavily API, allowing AI assistants to perform internet searches in real-time.Last updated -42Python
- AsecurityAlicenseAqualityAn MCP protocol server that provides access to supOS open APIs, allowing MCP-compatible clients to query topic tree structures and details.Last updated -21297JavaScriptApache 2.0
- AsecurityAlicenseAqualityAn MCP server that enables searching various content types (news, blogs, shopping, images, etc.) through Naver's search API.Last updated -197309TypeScriptMIT License