A comprehensive Model Context Protocol (MCP) service for Chrome browser automation with enhanced capabilities, built on the browserhttp library and using the mcp-go framework.
Core Browser Automation:
- Enhanced Navigation: Navigate with performance tracking and advanced waiting
- Advanced Interaction: Click, type, select with improved reliability
- Content Extraction: Text, links, images, forms with metadata
- Session Management: Complete cookie and localStorage handling
- Screenshot Capture: Automated screenshot with custom naming
New Analysis Tools:
- Performance Monitoring: DOM load times, network requests, resource analysis
- SEO Analysis: Title, description, keywords, heading structure
- Security Scanning: SSL validation, CSP analysis, vulnerability detection
- Content Intelligence: Comprehensive link categorization and form analysis
Advanced Features:
- JSON API Integration: Send POST requests with browser context
- Local Storage Management: Read/write browser localStorage
- Multi-condition Waiting: Wait for elements, text, or navigation
- Session Cleanup: Complete cookie and storage clearing
- Interactive Menu: Navigate through options with keyboard
- Real-time Feedback: See results immediately
- Session Browser: View and manage saved sessions
- Request Logs: Monitor all browser activity
- Settings Panel: Database statistics and configuration
- Built on your proven browserhttp library
- Real Chrome browser via chromedp
- JavaScript rendering and form submission
- Screenshot capture and storage
- Persistent tab management
-
Clone and setup:
git clone https://github.com/gleicon/mcp-chromautomation cd mcp-chromautomation -
Install dependencies:
-
Build the application:
go build -o mcp-chromautomation -
Setup Chrome for automation (preserves your existing sessions):
# Start Chrome with debugging enabled (keeps your sessions & cookies) ./start_chrome.sh
First, ensure Chrome is running with debugging enabled:
Then start the MCP server:
The service will connect to your existing Chrome instance, preserving all your:
- 🔐 Logged-in sessions
- 🍪 Cookies and authentication
- 📝 Form data and preferences
- 🔖 Bookmarks and extensions
The server provides 19 enhanced MCP tools:
Core Automation:
- chrome_navigate - Enhanced navigation with performance tracking
- chrome_click - Reliable element clicking with validation
- chrome_extract_text - Advanced text extraction with selectors
- chrome_fill_form - Smart form filling with validation
- chrome_screenshot - Screenshot capture with custom naming
- chrome_wait_for_element - Element waiting with timeout control
Content Analysis:
- chrome_extract_links - Extract and categorize all page links
- chrome_extract_images - Extract images with metadata
- chrome_extract_forms - Analyze form structures and fields
- chrome_analyze_seo - Comprehensive SEO analysis
Performance & Security:
- chrome_get_performance - Detailed performance metrics
- chrome_check_security - Security vulnerability scanning
Advanced Interaction:
- chrome_post_json - Send JSON data via browser
- chrome_wait_advanced - Multi-condition waiting
Session Management:
- chrome_get_local_storage - Access browser localStorage
- chrome_set_local_storage - Manage localStorage data
- chrome_clear_session - Complete session cleanup
- session_save - Enhanced session saving with full state
- session_load - Complete session restoration
Launch the beautiful terminal interface:
Navigate with keyboard shortcuts:
- ↑/↓ or j/k - Move up/down
- Enter - Select item
- Esc - Go back
- q - Quit
Use with any MCP client by configuring the server:
Example tool calls:
The service uses legitimate browser automation through Chrome DevTools Protocol (CDP), not malicious code injection.
1. Chrome DevTools Protocol (CDP)
2. Safe JavaScript Execution Types
DOM Queries (Read-only):
Performance Metrics (Browser APIs):
Session Management (Standard Web APIs):
What it IS:
- Legitimate browser automation using Chrome's official debugging protocol
- Execution equivalent to manual browser DevTools console usage
- Read-only operations for most functions (link extraction, text parsing)
- Standard DOM/Web API usage only
What it's NOT:
- Not XSS injection into target websites
- Not malicious code execution
- Not breaking website security policies
- Not bypassing same-origin policies maliciously
Flow Overview:
The service provides detailed performance monitoring:
Advanced content extraction and analysis:
Built-in security analysis tools:
The service stores data locally in ~/.mcp-chromautomation/:
- Sessions: Browser state including cookies and URLs
- Request Logs: Complete HTTP request/response history
- Screenshots: Captured page screenshots with metadata
- Performance Data: Page load metrics and analysis
- Settings: User preferences and configuration
- browserhttp - Your excellent browser automation library
- mcp-go - Robust MCP protocol implementation
- chromedp - Chrome DevTools Protocol
- cobra - CLI framework
- sqlite - Pure Go SQLite
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built on browserhttp library
- Inspired by the Model Context Protocol specification
- UI powered by the amazing Charm libraries
.png)
