home / mcp / mcp tavily search mcp server
Provides internet search capabilities via Tavily API to MCP clients with a local Python workflow.
Configuration
View docs{
"mcpServers": {
"algonacci-mcp-tavily-search": {
"command": "uv",
"args": [
"--directory",
"%USERPROFILE%/Documents/GitHub/mcp-tavily-search",
"run",
"python",
"main.py"
],
"env": {
"TAVILY_API_KEY": "YOUR_API_KEY"
}
}
}
}This MCP Server enables a client to perform internet searches through Tavily by running a Python-based search workflow. It is useful for integrating online search capabilities into your applications via the MCP framework while keeping authentication via an API key separate.
You will run this MCP server alongside your other MCP servers. The server executes a Python script that interfaces with Tavily’s search API using your API key. In your MCP client, you can start a search action that delegates the query to this server, then handle the results within your app.
To use it in your workflow, ensure your MCP client is configured to load this Tavily search MCP server. When you trigger a search through your client, the request will be processed by this server, which returns search results that your application can display or further analyze.
Prerequisites you need before installing this MCP server: a working Python environment and the MCP runtime tool you use (uv). Ensure you have your operating system’s environment ready to run Python scripts via the MCP runner.
1) Create or edit your MCP configuration to include the Tavily search server. Use the following configuration block in your MCP config file:
{
"mcpServers": {
"tavily_search": {
"command": "uv",
"args": [
"--directory",
"%USERPROFILE%/Documents/GitHub/mcp-tavily-search",
"run",
"python",
"main.py"
]
}
}
}Security-wise, provide your Tavily API key via a .env file in the expected location for your environment, as the server reads the API key from TAVILY_API_KEY. Create the following environment file in the project root or as specified by your deployment workflow.
Environment example you can adapt: create a file named .env in the project directory and add the line TAVILY_API_KEY=YOUR_API_KEY.
The Tavily search MCP server runs as a local process started by the MCP runtime. The key details to remember are the directory path for your project and the Python entry file main.py.