Arche浏览器
用于浏览器自动化和完全本地PC控制的MCP服务器。
通过Claude Code或任何MCP客户端控制真正的Chrome浏览器和整个计算机。
特性
- 完全浏览器控制:导航、点击、打字、截图等
- 完全PC控制:Shell命令、Python执行、文件系统、剪贴板、进程
- 真实浏览器:使用带有Cookie、扩展程序和登录会话的实际Chrome浏览器
- 远程访问:通过SSE传输控制任何机器上的浏览器/PC
- 令牌身份验证:使用自动生成的令牌保护远程访问
- 最小设计:只有几个强大的原语,可以做任何事情
设计理念
受Eric Gamma原理的启发: 简单、灵活、强大
Arche提供了一些强大的原语,而不是数百个特定的工具:
| 原始 | 它做什么 | 你能实现什么 |
|---|---|---|
shell() | 执行任何shell命令 | 卷、重启、程序、服务、任何东西 |
python_exec() | 执行Python代码 | 相机、Excel、AI、复杂逻辑、任何东西 |
screen_capture() | 桌面截图 | AI的视觉反馈 |
与just shell 和 python_exec,AI可以真正控制 一切 在你的电脑上。
安装
# From PyPI
pip install arche-browser
# From GitHub
pip install git+https://github.com/GizAI/arche-browser.git
# One-liner (no install)
uvx arche-browser用法
仅浏览器(默认)
arche-browser克劳德代码配置:
{"mcpServers": {"browser": {"command": "arche-browser"}}}完全PC控制
arche-browser --local克劳德代码配置:
{"mcpServers": {"arche": {"command": "arche-browser", "args": ["--local"]}}}仅限PC控制(无浏览器)
arche-browser --local --no-browser远程访问(SSE)
在装有Chrome的机器上:
arche-browser --sse --port 8080 --local
# Output:
# [*] Auth: ENABLED
# [*] Token: abc123...
# [*] Connect URL: http://localhost:8080/sse?token=abc123...关于克劳德准则:
{"mcpServers": {"remote": {"url": "http://YOUR_IP:8080/sse?token=YOUR_TOKEN"}}}本地控制工具
核心图元
| 工具 | 说明 |
|---|---|
shell(command) | 执行shell命令(bash/cmd/powershell) |
python_exec(code) | 以完全系统访问权限执行Python代码 |
screen_capture(path) | 捕获桌面屏幕截图 |
便利工具
| 工具 | 说明 |
|---|---|
file_read(path) | 读取文件内容 |
file_write(path, content) | 写入文件内容 |
file_list(path, pattern) | 列出目录内容 |
file_delete(path) | 删除文件或目录 |
file_copy(src, dst) | 复制文件或目录 |
file_move(src, dst) | 移动/重命名文件或目录 |
clipboard_get() | 获取剪贴板内容 |
clipboard_set(content) | 设置剪贴板内容 |
system_info() | 获取操作系统、CPU、内存、磁盘信息 |
process_list() | 列出正在运行的进程 |
process_kill(pid/name) | 终止一个进程 |
你能做什么
# Volume control (Windows)
shell("powershell (Get-AudioDevice -Playback).SetMute($false)")
# Take a photo with webcam
python_exec("""
import cv2
cap = cv2.VideoCapture(0)
ret, frame = cap.read()
cv2.imwrite("photo.jpg", frame)
cap.release()
""")
# Create Excel spreadsheet
python_exec("""
import openpyxl
wb = openpyxl.Workbook()
ws = wb.active
ws['A1'] = 'Sales Report'
ws['A2'] = 1000
wb.save('report.xlsx')
""")
# System maintenance
shell("cleanmgr /d C:") # Windows disk cleanup
shell("sudo apt autoremove") # Linux cleanup
# Reboot computer
shell("shutdown /r /t 60") # Windows
shell("sudo reboot") # Linux
# Kill a program
process_kill(name="notepad.exe")浏览器工具
导航
| 工具 | 说明 |
|---|---|
goto(url) | 导航到URL |
get_url() | 获取当前URL |
get_title() | 获取页面标题 |
reload() | 重新加载页面 |
go_back() | 回到历史 |
go_forward() | 在历史中前进 |
DOM和输入
| 工具 | 说明 |
|---|---|
get_text(selector) | 获取元素文本 |
get_html(selector) | 获取元素HTML |
click(selector) | 点击元素 |
type_text(selector, text) | 输入 |
select_option(selector, value) | 选择下拉菜单 |
check_box(selector, checked) | 选中/取消选中 |
scroll_to(x, y) | 滚动页面 |
屏幕截图和PDF
| 工具 | 说明 |
|---|---|
screenshot(path) | 截图 |
pdf(path) | 生成PDF |
Cookie和存储
| 工具 | 说明 |
|---|---|
get_cookies() | 获取Cookie |
set_cookie(name, value) | 设置cookie |
storage_get(key) | 获取本地存储 |
storage_set(key, value) | 设置本地存储 |
JavaScript
| 工具 | 说明 |
|---|---|
evaluate(script) | 执行JS |
CLI选项
arche-browser [OPTIONS]
Mode:
--local Enable full local PC control
--no-browser Disable browser tools (requires --local)
Transport:
--sse Run as SSE server for remote access
--port PORT SSE server port (default: 8080)
Browser:
--headless Run Chrome in headless mode
Authentication:
--no-auth Disable token authentication
--token TOKEN Use specific auth token
--show-token Show current auth token
--reset-token Generate new auth token建筑
arche_browser/
├── __init__.py # Package exports
├── __main__.py # CLI entry point
├── chrome.py # Chrome process management
├── browser.py # Full CDP browser automation
├── server.py # MCP server with all tools
├── auth.py # Token authentication
├── local.py # Local PC control primitives
└── sites/
└── chatgpt.py # ChatGPT-specific client安全
- 令牌身份验证:默认情况下,远程SSE服务器需要身份验证
- 明确选择加入:需要本地PC控制
--local旗帜 - 无沙箱:本地控制没有限制-负责任地使用
需求
- Python 3.10+
- Chrome、Chromium或Edge浏览器(用于浏览器工具)
- MCP客户端(克劳德代码等)
许可证
麻省理工学院
