Cloudflare Browser Rendering Experiments & MCP Server logo

Cloudflare Browser Rendering Experiments & MCP Server

by amotivv

This project demonstrates how to use Cloudflare Browser Rendering to extract web content for LLM context. It includes experiments with the REST API and Workers Binding API, as well as an MCP server implementation.

View on GitHub

Last updated: N/A

What is Cloudflare Browser Rendering Experiments & MCP Server?

This project provides tools and examples for using Cloudflare Browser Rendering to extract web content for use as context in Large Language Models (LLMs). It includes experiments with different Cloudflare APIs and a complete MCP (Machine Comprehension Pipeline) server implementation.

How to use Cloudflare Browser Rendering Experiments & MCP Server?

To use this project, you'll need a Cloudflare account with Browser Rendering enabled. Follow the installation instructions to clone the repository, install dependencies, and configure the Cloudflare Worker. You can then run the provided experiments or build and run the MCP server to fetch and process web content for LLMs. Remember to set the BROWSER_RENDERING_API environment variable.

Key features of Cloudflare Browser Rendering Experiments & MCP Server

  • Cloudflare Browser Rendering integration

  • REST API experiments

  • Workers Binding API experiments

  • MCP server implementation

  • Content extraction and processing

  • Integration with Cline

Use cases of Cloudflare Browser Rendering Experiments & MCP Server

  • Providing web context to LLMs

  • Automated web scraping

  • Content summarization

  • Documentation search

  • Extracting structured content from web pages

FAQ from Cloudflare Browser Rendering Experiments & MCP Server

What is Cloudflare Browser Rendering?

Cloudflare Browser Rendering allows you to execute JavaScript in a headless browser environment on the Cloudflare network.

What is an MCP server?

An MCP (Machine Comprehension Pipeline) server is a server that provides tools for fetching and processing web content for use as context in LLMs.

How do I configure the Cloudflare Worker?

You need to configure the wrangler.toml file with your Worker name, main script, compatibility date, and browser binding. Also, enable the nodejs_compat compatibility flag.

How do I set the BROWSER_RENDERING_API environment variable?

You can set it using the export command in your terminal: export BROWSER_RENDERING_API=https://YOUR_WORKER_URL_HERE. Replace YOUR_WORKER_URL_HERE with the URL of your deployed Cloudflare Worker.

How do I integrate the MCP server with Cline?

Copy the cline_mcp_settings.json.example file to the appropriate location in your Cline settings directory, or add the configuration to your existing cline_mcp_settings.json file.