Skip to main content
Glama
Building a Browser Harness MCP for AI Agents

Building a Browser Harness MCP for AI Agents

by jiin-kim109

AI 에이전트용 브라우저 하네스/MCP 구축

Playwright, MCP, GitHub Copilot SDK로 구축된 브라우저 하네스입니다.

설정

npm install
npx playwright install chromium

Azure OpenAI 환경 변수를 설정하세요:

export AZURE_OPENAI_ENDPOINT="https://..."
export AZURE_OPENAI_API_KEY="..."
export AZURE_OPENAI_API_VERSION="2025-04-01-preview"
export AZURE_OPENAI_DEPLOYMENT="gpt-5.4"

기본적으로 하네스는 Playwright Chromium을 실행합니다. 대신 Chrome에 연결하려면 전용 프로필로 시작하고 CDP 엔드포인트를 내보내세요:

google-chrome \
  --remote-debugging-port=9222 \
  --user-data-dir="$PWD/.agent-browser" \
  --no-first-run

export BROWSER_CDP_URL="http://127.0.0.1:9222"

Related MCP server: playwright-browser

실행

npm start -- "Open example.com and print the page title."

라이브 작업을 실행하세요:

npm run eval
npm run eval -- --task amazon

코드 실행 런타임은 보안 경계가 아닙니다. 이 패턴을 신뢰할 수 없는 입력과 함께 사용하기 전에 생성된 코드를 격리된 프로세스 또는 VM에서 실행하세요.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers