Skip to main content
Glama
random-robbie

MCP Web Browser Server

MCP 웹 브라우저 서버

Playwright가 제공하는 MCP(Model Context Protocol)를 위한 고급 웹 브라우징 서버로, 유연하고 안전한 API를 통해 헤드리스 브라우저 상호작용을 지원합니다.

🌐 특징

  • 헤드리스 웹 브라우징 : SSL 인증서 검증 우회를 통해 모든 웹사이트 탐색

  • 전체 페이지 콘텐츠 추출 : 동적으로 로드된 JavaScript를 포함한 전체 HTML 콘텐츠를 검색합니다.

  • 다중 탭 지원 : 여러 브라우저 탭을 만들고, 관리하고, 전환합니다.

  • 고급 웹 상호작용 도구 :

    • 텍스트 콘텐츠 추출

    • 페이지 요소 클릭

    • 양식 필드에 텍스트 입력

    • 스크린샷 캡처

    • 필터링 기능을 사용하여 페이지 링크 추출

    • 어느 방향으로든 페이지를 스크롤하세요

    • 페이지에서 JavaScript 실행

    • 페이지 새로 고침

    • 탐색이 완료될 때까지 기다리세요

  • 리소스 관리 : 비활성 후 사용되지 않는 리소스를 자동으로 정리합니다.

  • 향상된 페이지 정보 : 현재 페이지에 대한 자세한 메타데이터를 가져옵니다.

Related MCP server: Fetch Browser

🚀 빠른 시작

필수 조건

  • 파이썬 3.10+

  • MCP SDK

  • 극작가

설치

지엑스피1

Claude Desktop 구성

claude_desktop_config.json 에 다음을 추가하세요:

{
  "mcpServers": {
    "web-browser": {
      "command": "python",
      "args": [
        "/path/to/your/server.py"
      ]
    }
  }
}

💡 사용 예시

기본 웹 탐색

# Browse to a website
page_content = browse_to("https://example.com")

# Extract page text
text_content = extract_text_content()

# Extract text from a specific element
title_text = extract_text_content("h1.title")

웹 상호작용

# Navigate to a page
browse_to("https://example.com/login")

# Input text into a form
input_text("#username", "your_username")
input_text("#password", "your_password")

# Click a login button
click_element("#login-button")

스크린샷 캡처

# Capture full page screenshot
full_page_screenshot = get_page_screenshots(full_page=True)

# Capture specific element screenshot
element_screenshot = get_page_screenshots(selector="#main-content")

링크 추출

# Get all links on the page
page_links = get_page_links()

# Get links matching a pattern
filtered_links = get_page_links(filter_pattern="contact")

멀티탭 브라우징

# Create a new tab
tab_id = create_new_tab("https://example.com")

# Create another tab
another_tab_id = create_new_tab("https://example.org")

# List all open tabs
tabs = list_tabs()

# Switch between tabs
switch_tab(tab_id)

# Close a tab
close_tab(another_tab_id)

고급 상호작용

# Scroll the page
scroll_page(direction="down", amount="page")

# Execute JavaScript on the page
result = execute_javascript("return document.title")

# Get detailed page information
page_info = get_page_info()

# Refresh the current page
refresh_page()

# Wait for navigation to complete
wait_for_navigation(timeout_ms=5000)

🛡️ 보안 기능

  • SSL 인증서 유효성 검사 우회

  • 안전한 브라우저 컨텍스트 관리

  • 사용자 정의 사용자 에이전트 구성

  • 오류 처리 및 포괄적인 로깅

  • 구성 가능한 시간 초과 설정

  • CSP 바이패스 제어

  • 쿠키 도용 방지

🔧 문제 해결

일반적인 문제

  • SSL 인증서 오류 : 자동으로 우회됨

  • 느린 페이지 로드 : browse_to() 메서드에서 시간 초과 조정

  • 요소를 찾을 수 없음 : 선택기를 주의 깊게 확인하세요

  • 브라우저 리소스 사용량 : 비활성 기간 후 자동 정리

벌채 반출

모든 중요한 이벤트는 자세한 정보와 함께 기록되어 디버깅이 쉽습니다.

📋 도구 매개변수

browse_to(url: str, context: Optional[Any] = None)

  • url : 이동할 웹사이트

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

extract_text_content(selector: Optional[str] = None, context: Optional[Any] = None)

  • selector : 특정 콘텐츠를 추출하는 선택적 CSS 선택기

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

click_element(selector: str, context: Optional[Any] = None)

  • selector : 클릭할 요소의 CSS 선택자

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

get_page_screenshots(full_page: bool = False, selector: Optional[str] = None, context: Optional[Any] = None)

  • full_page : 전체 페이지 스크린샷 캡처

  • selector : 스크린샷을 찍을 선택 요소

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

  • filter_pattern : 링크를 필터링하기 위한 선택적 텍스트 패턴

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

input_text(selector: str, text: str, context: Optional[Any] = None)

  • selector : 입력 요소의 CSS 선택자

  • text : 입력할 텍스트

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

create_new_tab(url: Optional[str] = None, context: Optional[Any] = None)

  • url : 새 탭에서 이동할 선택적 URL

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

switch_tab(tab_id: str, context: Optional[Any] = None)

  • tab_id : 전환할 탭의 ID

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

list_tabs(context: Optional[Any] = None)

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

close_tab(tab_id: Optional[str] = None, context: Optional[Any] = None)

  • tab_id : 닫을 탭의 선택적 ID(기본값은 현재 탭)

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

refresh_page(context: Optional[Any] = None)

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

get_page_info(context: Optional[Any] = None)

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

scroll_page(direction: str = "down", amount: str = "page", context: Optional[Any] = None)

  • direction : 스크롤 방향('위', '아래', '왼쪽', '오른쪽')

  • amount : 스크롤할 양('페이지', '절반' 또는 숫자)

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

wait_for_navigation(timeout_ms: int = 10000, context: Optional[Any] = None)

  • timeout_ms : 대기할 최대 시간(밀리초)

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

execute_javascript(script: str, context: Optional[Any] = None)

  • script : 실행할 JavaScript 코드

  • context : 선택적 컨텍스트 객체(현재 사용되지 않음)

🤝 기여하기

기여를 환영합니다! 풀 리퀘스트를 제출해 주세요.

개발 설정

# Clone the repository
git clone https://github.com/random-robbie/mcp-web-browser.git

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`

# Install dependencies
pip install -e .[dev]

📄 라이센스

MIT 라이센스

🔗 관련 프로젝트

💬 지원

문제가 있거나 질문이 있으시면 GitHub에서 문제를 열어 주세요.

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/random-robbie/mcp-web-browser'

If you have feedback or need assistance with the MCP directory API, please join our Discord server