Browser MCP Server
A Model Context Protocol server for browser automation that uses Puppeteer to provide web browsing, content extraction, and interaction capabilities through natural language.
README
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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.