Skip to main content
Glama

Browser Automation MCP Server

by Raghu6798

🤖 브라우저 자동화 에이전트

MCP(모델 제어 프로그램) 기반으로 구축된 강력한 브라우저 자동화 도구로, 웹 스크래핑 기능과 LLM 기반 인텔리전스를 결합했습니다. 이 에이전트는 Google 검색, 웹페이지 탐색, GitHub, Stack Overflow, 문서 사이트 등 다양한 웹사이트의 콘텐츠를 지능적으로 스크래핑할 수 있습니다.

🚀 특징

  • 🔍 Google 검색 통합 : 모든 쿼리에 대한 상위 검색 결과를 찾아 검색합니다.

  • 🕸️ 지능형 웹 스크래핑 : 다양한 웹사이트 유형에 맞는 맞춤형 스크래핑 전략:

    • 📂 GitHub 저장소

    • 💬 Stack Overflow 질문과 답변

    • 📚 문서 페이지

    • 🌐 일반 웹사이트

  • 🧠 AI 기반 처리 : 스크래핑된 콘텐츠를 이해하고 처리하기 위해 Mistral AI를 사용합니다.

  • 🥷 스텔스 모드 : 감지를 피하기 위해 브라우저 지문 보호 기능을 구현합니다.

  • 💾 콘텐츠 저장 : 스크래핑된 페이지의 스크린샷과 텍스트 콘텐츠를 자동으로 저장합니다.

🏗️ 건축

이 프로젝트는 MCP로 구동되는 클라이언트-서버 아키텍처를 사용합니다.

  • 🖥️ 서버 : 브라우저 자동화 및 웹 스크래핑 작업을 처리합니다.

  • 👤 클라이언트 : Mistral AI와 LangGraph를 사용하여 AI 인터페이스를 제공합니다.

  • 📡 통신 : 클라이언트-서버 통신을 위해 stdio를 사용합니다.

⚙️ 요구 사항

  • 🐍 파이썬 3.8 이상

  • 🎭 극작가

  • 🧩 MCP(모델 제어 프로그램)

  • 🔑 미스트랄 AI API 키

📥 설치

  1. 저장소를 복제합니다.

지엑스피1

  1. 종속성 설치:

pip install -r requirements.txt
  1. Playwright 브라우저 설치:

playwright install
  1. 프로젝트 루트에 .env 파일을 만들고 Mistral AI API 키를 추가하세요.

MISTRAL_API_KEY=your_api_key_here

📋 사용법

서버 실행

python main.py

클라이언트 실행

python client.py

샘플 상호작용

서버와 클라이언트가 모두 실행되면:

  1. 메시지가 표시되면 쿼리를 입력하세요

  2. 에이전트는 다음을 수행합니다.

    • 🔍 관련 결과를 Google에서 검색하세요

    • 🧭 상위 결과로 이동

    • 📊 웹사이트 유형에 따라 콘텐츠 스크래핑

    • 📸 스크린샷과 콘텐츠를 파일에 저장하세요

    • 📤 처리된 정보를 반환합니다

🛠️ 도구 기능

get_top_google_url

🔍 Google에서 검색하여 주어진 쿼리에 대한 최상위 결과 URL을 반환합니다.

browse_and_scrape

🌐 URL로 이동하여 웹사이트 유형에 따라 콘텐츠를 스크래핑합니다.

scrape_github

📂 GitHub 저장소에서 README 콘텐츠와 코드 블록을 추출하는 데 특화되어 있습니다.

scrape_stackoverflow

💬 Stack Overflow 페이지에서 질문, 답변, 댓글 및 코드 블록을 추출합니다.

scrape_documentation

📚 문서 내용과 코드 예시를 추출하는 데 최적화되었습니다.

scrape_generic

🌐 일반 웹사이트에서 문단 텍스트와 코드 블록을 추출합니다.

📁 파일 구조

browser-automation-agent/ ├── main.py # MCP server implementation ├── client.py # Mistral AI client implementation ├── requirements.txt # Project dependencies ├── .env # Environment variables (API keys) └── README.md # Project documentation

📤 출력 파일

에이전트는 타임스탬프가 포함된 두 가지 유형의 출력 파일을 생성합니다.

  • 📸 final_page_YYYYMMDD_HHMMSS.png : 최종 페이지 상태 스크린샷

  • 📄 scraped_content_YYYYMMDD_HHMMSS.txt : 페이지에서 추출된 텍스트 콘텐츠

⚙️ 맞춤 설정

다음 매개변수를 코드에서 수정할 수 있습니다.

  • 🖥️ 브라우저 창 크기: browse_and_scrape 에서 widthheight 조정하세요

  • 👻 헤드리스 모드: 보이지 않는 브라우저 작업을 위해 headless=True 설정하세요.

  • 🔢 Google 검색 결과 수: get_top_google_url 에서 num_results 변경하세요.

❓ 문제 해결

  • 🔌 연결 문제 : 서버와 클라이언트가 별도의 터미널에서 실행 중인지 확인하세요.

  • 🎭 Playwright 오류 : 브라우저에 playwright install 가 되어 있는지 확인하세요.

  • 🔑 API 키 오류 : Mistral API 키가 .env 파일에 올바르게 설정되었는지 확인하세요.

  • 🛣️ 경로 오류 : 필요한 경우 client.py 에서 main.py 경로를 업데이트하세요.

📜 라이센스

MIT 라이센스

🤝 기여하기

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


🧩 MCP, 🎭 Playwright, 🧠 Mistral AI로 구축됨

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Google 검색, 웹페이지 탐색, GitHub, Stack Overflow, 문서 사이트 등 다양한 웹사이트에서 콘텐츠 추출 등의 기능을 갖춘 브라우저 자동화 도구를 통해 지능형 웹 스크래핑을 지원합니다.

  1. 🚀 특징
    1. 🏗️ 건축
      1. ⚙️ 요구 사항
        1. 📥 설치
          1. 📋 사용법
            1. 서버 실행
            2. 클라이언트 실행
            3. 샘플 상호작용
          2. 🛠️ 도구 기능
            1. get_top_google_url
            2. browse_and_scrape
            3. scrape_github
            4. scrape_stackoverflow
            5. scrape_documentation
            6. scrape_generic
          3. 📁 파일 구조
            1. 📤 출력 파일
              1. ⚙️ 맞춤 설정
                1. ❓ 문제 해결
                  1. 📜 라이센스
                    1. 🤝 기여하기

                      Related MCP Servers

                      • A
                        security
                        F
                        license
                        A
                        quality
                        Enables browser automation using Python scripts, offering operations like taking webpage screenshots, retrieving HTML content, and executing JavaScript.
                        Last updated -
                        4
                        19
                        • Linux
                      • -
                        security
                        F
                        license
                        -
                        quality
                        Provides AI agents and coding assistants with web crawling and RAG capabilities, allowing them to scrape websites and perform semantic searches on the crawled content.
                        Last updated -
                        2
                      • A
                        security
                        A
                        license
                        A
                        quality
                        Enables AI models to fetch text content from URLs, extract links from web pages, and search the web using Brave Search with automatic content retrieval from top results. Provides comprehensive web scraping and search capabilities with robust error handling.
                        Last updated -
                        5
                        MIT License
                      • -
                        security
                        A
                        license
                        -
                        quality
                        Enables AI agents to perform undetectable browser automation that bypasses Cloudflare, antibots, and social media blocks. Provides 105 tools for element extraction, network debugging, and real-world web scraping with a 98.7% success rate on protected sites.
                        Last updated -
                        72
                        MIT License
                        • Apple
                        • Linux

                      View all related MCP servers

                      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/Raghu6798/Browser_scrape_mcp'

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