
BrowserTools MCP
Author: AgentDeskAI
Description: An MCP (Model Context Protocol) server that lets MCP-compatible clients (e.g., Cursor, Claude Desktop, Cline, Zed) monitor and interact with a Chrome browser via a companion Chrome extension and a local Node.js middleware server—capturing console/network logs, screenshots, selected DOM elements, and running Lighthouse-based audits (accessibility, performance, SEO, best practices, NextJS).
Stars: 7.1k
Forks: 524
License: MIT License
Category: Open Source
Overview
Installation
Notes from README:runAccessibilityAudit
Run a Lighthouse accessibility audit on the current page to identify WCAG/accessibility issues (e.g., contrast, missing alt text, ARIA problems).
runPerformanceAudit
Run a Lighthouse performance audit on the current page to find speed and loading bottlenecks (e.g., render-blocking resources, large DOM, unoptimized images).
runSEOAudit
Run a Lighthouse SEO audit on the current page to evaluate on-page SEO (metadata, headings, link structure) and suggest improvements.
runBestPracticesAudit
Run a Lighthouse best-practices audit on the current page to check general web development best practices.
runAuditMode
Execute all auditing tools in a predefined sequence; includes a NextJS audit if a NextJS framework is detected.
runNextJSAudit
Run a NextJS-focused audit/prompt to identify NextJS-specific SEO and best-practice improvements (supports app router or page router context).
runDebuggerMode
Execute all debugging tools in a predefined sequence ("Debugger Mode").
FAQs
How do I troubleshoot BrowserTools MCP when the Chrome extension won't connect to the middleware server on port 3025?
Verify the middleware server is running by checking localhost:3025 in your browser. Ensure no firewall blocks port 3025. Restart the middleware server, then refresh the extension. Check console logs for connection errors. If issues persist, reinstall the unpacked extension with Developer Mode enabled and confirm all three components match version 1.2.0.
What specific MCP tools does BrowserTools MCP expose to AI assistants for interacting with browser data?
BrowserTools MCP exposes MCP tools for retrieving console logs, capturing network request details, taking screenshots, extracting DOM elements, and running five Lighthouse audit types: accessibility, performance, SEO, best practices, and Next.js-specific audits. Each tool provides structured data the AI assistant can query through natural language prompts without manual DevTools interaction.
Can BrowserTools MCP capture and analyze JavaScript performance issues like memory leaks or slow rendering in real time?
BrowserTools MCP does not capture memory leaks or rendering performance in real time. It runs Lighthouse audits on demand, measuring Core Web Vitals and render-blocking resources at a point in time, but lacks continuous memory profiling, heap snapshots, or frame-rate monitoring. For real-time detection, teams need Chrome DevTools Performance and Memory tabs.
Is it possible to run BrowserTools MCP in a CI/CD pipeline or does it require a visible Chrome browser session?
BrowserTools MCP requires a visible Chrome browser with the extension active and DevTools open, not headless CI/CD environments. The architecture depends on a Chrome extension capturing live session state, requiring a graphical interface. For automated testing in CI/CD pipelines, use Playwright MCP instead, which supports headless execution and programmatic browser control without requiring an active session or extension.
What are the best practices for securing an MCP server?
Model Context Protocol servers should implement access controls, encrypt communication channels, validate inputs, audit tool invocations, and apply least-privilege principles. Run MCP servers in isolated environments, restrict file-system access scopes, use authentication tokens for multi-user deployments, and log all tool calls. Monitor for anomalous behavior and apply rate limiting to prevent abuse of exposed capabilities.
How do you troubleshoot connectivity issues with an MCP server?
Troubleshoot MCP server connectivity by validating JSON syntax in your config file, then verify the command runs in terminal. Check the Output panel for errors. If tools fail, regenerate authentication tokens with correct scopes and add them to the env block. For remote servers, confirm URL and auth headers. Restart after each fix.