Browser Automation · MODEL CONTEXT PROTOCOL

amotivv cloudflare browser rendering mcp

This MCP server provides tools for interacting with Cloudflare Browser Rendering, allowing you to fetch and process web content for use as context in LLMs directly from Cline or Claude Desktop.

WHAT IT CONNECTS

amotivv cloudflare browser rendering mcp 为 AI Agent 提供什么

  • **Web Content Fetching**: Fetch and process web pages for LLM context
  • **Documentation Search**: Search Cloudflare documentation and return relevant content
  • **Structured Content Extraction**: Extract structured content from web pages using CSS selectors
  • **Content Summarization**: Summarize web content for more concise LLM context
  • **Screenshot Capture**: Take screenshots of web pages
  • Node.js v18 or higher
  • A Cloudflare account with Browser Rendering API access
  • A deployed Cloudflare Worker using the provided `puppeteer-worker.js` file
  • Clone this repository:
  • Install dependencies:
  • Build the project:
  • Deploy the `puppeteer-worker.js` file to Cloudflare Workers using Wrangler:
  • Make sure to configure the following bindings in your Cloudflare Worker:
  • Browser Rendering binding named `browser`
  • KV namespace binding named `SCREENSHOTS`
  • Note the URL of your deployed worker (e.g., `https://browser-rendering-api.yourusername.workers.dev`)
  • Open the Claude Desktop configuration file:
  • Add the MCP server configuration:
  • Restart Claude Desktop
  • Open the Cline MCP settings file:
  • Add the MCP server configuration:
  • `url` (required): URL to fetch
  • `maxContentLength` (optional): Maximum content length to return
  • `query` (required): Search query
  • `maxResults` (optional): Maximum number of results to return
  • `url` (required): URL to extract content from
  • `selectors` (required): CSS selectors to extract content
  • `url` (required): URL to summarize
  • `maxLength` (optional): Maximum length of the summary
  • `url` (required): URL to take a screenshot of
  • `width` (optional): Width of the viewport in pixels (default: 1280)
  • `height` (optional): Height of the viewport in pixels (default: 800)
  • `fullPage` (optional): Whether to take a screenshot of the full page or just the viewport (default: false)
  • `[Setup]`: Initialization and configuration
  • `[API]`: API requests and responses
  • `[Error]`: Error handling and debugging
  • **Claude Desktop**: Check the logs in `~/Library/Logs/Claude/mcp*.log` (macOS) or `%APPDATA%\Claude\Logs\mcp*.log` (Windows)
  • **Cline**: Logs appear in the output console of the VSCode extension
  • **"BROWSER_RENDERING_API environment variable is not set"**
  • Make sure you've set the correct URL to your Cloudflare Worker in the MCP server configuration
  • **"Cloudflare worker API is unavailable or not configured"**
  • Verify that your Cloudflare Worker is deployed and running
  • Check that the URL is correct and accessible
  • **"Browser binding is not available"**
  • Ensure that you've configured the Browser Rendering binding in your Cloudflare Worker
  • **"SCREENSHOTS KV binding is not available"**
  • Ensure that you've configured the KV namespace binding in your Cloudflare Worker
  • `src/index.ts`: Main entry point
  • `src/server.ts`: MCP server implementation
  • `src/browser-client.ts`: Client for interacting with Cloudflare Browser Rendering
  • `src/content-processor.ts`: Processes web content for LLM context
  • `puppeteer-worker.js`: Cloudflare Worker implementation
  • Start the MCP server
  • Test each tool with sample requests
  • Verify the responses
  • Provide a summary of test results
  • Built the project with `npm run build`
  • Set the `BROWSER_RENDERING_API` environment variable to your Cloudflare Worker URL
  • Deployed the Cloudflare Worker with the necessary bindings

SECURITY

MCP 收录不等于安全审核

MCP 服务器可能获得模型上下文、凭据、本地文件或调用外部系统的权限。连接 Agent 前,请检查代码、环境变量、网络行为、软件包来源与维护状态。