Skip to main content
Glama
MCP Browser Agent

MCP Browser Agent

by ashley-ha

MCP 浏览器代理

铁匠徽章

在 AGI House MCP Hackathon 建造

概述

该项目是一个浏览器自动化代理,它使用模型上下文协议 (MCP) 来实现浏览器交互。它通过我们的 MCP 服务器实现了 Claude 与浏览器自动化功能的无缝集成。

感谢 Browser-Use 的浏览器代理功能,为我们的 MCP 服务器提供支持!

Related MCP server: selenium-mcp

系统要求

  • macOS(达尔文 24.2.0)

  • Python 3.12 或更高版本

  • uv包管理器

  • Google Chrome 浏览器(运行任务之前请确保浏览器已关闭。)

安装

通过 Smithery 安装

要通过Smithery自动安装 Claude Desktop 的浏览器自动化代理:

npx -y @smithery/cli install @ashley-ha/mcp-manus --client claude

手动安装

  1. 克隆存储库:

git clone <repository-url>
cd mcp
  1. 使用uv设置 Python 环境:

uv venv
source .venv/bin/activate
uv sync

配置

Claude桌面配置

创建或修改您的 Claude Desktop 配置文件:

{
  "mcpServers": {
    "browser-use": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/mcp",
        "run",
        "browser-use.py"
      ]
    }
  }
}

将/ABSOLUTE/PATH/TO/browser-use替换为项目目录的绝对路径。

浏览器配置

该代理配置为使用 Google Chrome,具有以下默认设置:

  • 用于开发的非无头模式

  • 窗口大小:1280x1100

  • 禁用安全功能以进行测试

  • 录音路径:./tmp/recordings

特征

  • 通过 MCP 工具实现浏览器自动化

  • 国家管理和规划能力

  • 交互元素检测和操作

  • 可配置的浏览器上下文

  • 日志记录和调试支持

用法

该代理提供两个主要工具:

  1. get_planner_state :检索当前浏览器状态和规划上下文

  2. execute_actions浏览器中计划的操作

发展

日志记录

该项目使用 Python 的内置日志记录,其配置如下:

  • 所有日志都指向 stderr

  • 自定义格式: %(levelname)-8s [%(name)s] %(message)s

  • 根记录器级别:INFO

  • 第三方记录器级别:警告

项目结构

  • browser-use.py :主入口点和服务器实现

  • tmp/recordings :浏览器会话记录的目录

  • 通过uv管理依赖项

贡献

该项目是在 AGI House MCP Hackathon 期间构建的。欢迎贡献!

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

版权所有 (c) 2025 Jaeyun Ha、Ashley Ha

特此授予获得此软件和相关文档文件(“软件”)副本的任何人免费许可,以无限制方式处理软件,包括但不限于使用、复制、修改、合并、发布、分发、再授权和/或销售软件副本的权利,并允许向其提供软件的人员这样做,但须遵守以下条件:

上述版权声明和本许可声明均应包含在软件的所有副本或实质性部分中。

本软件按“原样”提供,不附带任何形式的明示或暗示保证,包括但不限于适销性、适用于特定用途和非侵权性的保证。在任何情况下,作者或版权所有者均不对因本软件或使用或以其他方式处理本软件而引起的或与之相关的任何索赔、损害或其他责任承担责任,无论是合同、侵权或其他诉讼。

Available Tools

2 tools
execute_actionsB

Execute actions from the planner state.

Args:
    actions: A dictionary containing the planner state and actions in format:
            {
                "current_state": {
                    "evaluation_previous_goal": str,
                    "memory": str,
                    "next_goal": str
                },
                "action": [
                    {"action_name": {"param1": "value1"}},
                    ...
                ]
            }
            
Note: If the page state changes (new elements appear) during action execution,
the sequence will be interrupted and you'll need to get a new planner state.

Inputs: actions (required).

get_planner_stateA

Get the current browser state and planning context. This tool must be executed before execute_actions tool.

Must return a JSON string in the format:
{
    "current_state": {
        "evaluation_previous_goal": "Success|Failed|Unknown - Analysis of previous actions",
        "memory": "Description of what has been done and what to remember",
        "next_goal": "What needs to be done with the next immediate action"
    },
    "action": [
        {"action_name": {"param1": "value1", ...}},
        ...
    ]
}

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have completely distinct purposes: get_planner_state retrieves browser state and planning context, while execute_actions performs actions based on that state. There is no overlap or ambiguity between these functions.

    Naming Consistency5/5

    Both tools follow a consistent verb_noun pattern with clear action-oriented names (get_planner_state, execute_actions). The naming convention is uniform and predictable throughout the set.

    Tool Count2/5

    With only 2 tools for a browser automation server, the surface feels severely limited. While the tools cover a basic planning-execution loop, typical browser automation requires more granular operations like navigation, element interaction, or content extraction.

    Completeness2/5

    The toolset provides only a high-level planning/execution abstraction without direct browser manipulation capabilities. There are significant gaps for common browser tasks like navigating to URLs, clicking elements, extracting text, or handling dialogs, which agents would need for robust automation.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      A Model Context Protocol (MCP) integration that provides Claude Desktop with autonomous browser automation capabilities. This agent enables Claude to interact with web content, manipulate DOM elements, execute JavaScript, and perform API requests.
      13
      43
      TypeScript
      Mozilla Public 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables browser automation through the Claude Chrome Extension, allowing agents to navigate websites, fill forms, take screenshots, and debug web apps via standard MCP protocols.
      1
      MIT