tavily-search-mcp-server
Servidor MCP de búsqueda de Tavily
Una implementación de servidor MCP que integra la API de búsqueda de Tavily y proporciona capacidades de búsqueda optimizadas para LLM.
Características
Búsqueda web: realice búsquedas web optimizadas para LLM, con control sobre la profundidad de búsqueda, el tema y el rango de tiempo.
Extracción de contenido: extrae el contenido más relevante de los resultados de búsqueda, optimizándolo según la calidad y el tamaño.
Características opcionales: incluya imágenes, descripciones de imágenes, respuestas breves generadas por LLM y contenido HTML sin formato.
Filtrado de dominios: incluya o excluya dominios específicos en los resultados de búsqueda.
Related MCP server: metasearch-mcp
Herramientas
búsqueda de tavily
Ejecute búsquedas web utilizando la API de búsqueda de Tavily.
Entradas:
query(cadena, obligatoria): la consulta de búsqueda.search_depth(cadena, opcional): "básico" o "avanzado" (predeterminado: "básico").topic(cadena, opcional): "general" o "noticias" (predeterminado: "general").days(número, opcional): Número de días atrás para la búsqueda de noticias (predeterminado: 3).time_range(cadena, opcional): filtro de rango de tiempo ("día", "semana", "mes", "año" o "d", "s", "m", "a").max_results(número, opcional): Número máximo de resultados (predeterminado: 5).include_images(booleano, opcional): incluye imágenes relacionadas (predeterminado: falso).include_image_descriptions(booleano, opcional): incluye descripciones de las imágenes (valor predeterminado: falso).include_answer(booleano, opcional): incluye una respuesta corta generada por LLM (valor predeterminado: falso).include_raw_content(booleano, opcional): incluye contenido HTML sin procesar (predeterminado: falso).include_domains(string[], opcional): Dominios a incluir.exclude_domains(string[], opcional): Dominios a excluir.
Guía de configuración 🚀
1. Requisitos previos
Claude Desktop instalado en su computadora.
Clave API de Tavily: a. Crea una cuenta API de Tavily . b. Elige un plan (disponible en versión gratuita). c. Genera tu clave API desde el panel de Tavily.
2. Instalación
Clona este repositorio en algún lugar de tu computadora:
git clone https://github.com/apappascs/tavily-search-mcp-server.gitInstalar dependencias y compilar el proyecto:
cd tavily-search-mcp-servernpm installnpm run build
3. Integración con Claude Desktop
Abra el archivo de configuración de Claude Desktop:
# On Mac: ~/Library/Application\ Support/Claude/claude_desktop_config.json # On Windows: %APPDATA%\Claude\claude_desktop_config.jsonAgregue uno de los siguientes al objeto
mcpServersen su configuración, dependiendo de si desea ejecutar el servidor usandonpmodocker:Opción A: Uso de NPM (transporte stdio)
{ "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" } } } }Opción B: Uso de NPM (transporte SSE)
{ "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 } } }Opción C: Usar 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" } } } }Pasos importantes:
Reemplace
/Users/<username>/<FULL_PATH...>/tavily-search-mcp-servercon la ruta completa real al lugar donde clonó el repositorio.Añade tu clave API de Tavily en la sección
env. Siempre es recomendable tener secretos como las claves API como variables de entorno.Asegúrese de utilizar barras diagonales (
/) en la ruta, incluso en Windows.Si está usando Docker, asegúrese de compilar la imagen primero usando
docker build -t tavily-search-mcp-server:latest .
Reinicie Claude Desktop para que los cambios surtan efecto.
Instalación mediante herrería
Para instalar Tavily Search para Claude Desktop automáticamente a través de Smithery :
npx -y @smithery/cli install @apappascs/tavily-search-mcp-server --client claudeConfiguración del entorno (para npm)
Copiar
.env.examplea.env:cp .env.example .envActualice el archivo
.envcon su clave API de Tavily actual:TAVILY_API_KEY=your_api_key_hereNota: Nunca envíes tu clave API al control de versiones. Git ignora el archivo
.envpor seguridad.
Corriendo con NPM
Inicie el servidor usando Node.js:
node dist/index.jsPara transporte sse:
node dist/sse.jsEjecutando con Docker
Construya la imagen de Docker (si aún no lo ha hecho):
docker build -t tavily-search-mcp-server:latest .Ejecute el contenedor Docker con:
Para el transporte de stdio:
docker run -it --rm -e TAVILY_API_KEY="your_api_key_here" tavily-search-mcp-server:latestPara transporte sse:
docker run -it --rm -p 3001:3001 -e TAVILY_API_KEY="your_api_key_here" -e TRANSPORT="sse" tavily-search-mcp-server:latestTambién puedes aprovechar directamente las variables de entorno de tu shell, lo que es una práctica más segura:
docker run -it --rm -p 3001:3001 -e TAVILY_API_KEY=$TAVILY_API_KEY -e TRANSPORT="sse" tavily-search-mcp-server:latestNota: El segundo comando muestra el enfoque recomendado: usar
-e TAVILY_API_KEY=$TAVILY_API_KEYpara pasar el valor de la variable de entornoTAVILY_API_KEYal contenedor Docker. Esto evita que la clave API se incluya en el historial de comandos y, por lo general, se prefiere a codificar los secretos en los comandos.Usando Docker Compose
Correr:
docker compose up -dPara detener el servidor:
docker compose down
Licencia
Este servidor MCP cuenta con la licencia MIT. Esto significa que puede usar, modificar y distribuir el software libremente, sujeto a los términos y condiciones de la licencia MIT. Para más detalles, consulte el archivo de LICENCIA en el repositorio del proyecto.
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.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
tavily_search
TDQS
Scored across 1 tool
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
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.23-
- FlicenseBqualityDmaintenanceMCP server using Tavily API for web search, enabling web search queries via stdio transport.5-