WebSearch
WebSearch - 高度なWeb検索およびコンテンツ抽出ツール
Python で構築された強力な Web 検索およびコンテンツ抽出ツールで、Firecrawl API を活用して高度な Web スクレイピング、検索、コンテンツ分析機能を実現します。
🚀 機能
高度なウェブ検索: カスタマイズ可能なパラメータを使用してインテリジェントなウェブ検索を実行します
コンテンツ抽出:自然言語プロンプトを使用してWebページから特定の情報を抽出します
Web クロール: 設定可能な深さと制限で Web サイトをクロールします
Webスクレイピング: さまざまな出力形式をサポートしたWebページをスクレイピングします
MCP統合:シームレスな統合を実現するモデルコンテキストプロトコル(MCP)サーバーとして構築
Related MCP server: Firecrawl MCP Server
📋 前提条件
Python 3.8以上
UVパッケージマネージャー
Firecrawl APIキー
OpenAI API キー(オプション、拡張機能用)
Tavily API キー(オプション、追加の検索機能用)
🛠️ インストール
uvをインストールします:
# On Windows (using pip)
pip install uv
# On Unix/MacOS
curl -LsSf https://astral.sh/uv/install.sh | sh
# Add uv to PATH (Unix/MacOS)
export PATH="$HOME/.local/bin:$PATH"
# Add uv to PATH (Windows - add to Environment Variables)
# Add: %USERPROFILE%\.local\binリポジトリをクローンします。
git clone https://github.com/yourusername/websearch.git
cd websearchuv を使用して仮想環境を作成し、アクティブ化します。
# Create virtual environment
uv venv
# Activate on Windows
.\.venv\Scripts\activate.ps1
# Activate on Unix/MacOS
source .venv/bin/activateuv を使用して依存関係をインストールします。
# Install from requirements.txt
uv sync環境変数を設定します。
# Create .env file
touch .env
# Add your API keys
FIRECRAWL_API_KEY=your_firecrawl_api_key
OPENAI_API_KEY=your_openai_api_key🎯 使用方法
Claude のデスクトップ版の設定
サーバーを直接実行する代わりに、Claude for Desktop が WebSearch ツールにアクセスするように構成できます。
Claude for Desktop 構成ファイルを見つけるか作成します。
Windows:
%env:AppData%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
WebSearch サーバー構成を
mcpServersセクションに追加します。
{
"mcpServers": {
"websearch": {
"command": "uv",
"args": [
"--directory",
"D:\\ABSOLUTE\\PATH\\TO\\WebSearch",
"run",
"main.py"
]
}
}
}ディレクトリ パスを、WebSearch プロジェクト フォルダーへの絶対パスに置き換えてください。
設定ファイルを保存し、Claude for Desktop を再起動します。
設定が完了すると、WebSearch ツールが Claude for Desktop のツール メニュー (ハンマー アイコン) に表示されます。
利用可能なツール
検索
情報抽出
ウェブサイトをクロールする
コンテンツをスクレイピングする
📚 APIリファレンス
検索
query(str): 検索クエリ戻り値: JSON形式の検索結果
抽出する
urls(List[str]): 情報を抽出するURLのリストprompt(str): 抽出の指示enableWebSearch(bool): 補助的なウェブ検索を有効にするshowSources(bool): ソース参照を含める戻り値: 指定された形式で抽出された情報
クロール
url(str): 開始URLmaxDepth(int): 最大クロール深度limit(int): クロールする最大ページ数戻り値: クロールされたコンテンツをマークダウン/HTML形式で返します
削る
url(str): ターゲットURL戻り値: オプションのスクリーンショットを含むスクレイピングされたコンテンツ
🔧 構成
環境変数
このツールが機能するには特定のAPIキーが必要です。テンプレートとして使用できる.env.exampleファイルをご用意しております。
サンプルファイルをコピーします。
# On Unix/MacOS
cp .env.example .env
# On Windows
copy .env.example .envAPI キーを使用して
.envファイルを編集します。
# OpenAI API key - Required for AI-powered features
OPENAI_API_KEY=your_openai_api_key_here
# Firecrawl API key - Required for web scraping and searching
FIRECRAWL_API_KEY=your_firecrawl_api_key_hereAPIキーの取得
OpenAI APIキー:
OpenAIのプラットフォームを訪問する
サインアップまたはログイン
APIキーセクションに移動する
新しい秘密鍵を作成する
Firecrawl APIキー:
Firecrawlのウェブサイトをご覧ください
アカウントを作成する
ダッシュボードに移動する
新しいAPIキーを生成する
すべてが正しく設定されていれば、検索結果を含む JSON 応答が返されます。
トラブルシューティング
エラーが発生した場合:
.envファイルに必要なすべての API キーが設定されていることを確認します。APIキーが有効であり、期限が切れていないことを確認します
.envファイルがプロジェクトのルートディレクトリにあることを確認します。環境変数が正しく読み込まれていることを確認してください
🤝 貢献する
リポジトリをフォークする
機能ブランチを作成します(
git checkout -b feature/AmazingFeature)変更をコミットします(
git commit -m 'Add some AmazingFeature')ブランチにプッシュする (
git push origin feature/AmazingFeature)プルリクエストを開く
📝 ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。
🙏 謝辞
📬 お問い合わせ
ホセ・マルティン・ロドリゲス・モルタローニ - @m4s1t425 - jmrodriguezm13@gmail.com
PythonとFirecrawlを使って❤️で作りました
Available Tools
4 toolscrawlB
Crawls a website starting from the specified URL and extracts content from multiple pages. Args: - url: The complete URL of the web page to start crawling from - maxDepth: The maximum depth level for crawling linked pages - limit: The maximum number of pages to crawl
Returns:
- Content extracted from the crawled pages in markdown and HTML format
Inputs: url (required), maxDepth (required), limit (required).
extractB
Extracts specific information from a web page based on a prompt. Args: - url: The complete URL of the web page to extract information from - prompt: Instructions specifying what information to extract from the page - enabaleWebSearch: Whether to allow web searches to supplement the extraction - showSources: Whether to include source references in the response
Returns:
- Extracted information from the web page based on the prompt
Inputs: url (required), prompt (required), enabaleWebSearch (required), showSources (required).
scrapeD
Inputs: url (required).
searchC
Performs web searches and retrieves up-to-date information from the internet. Args: - prompt: Specific query or topic to search for on the internet - limit: Maximum number of results to return (between 1 and 20)
Returns:
- Search results with relevant information about the requested topic
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The tools have significant overlap and unclear boundaries. 'crawl' extracts content from multiple pages, 'extract' pulls specific info from a single page, and 'scrape' (with no description) is ambiguous—likely overlapping with both. 'search' is distinct for web searches, but the others could easily be confused for similar web content tasks.
All tool names follow a consistent, simple verb pattern (crawl, extract, scrape, search). They are short, clear, and uniformly styled without mixing conventions, making them predictable and easy to parse.
Four tools is reasonable for a web search domain, allowing coverage of crawling, extraction, scraping, and searching. It's slightly thin but manageable, as each tool addresses a core aspect of web data retrieval without being overly bloated.
There are notable gaps in the tool surface. The server covers basic retrieval (crawl, search) and extraction, but lacks update/delete operations (e.g., no tool to modify or clear cached data) and has a dead tool ('scrape' with no description), which limits functionality. However, agents can work around this for common web search tasks.
Related MCP Connectors
Scrape, crawl, and search the web via Firecrawl’s official hosted MCP.
Firecrawl, the context API for AI agents: search, scrape, interact with the web, plus paper search.
Web search API and MCP server for developers building AI agents.
Unofficial Firecrawl MCP — wraps the Firecrawl API (firecrawl.dev) for web scraping / crawling /…
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables web search, scraping, crawling, and content extraction through multiple engines including SearXNG, Firecrawl, and Tavily.4230 npm148MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants to perform advanced web scraping, crawling, searching, and data extraction through the Firecrawl API.9MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables web scraping, crawling, and content extraction capabilities through integration with Firecrawl.82MIT
- FlicenseAqualityDmaintenanceA production-ready Model Context Protocol (MCP) server that integrates with the Firecrawl API to give AI assistants the power to scrape, crawl, and search the web.3-
Appeared in Searches
- Web search tools and methods that don't require API keys
- A server for searching research papers, Kaggle datasets, and websites for ML/AI model training data
- iPhone 16e camera review summary and table creation in Italian
- Web scraping and content extraction
- Web scraping tool for extracting content from SearXNG search results