跳到正文
DEV Community· phosgene·· 4 小時前AI 評分38

DEV 展示:MCP Browser Agent 以 FastMCP 和 Playwright 實現自主網頁自動化

Show DEV: MCP Browser Agent — Autonomous Web Automation with FastMCP and Playwright

AI 導讀

MCP Browser Agent 是一個以 Python 建構的 MCP 伺服器,整合 FastMCP、browser-use 和 Playwright,讓 Cursor、Claude Desktop 等兼容的 AI 用戶端自動執行瀏覽器任務。它可擷取結構化網頁資料並以 JSON 回傳,也能下載檔案並分類儲存至本機目錄;目前仍在積極開發中。

正文

phosgene

MCP Browser Agent

An MCP (Model Context Protocol) server that enables AI assistants to automate browser-based tasks, extract structured web data, download files, and organize local outputs using Python.

The project integrates FastMCP, browser-use, and Playwright to provide browser automation tools to compatible MCP clients such as Cursor and Claude Desktop.

⚠️ Project status: In active development. Features and setup instructions may evolve as the implementation matures.


Features

  • MCP Integration: Exposes browser automation capabilities as tools that compatible AI clients can discover and invoke.
  • AI-Powered Browsing: Uses an autonomous browser agent to navigate complex websites and perform multi-step tasks.
  • Structured Data Extraction: Collects web information and returns clean JSON results.
  • File Downloads & Organization: Saves and automatically categorizes downloaded files into structured local directories.
  • Python-Based Architecture: Modular setup keeping server, browser automation, configuration, and file management separated.

Architecture


text
┌──────────────────────────────┐
│        MCP Client            │
│    Cursor / Claude Desktop   │
└──────────────┬───────────────┘
               │
               │ MCP over stdio
               ▼
┌──────────────────────────────┐
│       FastMCP Server         │
│                              │
│  Browser tools               │
│  File management tools       │
│  Configuration               │
└──────────────┬───────────────┘
               │
       ┌───────┴────────┐
       ▼                ▼
┌──────────────┐  ┌────────────────┐
│ Browser Agent│  │ File Manager   │
│ browser-use  │  │ pathlib/shutil │
│ Playwright   │  │                │
└──────┬───────┘  └───────┬────────┘
       │                  │
       ▼                  ▼
┌──────────────┐  ┌────────────────┐
│ Websites     │  │ Local Workspace│
│ and Web Data │  │ Downloads/JSON │
└──────────────┘  └────────────────┘

來源:DEV Community · dev.to