tavily-search-mcp-server
Tavily Search MCP サーバー
Tavily Search API を統合し、LLM に最適化された検索機能を提供する MCP サーバー実装。
特徴
**Web 検索:**検索の深さ、トピック、時間範囲を制御しながら、LLM 向けに最適化された Web 検索を実行します。
**コンテンツ抽出:**検索結果から最も関連性の高いコンテンツを抽出し、品質とサイズを最適化します。
**オプション機能:**画像、画像の説明、LLM によって生成された短い回答、生の HTML コンテンツを含めます。
**ドメイン フィルタリング:**検索結果に特定のドメインを含めるか除外します。
Related MCP server: metasearch-mcp
ツール
タビリー検索
Tavily Search API を使用して Web 検索を実行します。
入力:
query(文字列、必須): 検索クエリ。search_depth(文字列、オプション): "basic" または "advanced" (デフォルト: "basic")。topic(文字列、オプション): "general" または "news" (デフォルト: "general")。days(数値、オプション): ニュース検索を遡る日数 (デフォルト: 3)。time_range(文字列、オプション): 時間範囲フィルター (「day」、「week」、「month」、「year」または「d」、「w」、「m」、「y」)。max_results(数値、オプション): 結果の最大数 (デフォルト: 5)。include_images(ブール値、オプション): 関連画像を含めます (デフォルト: false)。include_image_descriptions(ブール値、オプション): 画像の説明を含めます (デフォルト: false)。include_answer(ブール値、オプション): LLM によって生成された短い回答を含めます (デフォルト: false)。include_raw_content(ブール値、オプション): 生の HTML コンテンツを含めます (デフォルト: false)。include_domains(文字列[], オプション): 含めるドメイン。exclude_domains(文字列[], オプション): 除外するドメイン。
セットアップガイド🚀
1. 前提条件
Claude Desktop がコンピュータにインストールされました。
Tavily API キー: a. Tavily API アカウントにサインアップします。b. プランを選択します (無料利用枠あり)。c. Tavily ダッシュボードから API キーを生成します。
2. インストール
このリポジトリをコンピューターのどこかにクローンします:
git clone https://github.com/apappascs/tavily-search-mcp-server.git依存関係をインストールしてプロジェクトをビルドします。
cd tavily-search-mcp-servernpm installnpm run build
3. Claude Desktopとの統合
Claude Desktop 構成ファイルを開きます。
# On Mac: ~/Library/Application\ Support/Claude/claude_desktop_config.json # On Windows: %APPDATA%\Claude\claude_desktop_config.jsonnpmまたはdockerのどちらを使用してサーバーを実行するかに応じて、構成内のmcpServersオブジェクトに次のいずれかを追加します。オプション A: NPM (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" } } } }オプション B: NPM (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 } } }オプションC: 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" } } } }重要な手順:
/Users/<username>/<FULL_PATH...>/tavily-search-mcp-serverを、リポジトリのクローンを作成した実際のフルパスに置き換えます。envセクションに Tavily API キーを追加します。APIキーなどの秘密情報は環境変数として保存しておくことをお勧めします。Windows の場合でも、パスには必ずスラッシュ (
/) を使用してください。docker を使用している場合は、まず
docker build -t tavily-search-mcp-server:latest .
変更を有効にするには、Claude Desktop を再起動してください。
Smithery経由でインストール
Smithery経由で Claude Desktop の Tavily Search を自動的にインストールするには:
npx -y @smithery/cli install @apappascs/tavily-search-mcp-server --client claude環境設定(npm用)
.env.exampleを.envにコピーします。cp .env.example .env実際の Tavily API キーを使用して
.envファイルを更新します。TAVILY_API_KEY=your_api_key_here注意:実際のAPIキーをバージョン管理にコミットしないでください。.envファイル
.envセキュリティ上の理由からGitによって無視されます。
NPMで実行する
Node.js を使用してサーバーを起動します。
node dist/index.jsSSE輸送の場合:
node dist/sse.jsDockerで実行する
Docker イメージをビルドします (まだビルドしていない場合)。
docker build -t tavily-search-mcp-server:latest .次のコマンドで Docker コンテナを実行します。
stdio トランスポートの場合:
docker run -it --rm -e TAVILY_API_KEY="your_api_key_here" tavily-search-mcp-server:latestSSE輸送の場合:
docker run -it --rm -p 3001:3001 -e TAVILY_API_KEY="your_api_key_here" -e TRANSPORT="sse" tavily-search-mcp-server:latestより安全な方法として、シェルの環境変数を直接利用することもできます。
docker run -it --rm -p 3001:3001 -e TAVILY_API_KEY=$TAVILY_API_KEY -e TRANSPORT="sse" tavily-search-mcp-server:latest注: 2番目のコマンドは
-e TAVILY_API_KEY=$TAVILY_API_KEYを使用してTAVILY_API_KEY環境変数の値をDockerコンテナに渡すという推奨アプローチを示しています。これにより、APIキーがコマンド履歴に記録されなくなり、コマンドにシークレットをハードコーディングするよりも一般的に推奨されます。docker composeを使用する
走る:
docker compose up -dサーバーを停止するには:
docker compose down
ライセンス
このMCPサーバーはMITライセンスに基づいてライセンスされています。つまり、MITライセンスの条件に従って、ソフトウェアを自由に使用、改変、配布することができます。詳細については、プロジェクトリポジトリのLICENSEファイルをご覧ください。
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-