Labsco
mattiasw logo

BrowserLoop

β˜… 23

from mattiasw

Take screenshots and read console logs from web pages using Playwright.

πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

BrowserLoop

CI/CD Pipeline npm version npm downloads

⚠️ ARCHIVED: This project is archived and will not receive any further updates. With the release of Chrome DevTools MCP, a dedicated MCP server for browser automation is no longer necessary as that project provides more comprehensive browser interaction capabilities including screenshots, console monitoring, and much more.

A Model Context Protocol (MCP) server for taking screenshots and reading console logs from web pages using Playwright. This tool allows AI agents to automatically capture screenshots and monitor browser console output for debugging, testing, and development tasks.

NOTE: Almost all of the code in this repository has been auto-generated. That means you should probably not trust it too much. That being said, it does work and I'm using it myself.

NOTE: If the documentation is incorrect, please let me know or send a PR. If you too want to use a code generation tool to update the code for this project, PROJECT_CONTEXT.md has been used as context to give a good overview of the various parts of the project. It might be a bit messy now but it's a good starting point and you're welcome to update it.

Features

  • πŸ“Έ High-quality screenshot capture using Playwright
  • πŸ“ Console log monitoring and collection from web pages
  • 🌐 Support for localhost and remote URLs
  • πŸͺ Cookie-based authentication for protected pages
  • 🐳 Docker containerization for consistent environments
  • ⚑ PNG, JPEG, and WebP format support with configurable quality
  • πŸ›‘οΈ Secure non-root container execution
  • πŸ€– Full MCP protocol integration with AI development tools
  • πŸ”§ Configurable viewport sizes and capture options
  • πŸ“± Full page and element-specific screenshot capture
  • ⚠️ Browser warning and error capture (Permissions-Policy, security warnings)
  • ⚑ TypeScript with Biome for fast development
  • πŸ§ͺ Comprehensive testing with Node.js built-in test runner

Documentation

Key API Parameters

ParameterTypeDescriptionDefault
urlstringTarget URL to capture (required)-
widthnumberViewport width (200-4000)1280
heightnumberViewport height (200-4000)720
formatstringImage format (webp, png, jpeg)webp
qualitynumberImage quality (1-100)80
fullPagebooleanCapture full pagefalse
selectorstringCSS selector for element capture-

πŸ“– See docs/API.md for complete parameter details, usage examples, and configuration options.

License

BrowserLoop is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).

What this means:

  • βœ… Free to use - Personal and commercial use allowed
  • βœ… Free to modify - You can adapt the code to your needs
  • βœ… Free to distribute - Share copies with others
  • βœ… Patent protection - Contributors provide patent grants
  • ⚠️ Copyleft - Derivative works must also be open source under AGPL-3.0
  • ⚠️ Network clause - If you run a modified version on a server, you must provide source code to users

For Network Services

Important: If you modify BrowserLoop and run it as a network service (e.g., web app, API server, or cloud service), the AGPL requires you to:

  1. Offer the complete source code to all users of your service
  2. Include a prominent notice about how users can access the source
  3. Use a compatible license for the entire service

License Files

Commercial Use

Organizations can use BrowserLoop under the AGPL for commercial purposes, but must comply with the copyleft requirements. If you need to keep modifications private, consider:

  1. Using BrowserLoop without modifications
  2. Contributing improvements back to the community
  3. Contacting the maintainers about potential alternative licensing arrangements

For questions about licensing, please open an issue or contact the maintainers.