Metadata-Version: 2.4
Name: chrome-mcp
Version: 0.1.0
Summary: MCP server for browser automation using DrissionPage
Author: xiyiyiru
License-Expression: GPL-3.0-only
License-File: LICENSE
Keywords: automation,browser,chrome,claude,drissionpage,llm,mcp
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: drissionpage
Requires-Dist: loguru>=0.7.3
Requires-Dist: mcp[cli]
Description-Content-Type: text/markdown

# chrome-mcp

A [Model Context Protocol](https://modelcontextprotocol.io) server for browser automation, powered by [DrissionPage](https://github.com/g1879/DrissionPage).

Lets MCP clients (Claude Desktop, Claude Code, Cursor, etc.) drive a real Chromium browser: navigate, screenshot, execute JavaScript, snapshot the DOM, and capture network traffic — all through the standard MCP tool interface.

## Features

- **Navigation** — open URLs with a configurable timeout
- **Screenshots** — full-page or viewport capture
- **JavaScript execution** — run arbitrary JS in the page context
- **DOM snapshot** — accessibility-tree based text snapshot for LLM consumption
- **Network capture** — record request/response metadata for analysis
- **Workspace isolation** — logical `/workspace` paths are mapped to a project-local directory

## Installation

```bash
uv tool install chrome-mcp
# or
uvx chrome-mcp
# or
pip install chrome-mcp
```

Requires Python ≥ 3.10 and a local Chromium-based browser.

## Usage

Add to your MCP client config (e.g. `claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "chrome": {
      "command": "chrome-mcp"
    }
  }
}
```

### Tools provided

| Tool | Description |
|---|---|
| `navigate` | Navigate to a URL |
| `screenshot` | Capture a screenshot |
| `execute_js` | Execute JavaScript in the page |
| `get_current_url` | Get the current URL |
| `get_page_title` | Get the page title |
| `close_browser` | Close the browser instance |
| `get_dom_snapshot` | Get a text snapshot of the DOM |
| `start_capture` | Start network capture |
| `get_captured_requests` | Retrieve captured network requests |
| `stop_capture` | Stop network capture and clear buffer |

## License

[GPL-3.0-only](./LICENSE)
