cloudflare-browser-rendering-mcp
The Cloudflare Browser Rendering MCP server fetches, processes, and summarizes web content for use in LLMs (Large Language Models).
Fetch and process web pages: Extract content from URLs for LLM context
Search Cloudflare documentation: Retrieve relevant content based on search queries
Extract structured content: Use CSS selectors to pull specific elements from web pages
Summarize web content: Condense page content into concise summaries
Take screenshots: Capture screenshots of web pages with customizable options
Uses Cloudflare Browser Rendering API to fetch and process web pages, search Cloudflare documentation, and capture screenshots
Requires deployment of a Cloudflare Worker with Browser Rendering binding and KV namespace for screenshots functionality
Leverages Puppeteer functionality through Cloudflare's Browser Rendering API for web content fetching and screenshot capture
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cloudflare-browser-rendering-mcp fetch and summarize the latest Cloudflare blog post about browser rendering"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cloudflare Browser Rendering MCP Server
This MCP (Model Context Protocol) server provides tools for fetching and processing web content using Cloudflare Browser Rendering for use as context in LLMs. It's designed to work with both Claude and Cline client environments.
Features
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
Related MCP server: turbowebfetch
Prerequisites
Node.js v18 or higher
A Cloudflare account with Browser Rendering API access
A deployed Cloudflare Worker using the provided
puppeteer-worker.jsfile
Installation
Installing via Smithery
To install Cloudflare Browser Rendering for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @amotivv/cloudflare-browser-rendering-mcp --client claudeClone this repository:
git clone https://github.com/yourusername/cloudflare-browser-rendering.git cd cloudflare-browser-renderingInstall dependencies:
npm installBuild the project:
npm run build
Cloudflare Worker Setup
Deploy the
puppeteer-worker.jsfile to Cloudflare Workers using Wrangler:npx wrangler deployMake sure to configure the following bindings in your Cloudflare Worker:
Browser Rendering binding named
browserKV namespace binding named
SCREENSHOTS
Note the URL of your deployed worker (e.g.,
https://browser-rendering-api.yourusername.workers.dev)
Configuration
For Claude Desktop
Open the Claude Desktop configuration file:
# macOS code ~/Library/Application\ Support/Claude/claude_desktop_config.json # Windows code %APPDATA%\Claude\claude_desktop_config.jsonAdd the MCP server configuration:
{ "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": [] } } }Restart Claude Desktop
For Cline
Open the Cline MCP settings file:
# 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.jsonAdd the MCP server configuration:
{ "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": [] } } }
Usage
Once configured, the MCP server will be available to both Claude Desktop and Cline. You can use the following tools:
fetch_page
Fetches and processes a web page for LLM context.
Parameters:
url(required): URL to fetchmaxContentLength(optional): Maximum content length to return
Example:
Can you fetch and summarize the content from https://developers.cloudflare.com/browser-rendering/?search_documentation
Searches Cloudflare documentation and returns relevant content.
Parameters:
query(required): Search querymaxResults(optional): Maximum number of results to return
Example:
Search the Cloudflare documentation for information about "browser rendering API".extract_structured_content
Extracts structured content from a web page using CSS selectors.
Parameters:
url(required): URL to extract content fromselectors(required): CSS selectors to extract content
Example:
Extract the main heading and first paragraph from https://developers.cloudflare.com/browser-rendering/ using the selectors h1 and p.summarize_content
Summarizes web content for more concise LLM context.
Parameters:
url(required): URL to summarizemaxLength(optional): Maximum length of the summary
Example:
Summarize the content from https://developers.cloudflare.com/browser-rendering/ in 300 words or less.take_screenshot
Takes a screenshot of a web page.
Parameters:
url(required): URL to take a screenshot ofwidth(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)
Example:
Take a screenshot of https://developers.cloudflare.com/browser-rendering/ with a width of 1024 pixels.Troubleshooting
Logging
The MCP server uses comprehensive logging with the following prefixes:
[Setup]: Initialization and configuration[API]: API requests and responses[Error]: Error handling and debugging
To view logs:
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
Common Issues
"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
Development
Project Structure
src/index.ts: Main entry pointsrc/server.ts: MCP server implementationsrc/browser-client.ts: Client for interacting with Cloudflare Browser Renderingsrc/content-processor.ts: Processes web content for LLM contextpuppeteer-worker.js: Cloudflare Worker implementation
Building
npm run buildTesting
The project includes a comprehensive test script that verifies all MCP tools are working correctly:
npm testThis will:
Start the MCP server
Test each tool with sample requests
Verify the responses
Provide a summary of test results
You can also run individual tests for specific components:
# Test the Puppeteer integration
npm run test:puppeteerFor the tests to work properly, make sure you have:
Built the project with
npm run buildSet the
BROWSER_RENDERING_APIenvironment variable to your Cloudflare Worker URLDeployed the Cloudflare Worker with the necessary bindings
License
MIT
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