AI-Powered Browser Control & Debugging Extension
Features β’ Installation β’ Usage β’ MCP Tools β’ Privacy β’ Author
Connect AI assistants like Cursor, Windsurf, or any MCP-compatible tool to control your browser in real-time.
Record user interactions including:
- Mouse clicks (single, double, right-click)
- Keyboard input
- Scroll events
- DOM changes with before/after states
- Smart filtering to skip dynamic/automatic changes
Allow AI to fully control your browser:
- Navigate to URLs
- Click elements
- Type text
- Scroll pages
- Execute JavaScript
- Take screenshots
AI-powered debugging capabilities:
- Inspect element properties, styles, and box model
- View DOM tree structure
- Get computed CSS styles
- Query elements by selector or text
- Monitor console logs
- Analyze network requests
- Access localStorage/sessionStorage
- View cookies
- AI cursor visualization
- Element highlighting
- Action tooltips
- Connection status badge on extension icon
- Use your own API key (OpenAI, Anthropic, Google, OpenRouter)
- Chat with AI directly in the browser sidebar
- AI can execute browser actions automatically
- Event listener inspection
- CPU profiling and heap snapshots
- CSS/JS coverage analysis
- DOM breakpoints
- Accessibility tree inspection
-
Clone the repository:
git clone https://github.com/RTBRuhan/ApexAgent.git cd ApexAgent -
Load in Chrome/Edge:
- Open
chrome://extensions/oredge://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
extensionfolder
- Open
-
Install MCP Server dependencies:
cd mcp-server npm install
Add this to your AI tool's MCP settings (e.g., Cursor's mcp.json):
{
"apex-agent": {
"command": "node",
"args": ["/path/to/ApexAgent/mcp-server/index.js"]
}
}
β οΈ Replace/path/to/ApexAgentwith your actual installation path
-
Start the MCP Server:
cd mcp-server npm start -
Connect Extension:
- Click the Apex Agent extension icon
- Go to MCP tab
- Click Connect
-
Enable Agent Control:
- Go to Agent tab
- Toggle Agent Control ON
- Configure permissions as needed
-
Use with AI:
- Your AI assistant can now control the browser!
| Badge | Status |
|---|---|
| β Green | Connected |
| β Orange | Reconnecting |
| β Gray | Disconnected |
| Tool | Description |
|---|---|
browser_navigate |
Navigate to a URL |
browser_click |
Click an element by CSS selector |
browser_type |
Type text into an element |
browser_scroll |
Scroll the page |
browser_press_key |
Press keyboard keys (Enter, Arrow keys, Tab, etc.) |
browser_click_by_text |
Click element by its text content |
browser_wait_for_element |
Wait for element to appear |
browser_snapshot |
Get page snapshot with interactive elements |
browser_screenshot |
Take a screenshot of the page |
browser_evaluate |
Execute JavaScript code |
browser_execute_safe |
Execute JS in content script context (bypasses CSP) |
browser_execute_on_element |
Execute JS on specific element (CSP-safe) |
| Tool | Description |
|---|---|
inspect_element |
Deep inspect - box model, styles, attributes |
get_dom_tree |
Get DOM tree structure |
get_computed_styles |
Get computed CSS properties |
get_element_html |
Get innerHTML/outerHTML |
query_all |
Find all elements matching selector |
find_by_text |
Find elements containing text |
get_attributes |
Get all attributes and data-* properties |
| Tool | Description |
|---|---|
get_page_metrics |
Performance, element counts, memory |
get_console_logs |
Captured console messages |
get_network_info |
Network requests and timing |
get_storage |
localStorage/sessionStorage contents |
get_cookies |
Document cookies |
| Tool | Description |
|---|---|
list_extensions |
List all installed extensions |
reload_extension |
Reload extension by ID (use "self" for Apex Agent) |
get_extension_info |
Get detailed extension info |
enable_extension |
Enable an extension |
disable_extension |
Disable an extension |
π§ For Extension Developers: These tools enable AI-assisted extension development workflow. Your AI can automatically reload your extension after making changes!
ApexAgent/
βββ extension/
β βββ manifest.json # Extension manifest (MV3)
β βββ background.js # Service worker
β βββ getting-started.html # Setup guide for new users
β βββ popup/
β β βββ popup.html # Extension popup UI
β β βββ popup.css # Styles
β β βββ popup.js # Popup logic
β βββ sidebar/
β β βββ sidebar.html # AI sidebar panel
β β βββ sidebar.css # Sidebar styles
β β βββ sidebar.js # AI chat logic
β βββ content/
β β βββ content.js # Content script (DOM interaction)
β β βββ content.css # Visual feedback styles
β βββ icons/
β βββ icon16.png # 16x16 icon
β βββ icon48.png # 48x48 icon
β βββ icon128.png # 128x128 icon
βββ mcp-server/
β βββ index.js # MCP server implementation
β βββ package.json # Node.js dependencies
β βββ README.md # Server documentation
βββ PRIVACY.md # Privacy policy
βββ README.md # This file
The extension requests the following permissions:
activeTab- Access to the current tabtabs- Tab managementscripting- Execute scripts in pagesstorage- Save settingswebNavigation- Track navigation eventsalarms- Keep service worker alive<all_urls>- Access to all websites
Configure in the Agent tab:
- Mouse Control - Allow AI to click and hover
- Keyboard Input - Allow AI to type
- Navigation - Allow AI to navigate
- Script Execution - Allow AI to run JavaScript
- Screenshots - Allow AI to capture screenshots
- Agent control is enabled by default for convenience, but can be toggled off
- All AI actions require explicit permission
- The extension only connects to localhost MCP server
- No data is sent to external servers
- All settings and logs are stored locally on your device
- Open source - you can verify the code yourself
For complete privacy details, see our Privacy Policy.
- Make sure MCP server is running (
npm start) - Check the port (default: 3052)
- Reload the extension
- Enable Agent Control in Agent tab
- Check permission checkboxes
- Ensure you're on a regular webpage (not
chrome://oredge://)
- Check DevTools console for detailed error messages
- Reload extension after making changes
MIT License - see LICENSE for details.
RTBRuhan
- Website: rtbruhan.github.io
- GitHub: @RTBRuhan
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Made with β€οΈ for the AI development community