home / mcp / tavily mcp search mcp server
Provides MCP search capabilities powered by Tavily, delivering fast, reliable results with optional images and news-focused queries.
Configuration
View docs{
"mcpServers": {
"arben-adm-tavily-mcp-search": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-tavily-search/mcp_tavily_search",
"run",
"server.py"
],
"env": {
"TAVILY_API_KEY": "YOUR-API-KEY"
}
}
}
}You can run a Tavily-powered MCP Server that delivers fast, reliable information from business, news, finance, and politics through a developer-friendly interface. This server is designed to handle asynchronous requests, provide clean markdown-formatted results, and recover gracefully from errors or network issues.
Install and run the Tavily MCP Server locally, then connect your MCP client to query information. You can perform basic searches to retrieve up-to-date results, or opt into advanced options like image results and topic-specific searches. Use the server to get concise snippets with source URLs, and rely on built-in error handling and retries for robustness.
Typical usage patterns include performing standard web searches, enabling image results when visual context helps, and requesting news-focused results for timely topics. You can also request raw content when you need full article text or excerpts for deeper analysis. Start with a basic search and progressively enable advanced options as you refine your queries.
Prerequisites you need before installing the Tavily MCP Server:
- Python 3.11 or higher
- UV Package Manager
- Tavily API key (obtain a key from Tavily)
Step-by-step installation and start commands are below. Execute these in your terminal or command prompt.
# 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-API-KEY > .env
# 4. Start server
cd mcp_tavily_search && uv run server.py{
"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"
}
}
}
}The Tavily MCP Server is designed to run from a local development setup. Use the exact command flow shown to start and manage the server, and place your API key in the environment configuration as shown in the setup steps.
Connection issues: Verify your configuration paths, check logs for errors, and ensure the API key is valid. Review server logs for authentication and rate-limit events to identify the cause of failures.
API troubleshooting: Confirm API key permissions, verify network access, and examine server logs for API responses and error codes.
Basic search: Use the standard search flow to retrieve current information on a topic.
Advanced search with images: Enable image results to accompany the textual snippets.
News-specific search: Focus results on news content for timely topics.
Search with raw content: Retrieve full article content when needed for in-depth analysis.
1. Install development dependencies
uv pip install -e ".[dev]"
2. Run tests with pytest
pytest mcp_tavily_searchSecure API key handling through environment variables. Implement automatic request timeouts and comprehensive error logging to monitor health and reliability.
License information and acknowledgments for the Tavily API and MCP protocol contributors.
Performs a Tavily-powered search with options for depth, results limit, image inclusion, and topical focus. Returns markdown-formatted results with content snippets and source URLs.