Browser MCP
An MCP server for browser automation using Puppeteer that enables AI assistants to navigate web pages, interact with UI elements, and capture screenshots. It supports comprehensive web tasks including form filling, content extraction, and executing custom JavaScript within the browser context.
README
Browser MCP
A Model Context Protocol (MCP) server for browser automation using Puppeteer. This enables AI assistants like Claude, GPT, and other LLM-powered tools to navigate web pages, take screenshots, click elements, fill forms, and interact with web content.
Features
- Navigation: Navigate to URLs, go back/forward, reload pages
- Screenshots: Capture full-page or viewport screenshots
- Interaction: Click, type, hover, scroll, select dropdown options
- Content Extraction: Get page content, titles, and links
- JavaScript Execution: Run custom scripts in the browser context
- Wait Conditions: Wait for elements or timeouts
Installation
Prerequisites
- Node.js 18+ (LTS recommended)
- npm, pnpm, or bun
Install via npx (Recommended)
You can run the server directly without installation:
npx github:blink-new/browser-mcp
Install Globally
npm install -g github:blink-new/browser-mcp
Install from Source
git clone https://github.com/blink-new/browser-mcp.git
cd browser-mcp
npm install
npm run build
Setup Instructions
Ubuntu / Debian Linux
-
Install Node.js 18+:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt-get install -y nodejs -
Install Chromium dependencies:
sudo apt-get install -y \ libnss3 \ libatk1.0-0 \ libatk-bridge2.0-0 \ libcups2 \ libdrm2 \ libxkbcommon0 \ libxcomposite1 \ libxdamage1 \ libxfixes3 \ libxrandr2 \ libgbm1 \ libasound2 \ libpango-1.0-0 \ libcairo2 \ libatspi2.0-0 -
Configure your MCP client (see Configuration section below)
macOS
-
Install Node.js 18+ (using Homebrew):
brew install nodeOr using nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash nvm install 20 nvm use 20 -
Configure your MCP client (see Configuration section below)
Windows
-
Install Node.js 18+:
- Download and install from nodejs.org
- Or use winget:
winget install OpenJS.NodeJS.LTS
-
Configure your MCP client (see Configuration section below)
Configuration
OpenCode
Add to your ~/.config/opencode/opencode.json:
{
"mcp": {
"browser": {
"type": "local",
"command": ["npx", "-y", "github:blink-new/browser-mcp"],
"enabled": true
}
}
}
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"browser": {
"command": "npx",
"args": ["-y", "github:blink-new/browser-mcp"]
}
}
}
Cursor / VS Code with MCP Extension
Add to your MCP configuration:
{
"mcpServers": {
"browser": {
"command": "npx",
"args": ["-y", "github:blink-new/browser-mcp"]
}
}
}
With Environment Variables
For headless servers or containers:
{
"mcp": {
"browser": {
"type": "local",
"command": ["npx", "-y", "github:blink-new/browser-mcp"],
"environment": {
"BROWSER_MCP_NO_SANDBOX": "true",
"BROWSER_MCP_HEADLESS": "true"
},
"enabled": true
}
}
}
Environment Variables
| Variable | Description | Default |
|---|---|---|
BROWSER_MCP_HEADLESS |
Run browser in headless mode | true |
BROWSER_MCP_NO_SANDBOX |
Disable Chrome sandbox (required for Docker/root) | false |
BROWSER_MCP_EXECUTABLE_PATH |
Path to Chrome/Chromium executable | Auto-detected |
BROWSER_MCP_ARGS |
Additional Chrome arguments (comma-separated) | None |
Available Tools
Navigation
| Tool | Description |
|---|---|
browser_navigate |
Navigate to a URL |
browser_back |
Go back to previous page |
browser_forward |
Go forward to next page |
browser_reload |
Reload current page |
Screenshots & Content
| Tool | Description |
|---|---|
browser_screenshot |
Take a screenshot (supports fullPage option) |
browser_title |
Get the page title |
browser_content |
Get HTML content (optional selector) |
browser_links |
Get all links on the page |
Interaction
| Tool | Description |
|---|---|
browser_click |
Click on an element by CSS selector |
browser_type |
Type text into an input field |
browser_hover |
Hover over an element |
browser_select |
Select an option from a dropdown |
browser_scroll |
Scroll up or down |
Utilities
| Tool | Description |
|---|---|
browser_wait |
Wait for time or element |
browser_evaluate |
Execute JavaScript |
browser_close |
Close the browser |
Examples
Navigate and Screenshot
User: Go to example.com and take a screenshot
AI: [Uses browser_navigate with url="https://example.com"]
AI: [Uses browser_screenshot]
Fill a Form
User: Fill out the contact form on the page
AI: [Uses browser_type with selector="#name" text="John Doe"]
AI: [Uses browser_type with selector="#email" text="john@example.com"]
AI: [Uses browser_click with selector="#submit"]
Extract Data
User: Get all the links from this page
AI: [Uses browser_links]
Troubleshooting
Linux: Browser fails to launch
If you see errors about missing libraries, install the Chromium dependencies:
sudo apt-get install -y libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libasound2
Docker/Root: Sandbox errors
Use the --no-sandbox flag:
BROWSER_MCP_NO_SANDBOX=true npx github:blink-new/browser-mcp
Or in your config:
{
"environment": {
"BROWSER_MCP_NO_SANDBOX": "true"
}
}
macOS: Puppeteer can't find Chrome
The bundled Chromium should work automatically. If not, specify the path:
BROWSER_MCP_EXECUTABLE_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" npx github:blink-new/browser-mcp
Windows: Long path errors
Run PowerShell as Administrator and enable long paths:
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
Docker Support
Example Dockerfile:
FROM node:20-slim
# Install Chromium dependencies
RUN apt-get update && apt-get install -y \
libnss3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libasound2 \
libpango-1.0-0 \
libcairo2 \
&& rm -rf /var/lib/apt/lists/*
ENV BROWSER_MCP_NO_SANDBOX=true
ENV BROWSER_MCP_HEADLESS=true
CMD ["npx", "-y", "github:blink-new/browser-mcp"]
Development
# Clone the repository
git clone https://github.com/blink-new/browser-mcp.git
cd browser-mcp
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build
npm run build
# Run production build
npm start
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE for details.
Credits
- Built with Puppeteer
- Uses Model Context Protocol SDK
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。