loop-browser-automation-mcp
Multi-Platform Browser Automation MCP Server for Loop AI coordination across Claude, Perplexity, ChatGPT, and Gemini
GitHub Stars
0
User Rating
Not Rated
Favorites
0
Views
5
Forks
0
Issues
0
Loop Browser Automation MCP Server
A Model Context Protocol (MCP) server that enables browser automation across multiple AI platforms for coordinated AI workflows.
Overview
This MCP server addresses the limitation that current browser automation tools only work with single applications. It provides advanced browser orchestration to enable true "Loop" functionality across all major AI platforms:
- Claude (claude.ai)
- Perplexity (perplexity.ai)
- ChatGPT (chat.openai.com)
- Gemini (gemini.google.com)
Features
Core Tools
launch_browser
- Launch browser instances for specific AI platformsnavigate_to_platform
- Navigate to AI platform URLssend_message_to_ai
- Send messages to AI platformsget_ai_response
- Retrieve responses from AI platformsclose_browser
- Clean up browser sessionscoordinate_loop
- Orchestrate round-robin communication between multiple AI platforms
Browser Support
- Chromium (default) - Best compatibility across platforms
- Firefox - Alternative engine for testing
- WebKit - Safari engine support
Platform Integration
Each AI platform has custom selectors and interaction patterns:
- Claude: Content-editable div inputs with submit buttons
- Perplexity: Textarea with Ask placeholders
- ChatGPT: Textarea with Message placeholders
- Gemini: Rich textarea components
Installation
npm install
npx playwright install
Usage
As MCP Server
Add to your MCP client configuration:
{
"mcpServers": {
"loop-browser-automation": {
"command": "node",
"args": ["./server.js"]
}
}
}
Direct Usage
npm start
Examples
Launch Browser for Claude
{
"tool": "launch_browser",
"arguments": {
"platform": "claude",
"browserType": "chromium",
"headless": false
}
}
Coordinate Multi-Platform Loop
{
"tool": "coordinate_loop",
"arguments": {
"initialMessage": "What are the key trends in AI development?",
"platforms": ["claude", "perplexity", "chatgpt"],
"iterations": 2
}
}
Architecture
Core Components
- LoopBrowserAutomationServer: Main MCP server class
- Browser Session Management: Track multiple browser instances
- Platform Adapters: Handle platform-specific UI interactions
- Loop Coordination: Orchestrate multi-platform conversations
Session Management
Each browser session is tracked with:
- Unique session ID
- Browser instance
- Page context
- Platform association
- Browser type
Error Handling
- Graceful degradation when platforms change UI
- Session cleanup on errors
- Authentication warnings
- Timeout handling
Security Considerations
- Browsers launch in non-headless mode for authentication
- No credentials are stored or transmitted
- Sessions are isolated per platform
- Automatic cleanup prevents resource leaks
Platform UI Changes
AI platforms frequently update their user interfaces. The server includes:
- Flexible selector strategies
- Error messages indicating UI changes
- Fallback mechanisms
- Easy selector updates
Development
Testing
npm test
Debug Mode
npm run dev
Contributing
Platform selectors may need periodic updates as AI platforms evolve their interfaces. Pull requests welcome for:
- New platform support
- Updated selectors
- Enhanced error handling
- Performance improvements
License
MIT License - See LICENSE file for details
Acknowledgments
Built on the Model Context Protocol by Anthropic and uses Playwright for browser automation.