🔍 Prysm MCP サーバー
Prysm MCP (モデル コンテキスト プロトコル) サーバーにより、Claude などの AI アシスタントは高い精度と柔軟性で Web コンテンツをスクレイピングできるようになります。
✨ 特徴
🎯複数のスクレイピングモード:フォーカス(高速)、バランス(デフォルト)、ディープ(徹底)モードから選択できます
🧠コンテンツ分析:URLを分析して最適なスクレイピング手法を決定します
📄フォーマットの柔軟性: 結果をマークダウン、HTML、JSON としてフォーマットします
🖼️画像サポート: オプションで画像を抽出したりダウンロードしたりすることもできます
🔍スマートスクロール: シングルページアプリケーションのスクロール動作を設定します
📱レスポンシブ:さまざまなウェブサイトのレイアウトや構造に適応します
💾ファイル出力: フォーマットされた結果を任意のディレクトリに保存します
Related MCP server: Firecrawl MCP Server
🚀 クイックスタート
インストール
# Recommended: Install the LLM-optimized version
npm install -g @pinkpixel/prysm-mcp
# Or install the standard version
npm install -g prysm-mcp
# Or clone and build
git clone https://github.com/pinkpixel-dev/prysm-mcp.git
cd prysm-mcp
npm install
npm run build統合ガイド
一般的な MCP 互換アプリケーション向けの詳細な統合ガイドを提供しています。
使用法
Prysm MCP サーバーをセットアップする方法は複数あります。
mcp.json 構成の使用
上記のガイドに従って、適切な場所にmcp.jsonファイルを作成します。
{
"mcpServers": {
"prysm-scraper": {
"description": "Prysm web scraper with custom output directories",
"command": "npx",
"args": [
"-y",
"@pinkpixel/prysm-mcp"
],
"env": {
"PRYSM_OUTPUT_DIR": "${workspaceFolder}/scrape_results",
"PRYSM_IMAGE_OUTPUT_DIR": "${workspaceFolder}/scrape_results/images"
}
}
}
}🛠️ ツール
サーバーは次のツールを提供します。
scrapeFocused
速度を重視して最適化された高速 Web スクレイピング (スクロールが少なく、メイン コンテンツのみ)。
Please scrape https://example.com using the focused mode利用可能なパラメータ:
url(必須): スクレイピングするURLmaxScrolls(オプション):スクロール試行の最大回数(デフォルト:5)scrollDelay(オプション): スクロール間の遅延時間(ミリ秒)(デフォルト: 1000)scrapeImages(オプション): 結果に画像を含めるかどうかdownloadImages(オプション): 画像をローカルにダウンロードするかどうかmaxImages(オプション): 抽出する画像の最大数output(オプション):ダウンロードした画像の出力ディレクトリ
scrapeBalanced
優れたカバレッジと適切な速度を備えたバランスの取れた Web スクレイピング アプローチ。
Please scrape https://example.com using the balanced mode利用可能なパラメータ:
scrapeFocusedと同じだが、デフォルトが異なるmaxScrollsデフォルト: 10scrollDelayデフォルト: 2000合計スクレイピング時間を制限するための
timeoutパラメータを追加します(デフォルト: 30000ms)
scrapeDeep
最大限に抽出する Web スクレイピング (遅いが徹底的)。
Please scrape https://example.com using the deep mode with maximum scrolls利用可能なパラメータ:
scrapeFocusedと同じだが、デフォルトが異なるmaxScrollsデフォルト: 20scrollDelayデフォルト: 3000maxImagesデフォルト: 100
formatResult
スクレイピングしたデータをさまざまな構造化形式 (マークダウン、HTML、JSON) にフォーマットします。
Format the scraped data as markdown利用可能なパラメータ:
data(必須): フォーマットするスクレイピングデータformat(必須): 出力形式 - 「markdown」、「html」、または「json」includeImages(オプション): 出力に画像を含めるかどうか (デフォルト: true)output(オプション): フォーマットされた結果を保存するファイルパス
出力パスを指定して、フォーマットされた結果をファイルに保存することもできます。
Format the scraped data as markdown and save it to "my-results/output.md"⚙️ 構成
出力ディレクトリ
デフォルトでは、フォーマットされた結果を保存すると、ファイルは~/prysm-mcp/output/に保存されます。これは以下の2つの方法でカスタマイズできます。
環境変数: 環境変数を希望のディレクトリに設定します。
# Linux/macOS
export PRYSM_OUTPUT_DIR="/path/to/custom/directory"
export PRYSM_IMAGE_OUTPUT_DIR="/path/to/custom/image/directory"
# Windows (Command Prompt)
set PRYSM_OUTPUT_DIR=C:\path\to\custom\directory
set PRYSM_IMAGE_OUTPUT_DIR=C:\path\to\custom\image\directory
# Windows (PowerShell)
$env:PRYSM_OUTPUT_DIR="C:\path\to\custom\directory"
$env:PRYSM_IMAGE_OUTPUT_DIR="C:\path\to\custom\image\directory"ツールパラメータ: ツールを呼び出すときに出力パスを直接指定します。
# For general results
Format the scraped data as markdown and save it to "/absolute/path/to/file.md"
# For image downloads when scraping
Please scrape https://example.com and download images to "/absolute/path/to/images"MCP 構成: MCP 構成ファイル (例:
.cursor/mcp.json) で、次の環境変数を設定できます。
{
"mcpServers": {
"prysm-scraper": {
"command": "npx",
"args": ["-y", "@pinkpixel/prysm-mcp"],
"env": {
"PRYSM_OUTPUT_DIR": "${workspaceFolder}/scrape_results",
"PRYSM_IMAGE_OUTPUT_DIR": "${workspaceFolder}/scrape_results/images"
}
}
}
}PRYSM_IMAGE_OUTPUT_DIRが指定されていない場合は、デフォルトでPRYSM_OUTPUT_DIR内のimagesという名前のサブフォルダーになります。
相対パスまたはファイル名のみを指定した場合、設定された出力ディレクトリを基準に保存されます。
パス処理ルール
formatResultツールは、次の方法でパスを処理します。
絶対パス: 提供されたとおりに使用されます (
/home/user/file.md)相対パス: 設定された出力ディレクトリ (
subfolder/file.md) を基準に保存されます。ファイル名のみ: 設定された出力ディレクトリ(
output.md)に保存されますディレクトリパス: パスがディレクトリを指している場合、ファイル名はコンテンツとタイムスタンプに基づいて自動生成されます。
🏗️ 開発
# Install dependencies
npm install
# Build the project
npm run build
# Run the server locally
node bin/prysm-mcp
# Debug MCP communication
DEBUG=mcp:* node bin/prysm-mcp
# Set custom output directories
PRYSM_OUTPUT_DIR=./my-output PRYSM_IMAGE_OUTPUT_DIR=./my-output/images node bin/prysm-mcpnpx経由で実行
インストールせずに npx を使用してサーバーを直接実行できます。
# Run with default settings
npx @pinkpixel/prysm-mcp
# Run with custom output directories
PRYSM_OUTPUT_DIR=./my-output PRYSM_IMAGE_OUTPUT_DIR=./my-output/images npx @pinkpixel/prysm-mcp📋 ライセンス
マサチューセッツ工科大学
🙏 クレジット
ピンクピクセル開発