2025-02-14 18:01:03 -05:00
# BrowserTools MCP
2025-02-11 01:19:45 -05:00
2025-02-14 18:01:03 -05:00
> Make your AI tools 10x more aware and capable of interacting with your browser
2025-02-11 01:19:45 -05:00
2025-02-14 18:01:03 -05:00
This application is a powerful browser monitoring and interaction tool that enables AI-powered applications via Anthropic's Model Context Protocol (MCP) to capture and analyze browser data through a Chrome extension.
2025-02-11 01:19:45 -05:00
2025-02-14 21:40:10 -05:00
Read our [docs ](https://browsertools.agentdesk.ai/ ) for the full installation, quickstart and contribution guides.
2025-02-11 01:19:45 -05:00
## Architecture
2025-02-14 18:01:03 -05:00
There are three core components all used to capture and analyze browser data:
1. **Chrome Extension** : A browser extension that captures screenshots, console logs, network activity and DOM elements.
2. **Node Server** : An intermediary server that facilitates communication between the Chrome extension and any instance of an MCP server.
3. **MCP Server** : A Model Context Protocol server that provides standardized tools for AI clients to interact with the browser.
2025-02-11 01:19:45 -05:00
```
┌─────────────┐ ┌──────────────┐ ┌───────────────┐ ┌─────────────┐
│ MCP Client │ ──► │ MCP Server │ ──► │ Node Server │ ──► │ Chrome │
│ (e.g. │ ◄── │ (Protocol │ ◄── │ (Middleware) │ ◄── │ Extension │
│ Cursor) │ │ Handler) │ │ │ │ │
└─────────────┘ └──────────────┘ └───────────────┘ └─────────────┘
```
2025-02-14 18:01:03 -05:00
Model Context Protocol (MCP) is a capability supported by Anthropic AI models that
allow you to create custom tools for any compatible client. MCP clients like Claude
Desktop, Cursor, Cline or Zed can run an MCP server which "teaches" these clients
about a new tool that they can use.
2025-02-16 14:17:17 -05:00
These tools can call out to external APIs but in our case, **all logs are stored locally** on your machine and NEVER sent out to any third-party service or API. BrowserTools MCP runs a local instance of a NodeJS API server which communicates with the BrowserTools Chrome Extension.
2025-02-14 18:01:03 -05:00
2025-02-16 14:17:17 -05:00
All consumers of the BrowserTools MCP Server interface with the same NodeJS API and Chrome extension.
2025-02-11 01:19:45 -05:00
#### Chrome Extension
2025-02-14 18:01:03 -05:00
- Monitors XHR requests/responses and console logs
2025-02-11 01:19:45 -05:00
- Tracks selected DOM elements
2025-02-16 14:17:17 -05:00
- Sends all logs and current element to the BrowserTools Connector
2025-02-14 18:01:03 -05:00
- Connects to Websocket server to capture/send screenshots
- Allows user to configure token/truncation limits + screenshot folder path
2025-02-11 01:19:45 -05:00
#### Node Server
- Acts as middleware between the Chrome extension and MCP server
2025-02-14 18:01:03 -05:00
- Receives logs and currently selected element from Chrome extension
- Processes requests from MCP server to capture logs, screenshot or current element
- Sends Websocket command to the Chrome extension for capturing a screenshot
- Intelligently truncates strings and # of duplicate objects in logs to avoid token limits
- Removes cookies and sensitive headers to avoid sending to LLMs in MCP clients
2025-02-11 01:19:45 -05:00
#### MCP Server
- Implements the Model Context Protocol
- Provides standardized tools for AI clients
2025-02-14 18:01:03 -05:00
- Compatible with various MCP clients (Cursor, Cline, Zed, Claude Desktop, etc.)
2025-02-11 01:19:45 -05:00
## Installation
2025-02-14 18:01:03 -05:00
Installation steps can be found in our documentation:
2025-02-11 01:19:45 -05:00
2025-02-16 14:17:41 -05:00
- [BrowserTools MCP Docs ](https://browsertools.agentdesk.ai/ )
2025-02-11 01:19:45 -05:00
## Usage
Once installed and configured, the system allows any compatible MCP client to:
- Monitor browser console output
- Capture network traffic
- Take screenshots
- Analyze selected elements
2025-02-14 18:01:03 -05:00
- Wipe logs stored in our MCP server
2025-02-11 01:19:45 -05:00
## Compatibility
- Works with any MCP-compatible client
- Primarily designed for Cursor IDE integration
- Supports other AI editors and MCP clients