cloudflare-browser-rendering-mcp
Cloudflare ブラウザレンダリング MCP サーバー
このMCP(Model Context Protocol)サーバーは、Cloudflare Browser Renderingを使用してウェブコンテンツを取得および処理し、LLMのコンテキストとして使用するためのツールを提供します。ClaudeとClineの両方のクライアント環境で動作するように設計されています。
特徴
Web コンテンツの取得: LLM コンテキストの Web ページを取得して処理します。
ドキュメント検索: Cloudflareのドキュメントを検索し、関連するコンテンツを返します
構造化コンテンツの抽出: CSSセレクタを使用してWebページから構造化コンテンツを抽出します
コンテンツ要約: LLM コンテキストをより簡潔にするために Web コンテンツを要約します
スクリーンショットキャプチャ: Webページのスクリーンショットを撮る
Related MCP server: turbowebfetch
前提条件
Node.js v18以上
ブラウザレンダリングAPIアクセスを持つCloudflareアカウント
提供された
puppeteer-worker.jsファイルを使用してデプロイされた Cloudflare Worker
インストール
Smithery経由でインストール
Smithery経由で Claude Desktop 用の Cloudflare Browser Rendering を自動的にインストールするには:
npx -y @smithery/cli install @amotivv/cloudflare-browser-rendering-mcp --client claudeこのリポジトリをクローンします:
git clone https://github.com/yourusername/cloudflare-browser-rendering.git cd cloudflare-browser-rendering依存関係をインストールします:
npm installプロジェクトをビルドします。
npm run build
Cloudflareワーカーのセットアップ
Wrangler を使用して
puppeteer-worker.jsファイルを Cloudflare Workers にデプロイします。npx wrangler deployCloudflare Worker で次のバインディングを必ず構成してください。
ブラウザレンダリングバインディングの
browserSCREENSHOTSという名前の KV 名前空間バインディング
デプロイされたワーカーの URL をメモします (例:
https://browser-rendering-api.yourusername.workers.dev)
構成
クロードデスクトップ向け
Claude Desktop 構成ファイルを開きます。
# macOS code ~/Library/Application\ Support/Claude/claude_desktop_config.json # Windows code %APPDATA%\Claude\claude_desktop_config.jsonMCP サーバー構成を追加します。
{ "mcpServers": { "cloudflare-browser-rendering": { "command": "node", "args": ["/path/to/cloudflare-browser-rendering/dist/index.js"], "env": { "BROWSER_RENDERING_API": "https://your-worker-url.workers.dev" }, "disabled": false, "autoApprove": [] } } }Claudeデスクトップを再起動します
クラインのために
Cline MCP 設定ファイルを開きます。
# macOS code ~/Library/Application\ Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json # Windows code %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.jsonMCP サーバー構成を追加します。
{ "mcpServers": { "cloudflare-browser-rendering": { "command": "node", "args": ["/path/to/cloudflare-browser-rendering/dist/index.js"], "env": { "BROWSER_RENDERING_API": "https://your-worker-url.workers.dev" }, "disabled": false, "autoApprove": [] } } }
使用法
設定が完了すると、MCPサーバーはClaude DesktopとClineの両方で利用できるようになります。以下のツールをご利用いただけます。
フェッチページ
LLM コンテキストの Web ページを取得して処理します。
パラメータ:
url(必須): 取得するURLmaxContentLength(オプション): 返されるコンテンツの最大長
例:
Can you fetch and summarize the content from https://developers.cloudflare.com/browser-rendering/?検索ドキュメント
Cloudflare のドキュメントを検索し、関連するコンテンツを返します。
パラメータ:
query(必須): 検索クエリmaxResults(オプション): 返される結果の最大数
例:
Search the Cloudflare documentation for information about "browser rendering API".構造化コンテンツの抽出
CSS セレクターを使用して Web ページから構造化コンテンツを抽出します。
パラメータ:
url(必須): コンテンツを抽出するURLselectors(必須): コンテンツを抽出するための CSS セレクター
例:
Extract the main heading and first paragraph from https://developers.cloudflare.com/browser-rendering/ using the selectors h1 and p.要約内容
LLM コンテキストをより簡潔にするために Web コンテンツを要約します。
パラメータ:
url(必須): 要約するURLmaxLength(オプション): 要約の最大長
例:
Summarize the content from https://developers.cloudflare.com/browser-rendering/ in 300 words or less.スクリーンショット
Web ページのスクリーンショットを撮ります。
パラメータ:
url(必須): スクリーンショットを撮るURLwidth(オプション): ビューポートの幅(ピクセル単位)(デフォルト: 1280)height(オプション):ビューポートの高さ(ピクセル単位)(デフォルト:800)fullPage(オプション): ページ全体のスクリーンショットを撮るか、ビューポートのみのスクリーンショットを撮るか (デフォルト: false)
例:
Take a screenshot of https://developers.cloudflare.com/browser-rendering/ with a width of 1024 pixels.トラブルシューティング
ログ記録
MCP サーバーは、次のプレフィックスを持つ包括的なログ記録を使用します。
[Setup]:初期化と設定[API]: APIリクエストとレスポンス[Error]: エラー処理とデバッグ
ログを表示するには:
Claude デスクトップ:
~/Library/Logs/Claude/mcp*.log(macOS) または%APPDATA%\Claude\Logs\mcp*.log(Windows) のログを確認してください。Cline : VSCode拡張機能の出力コンソールにログが表示されます
よくある問題
「BROWSER_RENDERING_API環境変数が設定されていません」
MCPサーバー設定でCloudflare Workerへの正しいURLが設定されていることを確認してください。
「CloudflareワーカーAPIは利用できないか、設定されていません」
Cloudflare Workerがデプロイされ、実行されていることを確認します
URLが正しくアクセス可能か確認してください
「ブラウザバインディングは利用できません」
Cloudflare Workerでブラウザレンダリングバインディングが設定されていることを確認してください。
「スクリーンショットKVバインディングは利用できません」
Cloudflare WorkerでKV名前空間バインディングが設定されていることを確認してください。
発達
プロジェクト構造
src/index.ts: メインエントリポイントsrc/server.ts: MCP サーバーの実装src/browser-client.ts: Cloudflare ブラウザレンダリングと対話するためのクライアントsrc/content-processor.ts: LLMコンテキストのWebコンテンツを処理しますpuppeteer-worker.js: Cloudflare Worker の実装
建物
npm run buildテスト
このプロジェクトには、すべての MCP ツールが正しく動作していることを確認する包括的なテスト スクリプトが含まれています。
npm testこれにより、次のようになります。
MCPサーバーを起動する
サンプルリクエストで各ツールをテストする
回答を確認する
テスト結果の要約を提供する
特定のコンポーネントに対して個別のテストを実行することもできます。
# Test the Puppeteer integration
npm run test:puppeteerテストが適切に機能するには、次のものを用意してください。
npm run buildでプロジェクトをビルドしましたBROWSER_RENDERING_API環境変数をCloudflare Worker URLに設定します。必要なバインディングを使用してCloudflare Workerをデプロイしました
ライセンス
マサチューセッツ工科大学
Available Tools
5 toolsextract_structured_contentC
Extracts structured content from a web page using CSS selectors
Inputs: selectors (required), url (required).
fetch_pageC
Fetches and processes a web page for LLM context
Inputs: url (required), maxContentLength.
search_documentationC
Searches Cloudflare documentation and returns relevant content
Inputs: query (required), maxResults.
summarize_contentC
Summarizes web content for more concise LLM context
Inputs: url (required), maxLength.
take_screenshotB
Takes a screenshot of a web page and returns it as an image
Inputs: url (required), fullPage, height, width.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose with no overlap: extract_structured_content targets specific elements, fetch_page retrieves full pages, search_documentation queries documentation, summarize_content condenses content, and take_screenshot captures visual output. An agent can easily differentiate between these functions.
All tools follow a consistent verb_noun pattern with snake_case naming (e.g., extract_structured_content, fetch_page, search_documentation). This uniformity makes the toolset predictable and easy to understand for an agent.
With 5 tools, this server is well-scoped for browser rendering and content processing tasks. Each tool earns its place by covering distinct aspects like fetching, extracting, searching, summarizing, and screenshotting, without being overly sparse or bloated.
The toolset covers core browser rendering workflows (fetching, extracting, summarizing, screenshotting) and includes a domain-specific search function. A minor gap exists in advanced interactions like form submission or navigation, but agents can work around this for most use cases.
Maintenance
Related MCP Connectors
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Web scraping MCP server: any URL to Markdown or JSON, with JavaScript rendering and batch jobs.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that provides LLMs with stealth browser automation capabilities via CloakBrowser to bypass bot detection services like Cloudflare and reCAPTCHA. It supports full page interaction, content extraction, and human-like behavior through 30 specialized tools.2040 PyPI14Apache 2.0
- AlicenseAqualityBmaintenanceMCP server that lets Claude Code fetch web content using real Chrome browsers. Renders JavaScript-heavy pages, handles bot mitigation, and runs up to 14 parallel browsers locally with zero API keys. Makes outbound HTTP requests only to URLs the user explicitly asks Claude to fetch.214 npm91MIT
- FlicenseNot gradedqualityDmaintenanceA remote MCP server deployable on Cloudflare Workers without authentication, providing tools for website scraping and content extraction using Cloudflare's Browser Rendering and AI.1-
- AlicenseCqualityDmaintenanceAn MCP server that gives Claude Code real browser control for web automation, testing, and screenshots.3246 npm158MIT