Prysm MCP Server

by pinkpixel-dev
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Allows formatting scraped web content into structured markdown, with support for including images and saving formatted results to files

  • Uses Puppeteer to perform web scraping with capabilities like smart scrolling for single-page applications and content analysis to determine optimal scraping approaches

🔍 Prysm MCP サーバー

Prysm MCP (モデル コンテキスト プロトコル) サーバーにより、Claude などの AI アシスタントは高い精度と柔軟性で Web コンテンツをスクレイピングできるようになります。

✨ 特徴

  • 🎯複数のスクレイピングモード:フォーカス(高速)、バランス(デフォルト)、ディープ(徹底)モードから選択できます
  • 🧠コンテンツ分析:URLを分析して最適なスクレイピング手法を決定します
  • 📄フォーマットの柔軟性: 結果をマークダウン、HTML、JSON としてフォーマットします
  • 🖼️画像サポート: オプションで画像を抽出したりダウンロードしたりすることもできます
  • 🔍スマートスクロール: シングルページアプリケーションのスクロール動作を設定します
  • 📱レスポンシブ:さまざまなウェブサイトのレイアウトや構造に適応します
  • 💾ファイル出力: フォーマットされた結果を任意のディレクトリに保存します

🚀 クイックスタート

インストール

# 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 (必須): スクレイピングするURL
  • maxScrolls (オプション):スクロール試行の最大回数(デフォルト:5)
  • scrollDelay (オプション): スクロール間の遅延時間(ミリ秒)(デフォルト: 1000)
  • scrapeImages (オプション): 結果に画像を含めるかどうか
  • downloadImages (オプション): 画像をローカルにダウンロードするかどうか
  • maxImages (オプション): 抽出する画像の最大数
  • output (オプション):ダウンロードした画像の出力ディレクトリ

scrapeBalanced

優れたカバレッジと適切な速度を備えたバランスの取れた Web スクレイピング アプローチ。

Please scrape https://example.com using the balanced mode

利用可能なパラメータ:

  • scrapeFocusedと同じだが、デフォルトが異なる
  • maxScrollsデフォルト: 10
  • scrollDelayデフォルト: 2000
  • 合計スクレイピング時間を制限するためのtimeoutパラメータを追加します(デフォルト: 30000ms)

scrapeDeep

最大限に抽出する Web スクレイピング (遅いが徹底的)。

Please scrape https://example.com using the deep mode with maximum scrolls

利用可能なパラメータ:

  • scrapeFocusedと同じだが、デフォルトが異なる
  • maxScrollsデフォルト: 20
  • scrollDelayデフォルト: 3000
  • maxImagesデフォルト: 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つの方法でカスタマイズできます。

  1. 環境変数: 環境変数を希望のディレクトリに設定します。
# 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"
  1. ツールパラメータ: ツールを呼び出すときに出力パスを直接指定します。
# 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"
  1. 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-mcp

npx経由で実行

インストールせずに 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

📋 ライセンス

マサチューセッツ工科大学

🙏 クレジット

ピンクピクセル開発

モデルコンテキストプロトコルPuppeteerを搭載

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

複数のスクレイピング モードとコンテンツ フォーマット オプションをサポートし、AI アシスタントが Web コンテンツを高精度かつ柔軟にスクレイピングできるようにするモデル コンテキスト プロトコル サーバー。

  1. ✨ Features
    1. 🚀 Quick Start
      1. Installation
      2. Integration Guides
      3. Usage
    2. 🛠️ Tools
      1. scrapeFocused
      2. scrapeBalanced
      3. scrapeDeep
      4. formatResult
    3. ⚙️ Configuration
      1. Output Directory
      2. Path Handling Rules
    4. 🏗️ Development
      1. Running via npx
    5. 📋 License
      1. 🙏 Credits
        ID: i1xotvaxqx