home / mcp / tavily mcp server
Production-ready MCP server providing web search via Tavily API for MCP-compatible assistants.
Configuration
View docs{
"mcpServers": {
"altinakseven-tavily-mcp-server": {
"command": "node",
"args": [
"/home/ubuntu/roo-tavily/tavily-mcp-server/dist/index.js"
],
"env": {
"NODE_ENV": "production",
"TAVILY_API_KEY": "YOUR_API_KEY"
}
}
}
}You run a production-ready MCP server that provides web search capabilities via the Tavily API. It integrates with MCP-compatible assistants, offering direct answers, configurable results, and secure key management for use in your MCP workflows.
You connect to the Tavily MCP Server from an MCP client to perform web searches and receive structured results. Use the server as a tool in your MCP workspace to query the Tavily API and retrieve direct answers when available, along with a list of relevant results and optional follow-up questions. Configure your client to route web_search requests to the Tavily MCP Server, and pass parameters such as the query string, desired search depth, and maximum results. Ensure your client provides the Tavily API key in the environment when starting the server so all requests are authenticated.
Prerequisites: Node.js 18+, npm or yarn, a Tavily API key, and PM2 for production deployment.
# 1) Install dependencies
npm install
# 2) Set your API key
export TAVILY_API_KEY="your-api-key-here"
# 3) Run tests (optional)
npm test
npm run test:coverage
# 4) Deploy with PM2 (example)
./deploy.shThe server exposes its MCP endpoints as a local stdio service that you can run directly in your MCP setup. Two common local configurations are shown here. Each configuration runs the server from its built distribution and passes the Tavily API key through the environment.
{
"mcpServers": [
{
"type": "stdio",
"name": "tavily_search_global",
"command": "node",
"args": ["/home/ubuntu/roo-tavily/tavily-mcp-server/dist/index.js"],
"env": {
"TAVILY_API_KEY": "your-api-key-here"
}
},
{
"type": "stdio",
"name": "tavily_search_project",
"command": "node",
"args": ["./tavily-mcp-server/dist/index.js"],
"env": {
"TAVILY_API_KEY": "your-api-key-here"
}
}
]
}Your Tavily API key is required to run the server. Store it in the environment and ensure it is provided to any MCP client or deployment process that launches the server. Use the production-ready environment setting where applicable to enable appropriate logging and monitoring.
The server is designed for production use with full logging and process monitoring. If you encounter issues, check the PM2 logs for the Tavily MCP Server and verify that the Tavily API key is valid and has access to the Tavily API.
This server focuses on web search capabilities and integrates with MCP-compatible assistants. For best results, keep your Tavily API key secure and rotate credentials as needed. Ensure your MCP client configuration points to the correct stdio server instance and passes the expected environment variables.
Search the web using Tavily's AI-optimized search API and return a direct answer (if available) along with a list of relevant results and publication details.