メタ検索用のMCPサーバー
コンポーネント
このサーバーは、Tavily API を使用して、指定されたクエリに基づいて検索を実行します。
- 検索結果はテキスト形式で返されます。
- 検索結果には、AI 応答、URI、検索結果のタイトルが含まれます。
ツール
このサーバーは次のツールを実装します。
- 検索: 指定されたクエリに基づいて検索を実行します
- 必須引数: "query"
- オプション引数: "search_depth" (基本または詳細)
インストール
- リポジトリをダウンロードします。
git clone https://github.com/YeonwooSung/metasearch-mcp.git
- Claude Desktop 構成ファイルを開きます。
On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
On Windows: `C:\Users\[username]\AppData\Roaming\Claude\claude_desktop_config.json`
- 構成ファイルを次のように編集します。
"mcpServers": {
"tavily-search": {
"command": "uv",
"args": [
"--directory",
"C:\\your_path\\mcp-server-tavily",
"run",
"tavily-search"
],
"env": {
"TAVILY_API_KEY": "YOUR_TAVILY_API_KEY",
"PYTHONIOENCODING": "utf-8"
}
}
}
- Claude Desktop を再起動します。
使用法
Claude Desktop では、「何かを検索してください」と尋ねると、検索結果が表示されます。
検索例:
Please search in detail for today's events in Kamakura
応答例:
According to the search results, the following events start today, December 1st:
"Kamakura Promotion Photo Contest 2025"
Period: December 1, 2024 - January 31, 2025
A photo contest for those who love Kamakura
Applications start accepting from today
Also, as a related upcoming event:
On December 7th, an exhibition by 12 Kamakura artists will be held at the Seibu Press Inn Kamakura Ofuna Station East Exit Lounge.
ログ保存場所
ログは次の場所に保存されます。
Windowsの場合:
C:\Users\[username]\AppData\Roaming\Claude\logs\mcp-server-tavily-search
カーソルによる実行
- 以下のようにシェル スクリプト (例:
script.sh
) を作成します。
#!/bin/bash
TARGET_DIR=/path/to/mcp-server-tavily
cd "${TARGET_DIR}"
export TAVILY_API_KEY="your-api-key"
export PYTHONIOENCODING=utf-8
uv --directory $PWD run tavily-search
- カーソルの MCP サーバー設定を次のように構成します。
Name: tavily-search
Type: command
Command: /path/to/your/script.sh
- 設定を保存します。
- 設定が保存されると、Cursor の Composer-Agent に「何かを検索する」ように依頼すると、検索結果が返されます。
Docker Compose を使用してローカル環境で実行する
目的
Claude Desktop を使用できない Windows/MacOS 以外のオペレーティング システムの場合、このセクションでは、Docker compose を使用してローカル環境で MCP サーバーとクライアントをセットアップして実行する方法について説明します。
手順
- Docker をインストールします。
- リポジトリをダウンロードします。
git clone https://github.com/YeonwooSung/metasearch-mcp.git
- Docker Compose を実行します。
- クライアントを実行します。
docker exec mcp_server uv --directory /usr/src/app/mcp-server-tavily/src run client.py
- 実行結果
- 以下のように利用可能なツールを検索した後、Tavilyにクエリが発行され、応答が返されます。