workspace
This commit is contained in:
54
docs/playwright-mcp.md
Normal file
54
docs/playwright-mcp.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Playwright MCP în LXC Container
|
||||
|
||||
Plugin-ul Playwright MCP permite automatizarea browser-ului în Claude Code. Necesită configurație specială pentru a rula în container LXC unprivileged.
|
||||
|
||||
## Configurație Claude Code
|
||||
|
||||
Adaugă în `~/.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"playwright": {
|
||||
"command": "npx",
|
||||
"args": ["@playwright/mcp@latest", "--headless", "--no-sandbox", "--browser", "chromium"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Configurație LXC (Proxmox)
|
||||
|
||||
În `/etc/pve/lxc/<CTID>.conf` adaugă:
|
||||
|
||||
```
|
||||
lxc.apparmor.profile: unconfined
|
||||
lxc.cap.drop:
|
||||
lxc.mount.entry: /dev/shm dev/shm none bind,optional,create=dir 0 0
|
||||
```
|
||||
|
||||
**Important:** După modificare, restartează containerul:
|
||||
```bash
|
||||
pct stop <CTID> && pct start <CTID>
|
||||
```
|
||||
|
||||
## Instalare Chromium
|
||||
|
||||
```bash
|
||||
npx playwright install chromium
|
||||
```
|
||||
|
||||
## Verificare
|
||||
|
||||
Pentru a testa că Playwright funcționează:
|
||||
```bash
|
||||
npx playwright open --headless about:blank
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Eroare: "No usable sandbox"
|
||||
Asigură-te că `--no-sandbox` este în args și configurația LXC este aplicată.
|
||||
|
||||
### Eroare: "Browser not found"
|
||||
Rulează `npx playwright install chromium` pentru a instala browser-ul.
|
||||
Reference in New Issue
Block a user