Skip to main content
Glama
amotivv

cloudflare-browser-rendering-mcp

by amotivv

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
  1. このリポジトリをクローンします:

    git clone https://github.com/yourusername/cloudflare-browser-rendering.git
    cd cloudflare-browser-rendering
  2. 依存関係をインストールします:

    npm install
  3. プロジェクトをビルドします。

    npm run build

Cloudflareワーカーのセットアップ

  1. Wrangler を使用してpuppeteer-worker.jsファイルを Cloudflare Workers にデプロイします。

    npx wrangler deploy
  2. Cloudflare Worker で次のバインディングを必ず構成してください。

    • ブラウザレンダリングバインディングのbrowser

    • SCREENSHOTSという名前の KV 名前空間バインディング

  3. デプロイされたワーカーの URL をメモします (例: https://browser-rendering-api.yourusername.workers.dev )

構成

クロードデスクトップ向け

  1. Claude Desktop 構成ファイルを開きます。

    # macOS
    code ~/Library/Application\ Support/Claude/claude_desktop_config.json
    
    # Windows
    code %APPDATA%\Claude\claude_desktop_config.json
  2. MCP サーバー構成を追加します。

    {
      "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": []
        }
      }
    }
  3. Claudeデスクトップを再起動します

クラインのために

  1. 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.json
  2. MCP サーバー構成を追加します。

    {
      "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 (必須): 取得するURL

  • maxContentLength (オプション): 返されるコンテンツの最大長

例:

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 (必須): コンテンツを抽出するURL

  • selectors (必須): コンテンツを抽出するための CSS セレクター

例:

Extract the main heading and first paragraph from https://developers.cloudflare.com/browser-rendering/ using the selectors h1 and p.

要約内容

LLM コンテキストをより簡潔にするために Web コンテンツを要約します。

パラメータ:

  • url (必須): 要約するURL

  • maxLength (オプション): 要約の最大長

例:

Summarize the content from https://developers.cloudflare.com/browser-rendering/ in 300 words or less.

スクリーンショット

Web ページのスクリーンショットを撮ります。

パラメータ:

  • url (必須): スクリーンショットを撮るURL

  • width (オプション): ビューポートの幅(ピクセル単位)(デフォルト: 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拡張機能の出力コンソールにログが表示されます

よくある問題

  1. 「BROWSER_RENDERING_API環境変数が設定されていません」

    • MCPサーバー設定でCloudflare Workerへの正しいURLが設定されていることを確認してください。

  2. 「CloudflareワーカーAPIは利用できないか、設定されていません」

    • Cloudflare Workerがデプロイされ、実行されていることを確認します

    • URLが正しくアクセス可能か確認してください

  3. 「ブラウザバインディングは利用できません」

    • Cloudflare Workerでブラウザレンダリングバインディングが設定されていることを確認してください。

  4. 「スクリーンショット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

これにより、次のようになります。

  1. MCPサーバーを起動する

  2. サンプルリクエストで各ツールをテストする

  3. 回答を確認する

  4. テスト結果の要約を提供する

特定のコンポーネントに対して個別のテストを実行することもできます。

# Test the Puppeteer integration
npm run test:puppeteer

テストが適切に機能するには、次のものを用意してください。

  1. npm run buildでプロジェクトをビルドしました

  2. BROWSER_RENDERING_API環境変数をCloudflare Worker URLに設定します。

  3. 必要なバインディングを使用してCloudflare Workerをデプロイしました

ライセンス

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

Available Tools

5 tools
extract_structured_contentC

Extracts structured content from a web page using CSS selectors

ParametersJSON Schema
NameRequiredDescriptionDefault
selectorsYesCSS selectors to extract content
urlYesURL to extract content from

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does but lacks critical behavioral details: it doesn't specify if it fetches the page internally, handles errors, requires internet access, has rate limits, or what the output format is. For a tool with no annotations, this leaves significant gaps in understanding its operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded: a single sentence that directly states the tool's function without any fluff. Every word earns its place by conveying essential information about extraction, content type, source, and method. It's efficiently structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of web extraction (involving network calls, parsing, and structured data output), the description is incomplete. There's no output schema, and the description doesn't explain return values, error handling, or behavioral traits. With no annotations and only basic parameter coverage, it fails to provide enough context for effective use in real-world scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, meaning the input schema already documents both parameters ('url' and 'selectors') with descriptions. The tool description adds no additional meaning beyond what's in the schema—it doesn't explain parameter interactions, provide examples, or clarify semantics. With high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Extracts structured content from a web page using CSS selectors'. It specifies the verb ('extracts'), resource ('structured content'), and method ('CSS selectors'), which is specific and actionable. However, it doesn't explicitly differentiate from sibling tools like 'fetch_page' or 'summarize_content', which would require a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios where extraction is preferred over fetching the whole page, searching documentation, summarizing, or taking a screenshot. Without any context or exclusions, users must infer usage from the purpose alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch_pageC

Fetches and processes a web page for LLM context

ParametersJSON Schema
NameRequiredDescriptionDefault
maxContentLengthNoMaximum content length to return
urlYesURL to fetch

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'fetches and processes' but doesn't specify what processing entails (e.g., cleaning HTML, extracting text, handling errors), whether it requires authentication, rate limits, or what happens with invalid URLs. This leaves significant gaps for a tool that interacts with external resources.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary details. Every word earns its place, making it easy for an agent to quickly grasp the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of web fetching (external calls, potential errors) and lack of annotations or output schema, the description is insufficient. It doesn't explain return values, error handling, or processing behavior, leaving the agent with incomplete information for reliable tool invocation in varied contexts.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for both parameters ('url' and 'maxContentLength'). The description adds no additional parameter semantics beyond what the schema provides, such as format details for URLs or units for content length. Baseline 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('fetches and processes') and resource ('a web page'), with the purpose being to provide 'LLM context'. It distinguishes from siblings like 'take_screenshot' (visual capture) and 'summarize_content' (summarization), though it doesn't explicitly differentiate from 'extract_structured_content' or 'search_documentation' which might have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'extract_structured_content' or 'search_documentation'. The description implies usage for web page retrieval for LLM context, but lacks explicit when/when-not instructions or prerequisites, leaving the agent to infer based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_documentationC

Searches Cloudflare documentation and returns relevant content

ParametersJSON Schema
NameRequiredDescriptionDefault
maxResultsNoMaximum number of results to return
queryYesSearch query

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool searches and returns content, but doesn't describe important behaviors like whether it performs web searches, accesses a local database, requires authentication, has rate limits, or what format the returned content takes (e.g., text snippets, links, full documents).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point without unnecessary words. It's appropriately sized for a simple search tool, though it could potentially be more structured with additional context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with no annotations and no output schema, the description is incomplete. It doesn't explain what kind of content is returned (snippets, full pages, metadata), how results are ranked, whether authentication is needed, or any limitations. Given the lack of structured fields, the description should provide more operational context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both parameters ('query' and 'maxResults'). The description doesn't add any meaningful parameter semantics beyond what the schema already provides, such as search syntax examples or result format details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Searches') and resource ('Cloudflare documentation'), making it immediately understandable. However, it doesn't distinguish this tool from its sibling tools like 'fetch_page' or 'extract_structured_content', which might also retrieve documentation content in different ways.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, constraints, or compare it to sibling tools like 'fetch_page' (which might retrieve a specific page) or 'summarize_content' (which might process content).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

summarize_contentC

Summarizes web content for more concise LLM context

ParametersJSON Schema
NameRequiredDescriptionDefault
maxLengthNoMaximum length of the summary
urlYesURL to summarize

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'summarizes web content' but doesn't describe how it works (e.g., extraction method, processing time, error handling), what limitations exist (e.g., supported content types, rate limits), or what the output looks like. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and includes a clear goal, making it appropriately sized and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of summarizing web content, no annotations, and no output schema, the description is incomplete. It doesn't explain the return format, potential errors, or behavioral traits like content processing methods. For a tool with 2 parameters and significant operational implications, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both parameters ('url' and 'maxLength'). The description adds no additional parameter semantics beyond what the schema provides, such as format details for 'url' or typical values for 'maxLength'. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('summarizes') and resource ('web content'), and it provides the goal ('for more concise LLM context'). However, it doesn't explicitly differentiate from sibling tools like 'extract_structured_content' or 'fetch_page', which might have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'extract_structured_content' or 'fetch_page'. It doesn't mention prerequisites, exclusions, or specific contexts where this summarization tool is preferred over other content-handling siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

take_screenshotB

Takes a screenshot of a web page and returns it as an image

ParametersJSON Schema
NameRequiredDescriptionDefault
fullPageNoWhether to take a screenshot of the full page or just the viewport (default: false)
heightNoHeight of the viewport in pixels (default: 800)
urlYesURL to take a screenshot of
widthNoWidth of the viewport in pixels (default: 1280)

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden but lacks behavioral details. It doesn't disclose potential issues like authentication needs for restricted pages, rate limits, performance impacts, or what happens with invalid URLs. The phrase 'returns it as an image' hints at output but doesn't specify format (e.g., PNG, JPEG) or handling of errors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. Every word earns its place, with no redundant or vague phrasing. It's appropriately sized for a straightforward tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (capturing web pages with 4 parameters) and lack of annotations or output schema, the description is incomplete. It doesn't cover error cases, output format details, or prerequisites (e.g., network access). For a tool that interacts with external resources and returns binary data, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no parameter-specific information beyond what's in the schema, which has 100% coverage. It doesn't explain interactions between parameters (e.g., how 'fullPage' affects 'height'/'width') or provide usage examples. Since schema coverage is high, the baseline is 3, but no extra value is added.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('takes a screenshot') and resource ('of a web page'), with the specific output format ('returns it as an image'). It distinguishes from sibling tools like 'fetch_page' (which likely retrieves HTML) and 'extract_structured_content' (which processes content rather than capturing visuals).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention scenarios like needing visual verification, capturing dynamic content, or comparing with text-based tools like 'summarize_content' or 'fetch_page'. The description only states what it does, not when it's appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv1.0.0
    • First observedextract_structured_content
    • First observedfetch_page
    • First observedsearch_documentation
    • First observedsummarize_content
    • First observedtake_screenshot

TDQS

A3.5/5.0

Scored across 5 tools

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    An 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.
    20
    54 PyPI
    13
    Apache 2.0
  • A
    license
    A
    quality
    B
    maintenance
    MCP 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.
    2
    14 npm
    91
    MIT