tavily-search-mcp-server
The Tavily Search MCP Server integrates the Tavily Search API to provide optimized web search capabilities for LLMs.
Web Search: Execute searches with customizable query parameters
Search Depth: Choose between basic or advanced search depths
Topic Selection: Conduct searches in general or news categories
Time Range Filtering: Filter results by day, week, month, year, or specific days back (for news)
Domain Filtering: Include or exclude specific domains in search results
Result Limiting: Set maximum number of search results returned
Optional Features:
Include related images
Include image descriptions
Include short LLM-generated answers based on search results
Include raw HTML content
Integration Options: Run via NPM or Docker, with stdio or SSE transport options
Installation: Optional automated installation via Smithery for Claude Desktop integration
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tavily-search-mcp-serversearch for latest AI developments in the past week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Tavily Search MCP Server
An MCP server implementation that integrates the Tavily Search API, providing optimized search capabilities for LLMs.
Features
Web Search: Perform web searches optimized for LLMs, with control over search depth, topic, and time range.
Content Extraction: Extracts the most relevant content from search results, optimizing for quality and size.
Optional Features: Include images, image descriptions, short LLM-generated answers, and raw HTML content.
Domain Filtering: Include or exclude specific domains in search results.
Related MCP server: metasearch-mcp
Tools
tavily_search
Execute web searches using the Tavily Search API.
Inputs:
query(string, required): The search query.search_depth(string, optional): "basic" or "advanced" (default: "basic").topic(string, optional): "general" or "news" (default: "general").days(number, optional): Number of days back for news search (default: 3).time_range(string, optional): Time range filter ("day", "week", "month", "year" or "d", "w", "m", "y").max_results(number, optional): Maximum number of results (default: 5).include_images(boolean, optional): Include related images (default: false).include_image_descriptions(boolean, optional): Include descriptions for images (default: false).include_answer(boolean, optional): Include a short LLM-generated answer (default: false).include_raw_content(boolean, optional): Include raw HTML content (default: false).include_domains(string[], optional): Domains to include.exclude_domains(string[], optional): Domains to exclude.
Setup Guide 🚀
1. Prerequisites
Claude Desktop installed on your computer.
A Tavily API key: a. Sign up for a Tavily API account. b. Choose a plan (Free tier available). c. Generate your API key from the Tavily dashboard.
2. Installation
Clone this repository somewhere on your computer:
git clone https://github.com/apappascs/tavily-search-mcp-server.gitInstall dependencies & build the project:
cd tavily-search-mcp-servernpm installnpm run build
3. Integration with Claude Desktop
Open your Claude Desktop configuration file:
# On Mac: ~/Library/Application\ Support/Claude/claude_desktop_config.json # On Windows: %APPDATA%\Claude\claude_desktop_config.jsonAdd one of the following to the
mcpServersobject in your config, depending on whether you want to run the server usingnpmordocker:Option A: Using NPM (stdio transport)
{ "mcpServers": { "tavily-search-server": { "command": "node", "args": [ "/Users/<username>/<FULL_PATH...>/tavily-search-mcp-server/dist/index.js" ], "env": { "TAVILY_API_KEY": "your_api_key_here" } } } }Option B: Using NPM (SSE transport)
{ "mcpServers": { "tavily-search-server": { "command": "node", "args": [ "/Users/<username>/<FULL_PATH...>/tavily-search-mcp-server/dist/sse.js" ], "env": { "TAVILY_API_KEY": "your_api_key_here" }, "port": 3001 } } }Option C: Using Docker
{ "mcpServers": { "tavily-search-server": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "TAVILY_API_KEY", "-v", "/Users/<username>/<FULL_PATH...>/tavily-search-mcp-server:/app", "tavily-search-mcp-server" ], "env": { "TAVILY_API_KEY": "your_api_key_here" } } } }Important Steps:
Replace
/Users/<username>/<FULL_PATH...>/tavily-search-mcp-serverwith the actual full path to where you cloned the repository.Add your Tavily API key in the
envsection. It's always better to have secrets like API keys as environment variables.Make sure to use forward slashes (
/) in the path, even on Windows.If you are using docker make sure you build the image first using
docker build -t tavily-search-mcp-server:latest .
Restart Claude Desktop for the changes to take effect.
Installing via Smithery
To install Tavily Search for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @apappascs/tavily-search-mcp-server --client claudeEnvironment Setup (for npm)
Copy
.env.exampleto.env:cp .env.example .envUpdate the
.envfile with your actual Tavily API key:TAVILY_API_KEY=your_api_key_hereNote: Never commit your actual API key to version control. The
.envfile is ignored by git for security reasons.
Running with NPM
Start the server using Node.js:
node dist/index.jsFor sse transport:
node dist/sse.jsRunning with Docker
Build the Docker image (if you haven't already):
docker build -t tavily-search-mcp-server:latest .Run the Docker container with:
For stdio transport:
docker run -it --rm -e TAVILY_API_KEY="your_api_key_here" tavily-search-mcp-server:latestFor sse transport:
docker run -it --rm -p 3001:3001 -e TAVILY_API_KEY="your_api_key_here" -e TRANSPORT="sse" tavily-search-mcp-server:latestYou can also leverage your shell's environment variables directly, which is a more secure practice:
docker run -it --rm -p 3001:3001 -e TAVILY_API_KEY=$TAVILY_API_KEY -e TRANSPORT="sse" tavily-search-mcp-server:latestNote: The second command demonstrates the recommended approach of using
-e TAVILY_API_KEY=$TAVILY_API_KEYto pass the value of yourTAVILY_API_KEYenvironment variable into the Docker container. This keeps your API key out of your command history, and it is generally preferred over hardcoding secrets in commands.Using docker compose
Run:
docker compose up -dTo stop the server:
docker compose down
License
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Available Tools
1 tooltavily_searchA
Performs a web search using the Tavily Search API, optimized for LLMs. Use this for broad information gathering, recent events, or when you need diverse web sources. Supports search depth, topic selection, time range filtering, and domain inclusion/exclusion.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query. | |
| search_depth | No | The depth of the search. It can be "basic" or "advanced". | basic |
| topic | No | The category of the search. Currently: only "general" and "news" are supported. | general |
| days | No | The number of days back from the current date to include in the search results (for news topic). | |
| time_range | No | The time range back from the current date to include in the search results. Accepted values include "day","week","month","year" or "d","w","m","y". | |
| max_results | No | The maximum number of search results to return. | |
| include_images | No | Include a list of query-related images in the response. | |
| include_image_descriptions | No | When include_images is set to True, this option adds descriptive text for each image. | |
| include_answer | No | Include a short answer to original query, generated by an LLM based on Tavily's search results. | |
| include_raw_content | No | Include the cleaned and parsed HTML content of each search result. | |
| include_domains | No | A list of domains to specifically include in the search results. | |
| exclude_domains | No | A list of domains to specifically exclude from the search results. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool is 'optimized for LLMs' and supports various features like search depth and filtering, which adds useful context. However, it doesn't cover important behavioral aspects such as rate limits, authentication needs, error handling, or what the output looks like (especially since there's no output schema).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by usage guidelines and key features. Every sentence earns its place by adding value without redundancy, making it efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (12 parameters, no annotations, no output schema), the description is somewhat complete but has gaps. It covers purpose and usage well, but lacks details on output format, error cases, or operational constraints like rate limits. For a tool with rich input schema but no output schema, more behavioral context would be beneficial.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description mentions that the tool 'supports search depth, topic selection, time range filtering, and domain inclusion/exclusion,' which aligns with some parameters in the schema. However, with 100% schema description coverage, the schema already documents all 12 parameters thoroughly. The description adds minimal value beyond what the schema provides, meeting the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool 'performs a web search using the Tavily Search API, optimized for LLMs,' which specifies the verb (performs web search), resource (Tavily Search API), and target audience (LLMs). It distinguishes itself by mentioning optimization for LLMs, though without sibling tools, full differentiation cannot be assessed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use the tool: 'for broad information gathering, recent events, or when you need diverse web sources.' This gives explicit guidance on appropriate use cases. However, it lacks exclusions or alternatives, which would be needed for a perfect score.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'tavily_search' has a clear, distinct purpose focused on web search functionality.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against. The name 'tavily_search' follows a clear and descriptive pattern.
One tool is too few for a server with a broad purpose like web search, as it lacks complementary operations such as filtering results, managing search history, or handling different search types. This minimal scope limits agent workflows and feels incomplete.
The tool surface is severely incomplete for a web search domain; it only provides a basic search function without supporting operations like refining searches, saving results, or accessing search metadata. This creates significant gaps that will hinder agent effectiveness.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Related MCP Servers
- FlicenseCqualityDmaintenanceAn MCP protocol server that enables web search functionality using the Tavily API, allowing AI assistants to perform internet searches in real-time.44
- AlicenseNot gradedqualityDmaintenanceMCP server for using various search tools like Tavily API. Planning to support various search tools (i.e. wiki search, searxng, etc)3MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables web search and document retrieval capabilities through Tavily API and LangConnect vector database, supporting AI agents in gathering information for comprehensive report generation.22
- FlicenseBqualityDmaintenanceMCP server using Tavily API for web search, enabling web search queries via stdio transport.5
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/apappascs/tavily-search-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server