Skip to main content
Glama
MyBrowserControl

MyBrowserControl

Official
by satwareAG
README.md
# MyBrowserControl

**Advanced browser automation MCP server built on Microsoft Playwright MCP foundation**

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
[![Node Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](package.json)

## 🎯 Overview

MyBrowserControl is a unified browser automation MCP (Model Context Protocol) server that combines the best features from multiple browser automation solutions:

- **Microsoft Playwright MCP** - Enterprise-grade foundation (21.4k stars, 96% issue resolution)
- **AgentDesk AI** - Lighthouse audits and advanced tooling
- **BrowserMCP** - Stealth mode and session management

### Three-Mode Architecture

1. **Native Mode** (Default) - Fast, direct Playwright automation
2. **Lighthouse Mode** - Performance audits and QA analysis
3. **Extension Mode** - Connect to existing browser sessions

## πŸš€ Quick Start

### Installation

```bash
npm install -g @mybrowsercontrol/mcp
```

### Basic Usage

```bash
# Start server in native mode (default)
mybrowsercontrol

# Start in Lighthouse mode
mybrowsercontrol --mode lighthouse

# Start in headless mode
mybrowsercontrol --headless

# Start with headed mode (visible browser window)
mybrowsercontrol --headed

# Use system-installed browser instead of Playwright's bundled browser
mybrowsercontrol --executable-path /usr/bin/chromium

# Combined: headed mode with system browser
mybrowsercontrol --headed --executable-path /usr/bin/chromium
```

### MCP Configuration

Add to your `~/.cline/mcp_servers.json`:

```json
{
  "mcpServers": {
    "browser": {
      "command": "npx",
      "args": ["@mybrowsercontrol/mcp@latest"]
    }
  }
}
```

Or for local development:

```json
{
  "mcpServers": {
    "browser": {
      "command": "node",
      "args": ["/home/mw/Projects/mybrowsercontrol/dist/index.js"]
    }
  }
}
```

## πŸ“š Available Tools

### Core Tools (v0.1.0)

- `browser_navigate` - Navigate to a URL
- `browser_screenshot` - Capture page screenshot
- `browser_content` - Get page HTML content
- `browser_close` - Close the browser

### Coming Soon (Phase 2-3)

- `browser_lighthouse_audit` - Run Lighthouse performance audits
- `browser_session_save` - Save browser session state
- `browser_session_restore` - Restore saved session
- `browser_stealth_enable` - Enable anti-detection mode
- `browser_optimize_tokens` - AI-optimized result filtering

## πŸ—οΈ Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚     AI Assistant (Cline/Claude)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚ MCP Protocol
               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   MyBrowserControl MCP Server        β”‚
β”‚                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  Core: Playwright Foundation   β”‚ β”‚
β”‚  β”‚  - 3 deployment modes          β”‚ β”‚
β”‚  β”‚  - Multi-browser support       β”‚ β”‚
β”‚  β”‚  - Accessibility-first         β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  Extensions (Coming Soon)      β”‚ β”‚
β”‚  β”‚  - Lighthouse integration      β”‚ β”‚
β”‚  β”‚  - Stealth mode                β”‚ β”‚
β”‚  β”‚  - Session management          β”‚ β”‚
β”‚  β”‚  - Screenshot optimization     β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚ Playwright API
               β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚   Browser    β”‚
        β”‚ (Chrome/FF)  β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

## πŸ› οΈ Development

### Prerequisites

- Node.js 18+
- npm or yarn
- Git

### Setup

```bash
# Clone repository
git clone https://github.com/satwareAG/mybrowsercontrol.git
cd mybrowsercontrol

# Install dependencies
npm install

# Build
npm run build

# Run in development mode
npm run dev
```

### Project Structure

```
mybrowsercontrol/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts              # Entry point
β”‚   β”œβ”€β”€ server.ts             # MCP server implementation
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── types.ts          # Configuration types
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   └── playwright.ts     # Playwright wrapper
β”‚   β”œβ”€β”€ extensions/           # Future extensions
β”‚   β”‚   β”œβ”€β”€ lighthouse/
β”‚   β”‚   β”œβ”€β”€ stealth/
β”‚   β”‚   β”œβ”€β”€ screenshot/
β”‚   β”‚   └── session/
β”‚   └── tools/                # MCP tool implementations
β”œβ”€β”€ dist/                     # Compiled output
β”œβ”€β”€ docs/                     # Documentation
└── tests/                    # Test suite
```

## πŸ§ͺ Testing

MyBrowserControl follows Test-Driven Design (TDD) principles with comprehensive test coverage:

### Test Suite Status

- **Unit Tests**: βœ… 46 tests passing
- **Application Tests**: 🚧 Pending implementation
- **Integration Tests**: 🚧 Pending implementation  
- **Acceptance Tests**: 🚧 Pending implementation

### Running Tests

```bash
# Run all unit tests
npm run test:unit

# Run with coverage
npm run test:unit -- --coverage

# Watch mode for TDD
npm run test:watch

# Run all tests (when implemented)
npm test
```

### Manual Testing with MCP Inspector

Test tools interactively using the official MCP Inspector:

```bash
# Build project
npm run build

# Launch Inspector
npx @modelcontextprotocol/inspector node dist/index.js
```

The Inspector provides a web UI to:
- List all available MCP tools
- Execute tools with custom parameters
- View responses and debug issues
- Monitor MCP protocol messages

### Documentation

- **[Testing Guide](docs/TESTING.md)** - Comprehensive testing strategy
- **[Inspector Guide](docs/INSPECTOR.md)** - MCP Inspector usage and debugging

## πŸ“– Documentation

- [Getting Started](docs/getting-started.md) *(coming soon)*
- [Configuration Guide](docs/configuration.md) *(coming soon)*
- [API Reference](docs/api.md) *(coming soon)*
- [Integration Plan](docs/FINAL_INTEGRATION_PLAN.md)
- [Integration Analysis](docs/integration-analysis.md)
- [Testing Guide](docs/TESTING.md) βœ…
- [Inspector Guide](docs/INSPECTOR.md) βœ…

## πŸ—ΊοΈ Roadmap

### Phase 1: Foundation (Current - Months 1-2)
- [x] Project structure and TypeScript setup
- [x] Core Playwright wrapper
- [x] Basic MCP server implementation
- [x] Native mode with 4 core tools
- [ ] Testing framework
- [ ] CI/CD pipeline

### Phase 2: Extensions (Month 3)
- [ ] Lighthouse integration
- [ ] Screenshot optimization
- [ ] AI-optimized result filtering
- [ ] Extended tool set

### Phase 3: Advanced Features (Month 4)
- [ ] Multi-tab session management
- [ ] Stealth mode
- [ ] Session save/restore
- [ ] Selective tool loading

### Phase 4: Polish & Release (Months 5-6)
- [ ] Comprehensive testing
- [ ] Performance benchmarking
- [ ] Complete documentation
- [ ] v1.0.0 public release

## 🀝 Contributing

Contributions are welcome! This is an open-source project under the Apache 2.0 license.

### Development Workflow

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests
5. Submit a pull request

## πŸ“„ License

Apache License 2.0 - See [LICENSE](LICENSE) file for details.

## πŸ™ Acknowledgments

Built on the shoulders of giants:

- **Microsoft Playwright MCP** - Foundation and core architecture
- **AgentDesk AI** - Lighthouse integration inspiration
- **BrowserMCP** - Stealth mode techniques
- **Model Context Protocol** - MCP SDK and specification

## πŸ“ž Support

- **Issues**: [GitHub Issues](https://github.com/satwareAG/mybrowsercontrol/issues)
- **Discussions**: [GitHub Discussions](https://github.com/satwareAG/mybrowsercontrol/discussions)
- **Email**: ja@satware.ai

## πŸ”— Links

- [GitHub Repository](https://github.com/satwareAG/mybrowsercontrol)
- [npm Package](https://www.npmjs.com/package/@mybrowsercontrol/mcp) *(pending publication)*
- [Documentation](https://github.com/satwareAG/mybrowsercontrol/tree/main/docs)
- [Changelog](CHANGELOG.md) *(coming soon)*

---

**Status**: 🚧 Active Development (v0.1.0 - Phase 1)

**Made with ❀️ by satware AG**

TDQS

B3.1/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a clearly distinct operation: navigation, visual capture, DOM retrieval, and teardown. There is no plausible way to confuse one with another, and the descriptions reinforce the boundaries.

Naming Consistency4/5

All four names use a consistent 'browser_' prefix with snake_case, which reads predictably. Minor deviation in that navigate/close are verbs while screenshot/content are nouns, but the intent is still unambiguous.

Tool Count3/5

Four tools is on the thin side for a browser-control server, though each one earns its place with no redundancy. An agent would quickly run out of levers, making the surface feel under-scoped rather than bloated.

Completeness2/5

The set supports navigate, read, and screenshot but offers no way to interact with a page β€” no click, type, scroll, wait-for-load, or back/forward. This read-only surface will dead-end any workflow that requires acting on the page beyond loading it.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues