Skip to main content
Glama

Browser MCP Server

by pansin

Browser MCP Server

一个基于Model Context Protocol (MCP)的浏览器自动化服务器,使用Puppeteer提供强大的网页浏览、内容提取和交互功能。

功能特点

  • 页面导航:导航到URL、刷新、前进/后退
  • 内容提取:获取页面源代码、元数据、截图和文本
  • 格式化内容:将网页内容转换为结构化的Markdown格式
  • 元素交互:点击、输入、选择和等待元素
  • 测试工具:检查元素存在、验证内容、执行脚本
  • 搜索功能:通过百度搜索获取最新文章和信息
  • 安全保障:沙箱浏览器执行与域名限制
  • 配置灵活:支持自定义配置管理

安装

# 克隆仓库 git clone https://github.com/yourusername/browser-mcp-server.git cd browser-mcp-server # 安装依赖 npm install # 构建项目 npm run build

开发

# 启动开发模式 npm run dev

测试

# 运行测试 npm test # 运行特定测试 npx tsx src/tests/simple-test.ts npx tsx src/tests/search-test.ts npx tsx src/tests/visit-website-test.ts npx tsx src/tests/formatted-content-test.ts

配置

服务器使用配置文件管理浏览器设置、安全选项和默认行为。查看src/config/default.ts了解默认配置。

使用方法

Browser MCP Server设计为与Kiro IDE一起使用。将其添加到您的MCP配置中:

{ "mcpServers": { "browser": { "command": "node", "args": ["path/to/browser-mcp-server/dist/index.js"] } } }

详细使用说明请参考用户指南

项目结构

browser-mcp-server/ ├── src/ │ ├── config/ # 配置文件 │ ├── errors/ # 错误处理类 │ ├── interfaces/ # 接口定义 │ ├── managers/ # 管理器实现 │ ├── tools/ # 工具实现 │ ├── types/ # 类型定义 │ ├── utils/ # 工具函数 │ ├── tests/ # 测试文件 │ └── index.ts # 入口文件 ├── dist/ # 编译后的文件 ├── package.json # 项目配置 └── README.md # 项目说明

许可证

本项目采用 Apache License 2.0 许可证。

Copyright 2025 Browser MCP Server Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

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

A Model Context Protocol server for browser automation that uses Puppeteer to provide web browsing, content extraction, and interaction capabilities through natural language.

  1. 功能特点
    1. 安装
      1. 开发
        1. 测试
          1. 配置
            1. 使用方法
              1. 项目结构
                1. 许可证

                  Related MCP Servers

                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server that enables LLMs to automate web browsers using Puppeteer, allowing navigation, screenshots, form filling, and JavaScript execution in a real browser environment.
                    Last updated -
                    1
                    JavaScript
                    MIT License
                  • A
                    security
                    F
                    license
                    A
                    quality
                    A Model Context Protocol server that provides browser automation capabilities using Puppeteer with configurable options through environment variables, enabling LLMs to interact with web pages, take screenshots, and execute JavaScript in a browser environment.
                    Last updated -
                    7
                    4
                    JavaScript
                  • A
                    security
                    F
                    license
                    A
                    quality
                    A Model Context Protocol server that provides browser automation capabilities using Puppeteer, enabling LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment.
                    Last updated -
                    7
                    15,155
                    JavaScript
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server that provides enhanced browser automation capabilities using Puppeteer-Extra with Stealth Plugin, enabling LLMs to interact with web pages in a way that better emulates human behavior and avoids detection as automation.
                    Last updated -
                    2
                    TypeScript
                    MIT License

                  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/pansin/browserMCP'

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