
Browser
io.github.cherchyk由 GitHub 账号 cherchyk 发布v0.2.1更新于 Oct 24, 2026
MCP server for loading authenticated web pages using Chrome DevTools Protocol
概览
一个本地 MCP 服务器,驱动你自己的 Chrome、Edge 或 Brave 浏览器,让助手加载、登录、操作网页并提取内容。
- 可以做什么
- 在你真实的浏览器会话中加载页面,包括需要登录、SSO、验证码防护和重度 JavaScript 渲染的站点,默认返回精简后的 HTML,并可设置额外等待时间。按 CSS 选择器或可见文本点击元素,一次调用填写一个或多个表单字段。在已加载页面中执行 JavaScript,用于提取结构化数据或触发界面操作。无需重新加载即可重新读取当前 DOM,按方向、元素或坐标滚动,并截取视口或整页截图。关闭某域名的标签页以清除会话状态或释放内存。
- 适用场景
- 适合助手需要访问登录后、企业 SSO、反爬保护或依赖大量前端渲染的页面,这些是普通 HTTP 抓取无法到达的。也适合填表和点击流程,复用现有浏览器会话可免去重复登录。
- 运行要求
- 以 stdio 在本地运行,通常通过 npx 启动,因此需要 Node.js 18 或更高版本。需要安装 Chrome、Edge 或 Brave。可选环境变量 CHROME_PATH、CHROME_USER_DATA_DIR 和 CHROME_REMOTE_DEBUG_PORT 用于指定浏览器路径、配置目录和 DevTools 端口。未声明需要 API 密钥或账号。
安装
在 SourceWeft 中
- 打开 控制台中的 Browser,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
✅ MCPBrowser (MCP Browser)
[VS Code Marketplace] [Open VSX] [npm version] [Claude Desktop] [License: MIT]
⚠️ Security Notice: MCPBrowser extracts webpage content and provides it to your AI agent (e.g., GitHub Copilot, Claude, Kiro, Antigravity), which then sends it to the LLM provider it uses (e.g., Anthropic, OpenAI, GitHub) for processing. Make sure you trust both your agent and the LLM provider — especially when accessing pages with sensitive or private data. MCPBrowser combines private data access, untrusted content exposure, and external communication (the MCP "lethal trifecta") — all tool annotations accurately declare these risks so MCP clients can enforce appropriate safety controls. See MCPBrowser/docs/MCP_COMPLIANCE.md for details.
💡 Why MCPBrowser over Puppeteer/Playwright MCP servers? Puppeteer and Playwright are browser automation libraries — their MCP servers give agents raw, low-level browser commands. MCPBrowser uses Puppeteer under the hood and was built specifically for AI agents, adding an intelligence layer that handles the hard parts automatically.
The agent gets clean HTML (90% smaller), automatic SPA detection (React, Vue, Angular), authentication flow handling (SSO, redirects, multi-step login), form discovery with multi-field filling, structured responses with next-step guidance, domain-based tab reuse, and instant DOM re-extraction without page reloads. Each MCPBrowser tool call replaces 5-8 raw browser automation calls — a typical 4-step workflow in MCPBrowser would take 20+ calls with Puppeteer/Playwright MCP, saving tokens and making the agent significantly faster. See full comparison below.
MCPBrowser is an MCP browser server that gives AI assistants the ability to browse web pages using a real Chrome, Edge, or Brave browser. This browser-based MCP server lets AI assistants (Claude, Copilot, Kiro, Antigravity) access any website — especially those protected by authentication, CAPTCHAs, anti-bot restrictions, or requiring JavaScript rendering. Uses your real browser session for web automation, so you log in once, and your AI can navigate, click buttons, fill forms, and extract content from sites that block automated requests.
Built on the Model Context Protocol (MCP), this web browser MCP server works seamlessly with Claude Desktop, Claude Code (CLI), GitHub Copilot, Kiro, Antigravity, and any MCP-compatible AI assistant. It handles corporate SSO, CAPTCHAs, Cloudflare protection, SPAs, dashboards, and any site that blocks automated requests. Your AI gets the same browser access you have — no special APIs, no headless browser detection, just your authenticated browser session.
Example workflow for AI assistant to use MCPBrowser
Contents
- Why MCPBrowser over Puppeteer/Playwright MCP servers?
- Requirements
- Installation
- MCP Tools
- CLI Mode
- Configuration
- Troubleshooting
- For Developers
- Links
- License
Requirements
- Chrome, Edge, or Brave browser
- Node.js 18+ (includes npm)
Note: Node.js must be installed on your system. The VS Code extension and npm package both require Node.js to run the MCP server. Download from nodejs.org if not already installed.
Why MCPBrowser over Puppeteer/Playwright MCP servers?
Puppeteer and Playwright are browser automation libraries — their MCP servers expose low-level browser commands and the agent has to handle SPAs, auth flows, messy HTML, and edge cases on its own. MCPBrowser was built specifically for AI agents. It uses Puppeteer under the hood and adds an intelligence layer so the agent can focus on the task instead of fighting the browser.
Installation
Getting started
First, install MCPBrowser with your MCP client.
Standard config works in most tools:
[Install in VS Code] [Install in VS Code Insiders]
Amp
Add via the Amp VS Code extension settings screen or by updating your settings.json file:
Amp CLI Setup:
Claude Code
Use the Claude Code CLI to add the MCPBrowser MCP server:
Verify it's working:
You should see:
Claude Desktop
Add to your config file (create it if it doesn't exist):
Windows: %APPDATA%\Claude\claude_desktop_config.json (e.g., C:\Users\<username>\AppData\Roaming\Claude\claude_desktop_config.json)
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Restart Claude Desktop after saving.
Cline
Follow the instruction in the section Configuring MCP Servers.
Add the following to your cline_mcp_settings.json file:
Codex
Use the Codex CLI to add the MCPBrowser MCP server:
Alternatively, create or edit the configuration file ~/.codex/config.toml and add:
For more information, see the Codex MCP documentation.
Copilot CLI
Use the Copilot CLI to interactively add the MCPBrowser MCP server:
When prompted, enter the following values:
Alternatively, create or edit the configuration file ~/.copilot/mcp-config.json and add:
For more information, see the Copilot CLI documentation.
Cursor
Or install manually:
Go to Cursor Settings -> MCP -> Add new MCP Server. Name to your liking, use command type with the command npx -y mcpbrowser@latest. You can also verify config or add command like arguments via clicking Edit.
Factory
Use the Factory CLI to add the MCPBrowser MCP server:
Alternatively, type /mcp within Factory droid to open an interactive UI for managing MCP servers.
For more information, see the Factory MCP documentation.
Gemini CLI
Follow the MCP install guide, use the standard config above.
Goose
Or install manually:
Go to Advanced settings -> Extensions -> Add custom extension. Name to your liking, use type STDIO, and set the command to npx -y mcpbrowser@latest. Click "Add Extension".
Kiro
Follow the MCP Servers documentation. For example in .kiro/settings/mcp.json:
LM Studio
[Add MCP Server mcpbrowser to LM Studio]
Or install manually:
Go to Program in the right sidebar -> Install -> Edit mcp.json. Use the standard config above.
opencode
Follow the MCP Servers documentation. For example in ~/.config/opencode/opencode.json:
OpenClaw
OpenClaw is a personal AI assistant that runs on your devices. Add MCPBrowser using the CLI:
Verify it's working:
For more information, see the OpenClaw MCP documentation.
Qodo Gen
Open Qodo Gen chat panel in VSCode or IntelliJ → Connect more tools → + Add new MCP → Paste the standard config above.
Click Save.
VS Code (GitHub Copilot)
[Install in VS Code] [Install in VS Code Insiders]
Or install manually:
Follow the MCP install guide, use the standard config above. You can also install the MCPBrowser MCP server using the VS Code CLI:
After installation, the MCPBrowser MCP server will be available for use with your AI agent in VS Code.
VS Code Extension
Install from VS Code Marketplace or Open VSX Registry, or run:
The extension automatically installs and configures everything for your AI agent (GitHub Copilot, Kiro Agent, Antigravity Agent). Also works with VSCodium and other Open VSX-compatible editors.
Warp
Go to Settings -> AI -> Manage MCP Servers -> + Add to add an MCP Server. Use the standard config above.
Alternatively, use the slash command /add-mcp in the Warp prompt and paste the standard config from above.
Windsurf
Follow Windsurf MCP documentation. Use the standard config above.
MCP Tools
browser_fetch_webpage
Fetches web pages using your Chrome/Edge/Brave browser. Handles authentication, CAPTCHA, SSO, anti-bot protection, and JavaScript-heavy sites. Opens the URL in a browser tab (reuses existing tab for same domain) and waits for the page to fully load before returning content. Automatically detects SPAs (React, Vue, Angular) and waits for JavaScript to render content.
Parameters:
url(string, required) - The URL to fetchremoveUnnecessaryHTML(boolean, optional, default:true) - Remove unnecessary HTML for size reduction by ~90%postLoadWait(number, optional, default:0) - Additional milliseconds to wait after page load before extracting HTML. Use for pages that need extra time to render.
Examples:
browser_execute_javascript
Executes a JavaScript snippet in the active page context and returns the result with metadata (execution time, truncation flag, URL-change detection). Use for structured data extraction (e.g., inbox rows) or JS-driven UI actions that are unreliable via protocol clicks.
⚠️ Note: Page must be already loaded via browser_fetch_webpage first.
Parameters:
url(string, required) - The URL of the page (must match a previously fetched page)script(string, required) - JavaScript source to execute in page contexttimeoutMs(number, optional, default:30000, max:60000) - Execution timeoutreturnType(string, optional, default:json) -json|text|void
Returns: Serialized result (outerHTML for DOM nodes), type, executionTimeMs, truncated, urlChanged, currentUrl, and structured error on failure.
Examples:
browser_click_element
Clicks on any clickable element (buttons, links, divs with onclick handlers, etc.). Can target by CSS selector or visible text content. Automatically scrolls element into view and waits for page stability after clicking.
⚠️ Note: Page must be already loaded via browser_fetch_webpage first.
Parameters:
url(string, required) - The URL of the page (must match a previously fetched page)selector(string, optional) - CSS selector for the element (e.g.,#submit-btn,.login-button)text(string, optional) - Text content to search for if selector not provided (e.g., "Sign In", "Submit")returnHtml(boolean, optional, default:true) - Whether to wait for stability and return HTML after clicking. Set tofalsefor fast form interactions (checkboxes, radio buttons)removeUnnecessaryHTML(boolean, optional, default:true) - Remove unnecessary HTML for size reduction. Only used whenreturnHtmlistruepostClickWait(number, optional, default:1000) - Milliseconds to wait after click for SPAs to render dynamic contentwaitForElementTimeout(number, optional, default:1000) - Maximum time to wait for element in milliseconds
Examples:
Fallback behavior: If the native click times out after locating the element, MCPBrowser automatically retries with a JavaScript-based click. The response includes fallbackUsed, nativeAttempt, and fallbackAttempt metadata. If both attempts fail, the response lists both errors so you can choose another strategy.
browser_type_text
Types text into one or more input fields in a single call. Supports filling entire forms at once for efficient automation. Automatically clears existing text by default.
⚠️ Note: Page must be already loaded via browser_fetch_webpage first.
Parameters:
url(string, required) - The URL of the page (must match a previously fetched page)fields(array, required) - Array of fields to fill. Each field object contains:selector(string, required) - CSS selector for the input element (e.g.,#username,input[name="email"])text(string, required) - Text to type into the fieldclear(boolean, optional, default:true) - Whether to clear existing text firstwaitForElementTimeout(number, optional, default:5000) - Maximum time to wait for element in milliseconds
returnHtml(boolean, optional, default:true) - Whether to wait for stability and return HTML after typingremoveUnnecessaryHTML(boolean, optional, default:true) - Remove unnecessary HTML for size reduction. Only used whenreturnHtmlistruepostTypeWait(number, optional, default:1000) - Milliseconds to wait after typing for SPAs to render dynamic content
Examples:
Error handling: If a field fails, the response indicates:
- Which field number failed (e.g., "Failed on field 2 of 3")
- Which fields were successfully filled
- Clear guidance to NOT re-type already filled fields
browser_get_current_html
Gets the current HTML from an already-loaded page WITHOUT navigating or reloading. Much faster than browser_fetch_webpage since it only extracts the current DOM state. Use this after interactions (click, type) to get the updated page content efficiently.
⚠️ Note: Page must be already loaded via browser_fetch_webpage first.
Parameters:
url(string, required) - The URL of the page (must match a previously fetched page)removeUnnecessaryHTML(boolean, optional, default:true) - Remove unnecessary HTML for size reduction by ~90%
Examples:
Performance comparison:
browser_fetch_webpage: 2-5 seconds (full page reload)browser_get_current_html: 0.1-0.3 seconds (just extracts HTML) ✅
browser_scroll_page
Scrolls within an already-loaded page. Use before browser_take_screenshot to capture different parts of the page, or to bring elements into view before interaction. Supports multiple scroll modes:
- By direction: Scroll up/down/left/right by pixel amount
- To element: Scroll until a specific element is visible
- To position: Scroll to absolute coordinates
⚠️ Note: Page must be already loaded via browser_fetch_webpage first.
Parameters:
url(string, required) - The URL of the page (must match a previously fetched page)direction(string, optional) - Direction to scroll:up,down,left,right. Use withamount.amount(number, optional, default:500) - Pixels to scroll in the specified direction (~half a viewport)selector(string, optional) - CSS selector of element to scroll into view. Ignores direction/amount.x(number, optional) - Absolute horizontal scroll position. Use withy.y(number, optional) - Absolute vertical scroll position. Use withx.
Examples:
Returns: Current scroll position, page dimensions, and viewport size — useful for understanding where you are on the page.
browser_take_screenshot
Takes a screenshot of an already-loaded page for visual analysis. Useful when HTML parsing is insufficient — for example, pages with charts, images, complex layouts, popups, or visual content that's hard to understand from HTML alone. Returns a PNG image.
⚠️ Note: Page must be already loaded via browser_fetch_webpage first.
Parameters:
url(string, required) - The URL of the page (must match a previously fetched page)fullPage(boolean, optional, default:false) - Capture the full scrollable page instead of just the viewport
Examples:
Use cases:
- Visualize page layout when HTML is hard to parse
- Capture charts, graphs, or data visualizations
- Debug popups, modals, or overlays
- Understand visual feedback (highlights, animations)
- See what's blocking an element click
browser_close_tab
Closes the browser tab for the given URL's hostname. Removes the page from the tab pool and forces a fresh session on the next visit to that hostname. Useful for clearing authentication state, managing memory, or starting fresh with a domain.
⚠️ Note: Uses exact hostname match (www.example.com and example.com are treated as different tabs).
Parameters:
url(string, required) - The URL whose hostname tab should be closed
Examples:
Use cases:
- Clear authentication/session state
- Free up browser memory
- Reset to fresh state before new login
CLI Mode
MCPBrowser can also be used as a standalone command-line tool, making it easy to use from shell scripts, CI/CD pipelines, or AI agents that work through shell commands (like GitHub Copilot CLI).
CLI vs MCP mode: When run without arguments, MCPBrowser starts as an MCP server (stdin/stdout JSON-RPC). When run with a subcommand, it executes the command and exits — no MCP protocol needed.
Configuration (Optional)
Environment variables for advanced setup:
Troubleshooting
Browser doesn't open?
- Make sure Chrome, Edge, or Brave is installed
- Try setting
CHROME_PATHexplicitly
Can't connect to browser?
- Close all Chrome instances and try again
- Check if port 9222 is in use
Authentication not preserved?
- Keep the browser tab open (default behavior)
- Use the same domain for related requests
E401 error with npx / private npm registry?
If your project has a .npmrc that points to a private registry (e.g., Azure Artifacts, GitHub Packages, Artifactory), npx will try to fetch mcpbrowser from that registry instead of npmjs.org and fail with E401.
Fix: Add npm_config_registry to the env block in your MCP config:
Alternative: Install globally to skip npx entirely:
Then use "command": "mcpbrowser" with no args in your MCP config.
For Developers
Clone and setup:
Run tests:
Build and format both projects:
Links
License
MIT
来源:README.md,提交 9a80589
工具
0版本历史
1- v0.2.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分