Skip to main content
Glama
MCP Browser Automation Server

MCP Browser Automation Server

by hrmeetsingh

MCP 浏览器自动化

这是一个演示项目,用于练习如何基于模型上下文协议 (MCP) 的服务器端实现,以便使用 Playwright 实现自动浏览。它与 Claude 桌面客户端交互,以接受用户提示并使用服务器控制浏览器。

先决条件

Related MCP server: claude-playwright

建筑

  1. 克隆存储库: git clone https://github.com/hrmeetsingh/mcp-browser-automation.git

  2. 安装依赖项: npm install

  3. 验证输出可执行文件是否存在于dist文件夹中

一体化

  1. 在~/Application\ Support/Claude/claude_desktop_config.json中创建配置文件(适用于 macOS)

  2. 将以下内容复制到文件中:

{
  "mcpServers": {
    "mcp-browser-automation": {
      "command": "node",
      "args": ["/path/to/mcp-browser-automation/dist/index.js"]
    }
  }
}
  1. 启动 Claude Desktop

用法

  1. 打开 Claude 桌面

  2. 开始新的对话以打开浏览器并导航到 URL

例子

  • 添加了 MCP 服务器选项添加了 MCP 服务器选项

  • 导航到 URL 并使用 playwright 执行操作导航至 URL 并输入文本

Available Tools

12 tools
playwright_clickC

Click an element on the page

Inputs: selector (required).

playwright_deleteC

Perform an HTTP DELETE request

Inputs: url (required).

playwright_evaluateC

Execute JavaScript in the browser console

Inputs: script (required).

playwright_fillC

fill out an input field

Inputs: selector (required), value (required).

playwright_getC

Perform an HTTP GET request

Inputs: url (required).

playwright_hoverC

Hover an element on the page

Inputs: selector (required).

playwright_navigateC

Navigate to a URL

Inputs: url (required).

playwright_patchC

Perform an HTTP PATCH request

Inputs: url (required), value (required).

playwright_postC

Perform an HTTP POST request

Inputs: url (required), value (required).

playwright_putC

Perform an HTTP PUT request

Inputs: url (required), value (required).

playwright_screenshotC

Take a screenshot of the current page or a specific element

Inputs: name (required), downloadsDir, height, savePng, +3 more.

playwright_selectC

Select an element on the page with Select tag

Inputs: selector (required), value (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools have distinct purposes, but there is some potential confusion between playwright_click and playwright_select, as both involve interacting with page elements. The HTTP methods (GET, POST, PUT, PATCH, DELETE) are clearly differentiated, and other tools like navigate, screenshot, and evaluate have unique functions.

    Naming Consistency5/5

    All tools follow a consistent 'playwright_verb' naming pattern, using snake_case throughout. This predictability makes it easy for agents to understand and use the toolset without confusion about naming conventions.

    Tool Count5/5

    With 12 tools, this server is well-scoped for browser automation, covering essential actions like navigation, interaction, HTTP requests, and debugging. Each tool serves a clear purpose, and the count aligns with the domain's complexity without being overwhelming.

    Completeness4/5

    The toolset provides strong coverage for core browser automation tasks, including navigation, element interaction, HTTP methods, and screenshots. A minor gap is the lack of tools for handling browser contexts, tabs, or more advanced JavaScript execution, but agents can still accomplish most workflows effectively.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI assistants to control a browser through Playwright automation tools, allowing them to perform web tasks like navigation, typing, clicking, and taking screenshots. Deployed on Cloudflare Workers and compatible with various AI platforms including Claude Desktop and VS Code.
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables browser automation and web interaction control through Playwright, allowing Claude Code to navigate, click, fill forms, take screenshots, and manage sessions.
      100 npm
      9
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language browser automation through Claude, wrapping Playwright to execute commands like navigation, clicking, form filling, and screenshots.
      8 npm
      30
      MIT