browser-guard-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@browser-guard-mcp Open books.toscrape.com and list the titles on the first page"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
browser-guard-mcp
English: README.en.md · 설계 문서: docs/설계서.md
AI 에이전트를 위한 브라우저 자동화 — 다층 안전 가드 내장 MCP 서버.
LLM 에이전트에 브라우저를 그대로 열어주는 건 위험합니다. 이 서버는 Playwright를 가드 뒤에서 열어줍니다 — 허용된 도메인만 이동하고, 기본은 읽기 전용이며, 모든 행동(차단된 시도 포함)이 감사 로그에 남습니다.
이런 상황에서 씁니다
상황 — 운영팀이 매일 아침 경쟁사·제휴사 페이지 몇 곳을 눈으로 확인한다(가격, 공지, 재고). 에이전트에게 시키고 싶지만, 브라우저를 통째로 주면 엉뚱한 사이트로 가거나 뭔가 눌러버릴까 불안하다.
도입 후 — 확인 대상 도메인만 허용목록에 넣고 읽기 전용으로 물린다. "이 세 페이지 열어서 가격 바뀐 것 있는지 알려줘"가 안전한 일상 업무가 된다 — 클릭·제출은 코드 수준에서 불가능하고, 에이전트가 어디서 무엇을 봤는지(차단된 시도까지) 감사 로그에 남는다.
Related MCP server: MCP Playwright Server
가드 계층
계층 | 막는 것 |
도메인 허용목록 | 의도 밖 사이트 이동 — 위장 도메인( |
로컬 파일 격리 | 임의 파일 열람 — 동봉 데모 사이트 폴더 밖은 경로 탈출 포함 전부 거절 |
읽기 전용 기본값 | 의도 밖 클릭·입력 — 끄려면 명시적으로 |
텍스트 상한 | 컨텍스트 윈도 범람 — 초과분은 잘리고 |
세션 수준 차단 | 다운로드 거부, 팝업·새 탭 즉시 닫기 |
감사 로그 | 추적 불가 — 모든 행동이 시간순 기록, 에이전트도 자기 기록을 조회 가능 |
도구
browser_navigate · browser_get_text · browser_click · browser_fill · browser_screenshot · browser_guard_status · browser_audit_log
데모
동봉된 가짜 쇼핑몰(demo_site/)로 외부 인터넷 없이 시연할 수 있습니다.
"데모 상점 열어서 3만 원 이하 상품 알려줘" → 정상 조회
"무선 마우스 주문해줘" → 거절 — 읽기 전용 모드라 클릭 불가, 에이전트가 이유를 설명
"구글에서 검색해봐" → 거절 — 허용목록 밖, 허용된 도메인 목록 안내
프롬프트가 아니라 코드가 강제하는 안전입니다.
MCP 클라이언트 없이 가드 동작만 눈으로 보고 싶다면 examples/ 스크립트 참조:
demo_guard.py— 브라우저 없이 가드 로직만 (도메인 차단·경로 탈출·읽기 전용·텍스트 상한)demo_browser.py— 실제 headless Chromium으로 데모 사이트 열기demo_browser_headed.py— 브라우저 창을 눈으로 보고 싶을 때 (headless=False)
설치
pip install -e .
playwright install chromium
export BROWSERGUARD_ALLOWED_DOMAINS="books.toscrape.com,quotes.toscrape.com"
export BROWSERGUARD_READ_ONLY="true" # 기본값 — 조회·스크린샷만위 명령으로 설치하면 browser-guard-mcp 커맨드가 생깁니다 (pyproject.toml의 [project.scripts]). 이 자체로는 그냥 실행 가능한 서버일 뿐이고, 실제로 에이전트가 쓰게 하려면 MCP 클라이언트에 등록해야 합니다.
MCP 클라이언트에 연결
Claude Desktop — examples/claude_desktop_config.json 내용을 claude_desktop_config.json에 병합 후 재시작:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"browser-guard": {
"command": "browser-guard-mcp",
"env": {
"BROWSERGUARD_ALLOWED_DOMAINS": "books.toscrape.com,quotes.toscrape.com",
"BROWSERGUARD_READ_ONLY": "true"
}
}
}
}Claude Code(CLI):
claude mcp add browser-guard -- browser-guard-mcp가상환경에만 설치했다면 클라이언트가 PATH에서 browser-guard-mcp를 못 찾을 수 있습니다 — 이때는 command에 절대경로(예: /path/to/.venv/bin/browser-guard-mcp)를 지정하세요.
테스트
pip install -e ".[dev]"
pytest # 19건, 브라우저·네트워크 불필요 — 위장 도메인, 경로 탈출, 읽기 전용, 차단 시 브라우저 미호출함께 보기
sql-guard-mcp — 같은 원칙의 SQL 버전: 능력을 주되 부주의를 불가능하게
라이선스
MIT
Available Tools
7 toolsbrowser_audit_logARead-only
감사 로그를 최신순으로 돌려준다 — 차단된 시도까지 전부 기록돼 있다.
Inputs: limit.
browser_clickA
요소를 클릭한다. 읽기 전용 모드(기본)에서는 거절된다.
Inputs: selector (required).
browser_fillA
입력 요소에 값을 채운다. 읽기 전용 모드(기본)에서는 거절된다.
Inputs: value (required), selector (required).
browser_get_textARead-only
현재 페이지의 보이는 텍스트를 추출한다. 상한 초과 시 truncated=True로 잘라 낸다.
Inputs: no named parameters.
browser_guard_statusARead-only
현재 가드 설정(허용 도메인·읽기 전용 여부·텍스트 상한)을 돌려준다.
Inputs: no named parameters.
browser_screenshotARead-only
현재 화면을 PNG로 저장하고 파일 경로를 돌려준다.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct action: navigation, text extraction, clicking, filling, screenshots, audit log retrieval, and guard status inspection. There is no real overlap between tools, and the read-only interaction distinction is clear.
All tool names share the browser_ prefix and generally follow a verb_noun structure (navigate, get_text, click, fill, screenshot). Slight inconsistency exists with browser_audit_log and browser_guard_status, which are noun phrases rather than explicit verb-first commands.
Seven tools is a well-scoped set for a guarded browser automation server. Each tool serves a clear purpose without redundancy or bloat.
The core browsing lifecycle is covered: navigate, read text, interact, screenshot, and audit history. Minor gaps include no back/forward/refresh tool and no way to modify guard settings, but these may be intentionally external or out of scope.
Maintenance
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Playwright browser automation — navigate, click, fill forms, extract, screenshot — 17 agent tools.
Connect AI agents to your own Chrome with scoped access, approvals, and verified task results.
Verified playbooks for websites: check before your agent browses, report how it went after.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to automate web browsers through Playwright, providing capabilities for navigation, content extraction, form filling, screenshot capture, and JavaScript execution. Supports multiple browser engines with comprehensive error handling and security features.1-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to control web browsers through Playwright automation, providing 50+ tools for navigation, interaction, testing, accessibility audits, and visual testing across Chromium, Firefox, and WebKit.24 npmMIT
- AlicenseAqualityDmaintenanceEnables AI assistants to perform browser automation using Playwright, including navigation, content extraction, screenshot analysis, and custom script execution.520 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to control a browser through Playwright tools, allowing web automation tasks such as navigation, clicking, typing, and screenshots.8,154 npmApache 2.0