MCP タビリー
高度な検索およびコンテンツ抽出機能を提供する、Tavily API 用のモデル コンテキスト プロトコル (MCP) サーバー実装。
特徴
複数の検索ツール:
search: カスタマイズ可能なオプションを備えた基本的な検索機能searchContext: コンテキスト認識検索で関連性を向上searchQNA: 質問と回答に焦点を当てた検索
コンテンツ抽出: 設定可能なオプションを使用して URL からコンテンツを抽出します
豊富な設定オプション: 検索の深さ、フィルタリング、コンテンツを含めるための広範なオプション
MCPでの使用
Tavily MCP サーバーを MCP 構成に追加します。
{
"mcpServers": {
"tavily": {
"command": "npx",
"args": ["-y", "@mcptools/mcp-tavily"],
"env": {
"TAVILY_API_KEY": "your-api-key"
}
}
}
}注:
your-api-key実際のTavily APIキーに置き換えてください。サーバーを実行する前に、環境変数TAVILY_API_KEYに設定することもできます。
Related MCP server: Deep Research MCP Server
APIリファレンス
検索ツール
サーバーは、MCP を通じて呼び出すことができる 3 つの検索ツールを提供します。
1. 基本検索
// Tool name: search
{
query: "artificial intelligence",
options: {
searchDepth: "advanced",
topic: "news",
maxResults: 10
}
}2. コンテキスト検索
// Tool name: searchContext
{
query: "latest developments in AI",
options: {
topic: "news",
timeRange: "week"
}
}3. Q&A検索
// Tool name: searchQNA
{
query: "What is quantum computing?",
options: {
includeAnswer: true,
maxResults: 5
}
}抽出ツール
// Tool name: extract
{
urls: ["https://example.com/article1", "https://example.com/article2"],
options: {
extractDepth: "advanced",
includeImages: true
}
}検索オプション
すべての検索ツールには次のオプションが共通しています。
interface SearchOptions {
searchDepth?: "basic" | "advanced"; // Search depth level
topic?: "general" | "news" | "finance"; // Search topic category
days?: number; // Number of days to search
maxResults?: number; // Maximum number of results
includeImages?: boolean; // Include images in results
includeImageDescriptions?: boolean; // Include image descriptions
includeAnswer?: boolean; // Include answer in results
includeRawContent?: boolean; // Include raw content
includeDomains?: string[]; // List of domains to include
excludeDomains?: string[]; // List of domains to exclude
maxTokens?: number; // Maximum number of tokens
timeRange?: "year" | "month" | "week" | "day" | "y" | "m" | "w" | "d"; // Time range for search
}抽出オプション
interface ExtractOptions {
extractDepth?: "basic" | "advanced"; // Extraction depth level
includeImages?: boolean; // Include images in results
}応答フォーマット
すべてのツールは次の形式で応答を返します。
{
content: Array<{
type: "text",
text: string
}>
}検索結果の各項目には次のものが含まれます。
タイトル
コンテンツ
URL
抽出されたコンテンツの場合、各項目には次のものが含まれます。
URL
生のコンテンツ
失敗した URL リスト(ある場合)
エラー処理
すべてのツールには適切なエラー処理機能が備わっており、問題が発生した場合には説明的なエラー メッセージが表示されます。
インストール
Smithery経由でインストール
Smithery経由で Claude Desktop 用の Tavily API Server を自動的にインストールするには:
npx -y @smithery/cli install @kshern/mcp-tavily --client claude手動インストール
npm install @mcptools/mcp-tavilyまたは、npx で直接使用します。
npx @mcptools/mcp-tavily前提条件
Node.js 16以上
npmまたはyarn
Tavily API キー ( Tavilyから取得)
設定
リポジトリをクローンする
依存関係をインストールします:
npm installTavily API キーを設定します。
export TAVILY_API_KEY=your_api_key建物
npm run buildMCP Inspectorによるデバッグ
開発とデバッグには、MCP サーバー用の強力な開発ツールであるMCP Inspector の使用をお勧めします。
インスペクターは次のユーザー インターフェイスを提供します。
テストツールの呼び出し
サーバー応答の表示
デバッグツールの実行
サーバーの状態を監視する
貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。
リポジトリをフォークする
機能ブランチを作成します(
git checkout -b feature/AmazingFeature)変更をコミットします(
git commit -m 'Add some AmazingFeature')ブランチにプッシュする (
git push origin feature/AmazingFeature)プルリクエストを開く
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています。
サポート
ご質問や問題がある場合は、
Tavily API: Tavilyのドキュメントを参照してください
MCP統合: MCPドキュメントを参照してください