Mcp Server Browser

io.github.bytedance由 GitHub 帳號 bytedance 發布v1.0.0更新於 Oct 24, 2026

MCP server for browser use access

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理操作真實瀏覽器:開啟網頁、點擊、填寫表單、讀取文字或 Markdown,並擷取畫面。

可以做什麼
  • 導覽與分頁:開啟網址、上一頁與下一頁、新增、切換與關閉分頁、列出分頁。
  • 頁面互動:點擊、懸停、填寫輸入欄位、選擇選項、按鍵、捲動。
  • 讀取頁面內容:取得文字、Markdown、連結、可點擊元素,並在主控台執行 JavaScript。
  • 擷取輸出:對頁面或元素截圖、視覺模式螢幕擷取與座標點擊、查看下載清單。
  • 以資源形式提供瀏覽器主控台日誌、下載檔案與截圖。
適用情境
適合助理需要實際操作網頁而不只是抓取內容的情境:填寫表單、走完多步驟網站流程、確認頁面實際呈現結果,或保存截圖與下載檔案。也適合在聊天客戶端中驅動網頁檢查。
執行需求
透過 npx 以 stdio 在本機執行 npm 套件 @agent-infra/mcp-server-browser;需要 Node.js 18 或更新版本,以及 VS Code、Cursor、Windsurf、Claude Desktop 等 MCP 客戶端。使用 Chrome、Edge 或 Firefox 瀏覽器,可選 CDP 或 WebSocket 端點、執行檔路徑、代理、使用者資料目錄與視窗大小參數。虛擬顯示需要 DISPLAY;指定連接埠可啟用 SSE 或 Streamable HTTP。
安裝前請注意
助理可在頁面中執行任意 JavaScript 並填寫或送出表單,若使用持久化的使用者資料目錄,可能以使用者已登入的身分操作網站。截圖、下載檔案與瀏覽器主控台日誌會寫入設定的輸出目錄並以資源形式暴露。使用 host 參數綁定所有網路介面或對外開放 HTTP 連接埠,會擴大 localhost 之外的存取範圍。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Server Browser,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Browser Use MCP Server

[NPM Downloads] [smithery badge] [codecov]

[Install MCP Server] [Install in VS Code] [Install in VS Code Insiders]

A fast, lightweight Model Context Protocol (MCP) server that empowers LLMs with browser automation via Puppeteer’s structured accessibility data, featuring optional vision mode for complex visual understanding and flexible, cross-platform configuration.

[圖片]

Key Features

  • ⚡ Fast & lightweight. Utilizes Puppeteer's label index, not pixel-based input and accessibility DOM tree.
  • 👁️ Vision Mode Support. Optional visual understanding capabilities for complex layouts and visual elements when structured data isn't sufficient.
  • 🤖 LLM-optimized. No vision models needed, operates purely on structured data, less context reducing context token usage.
  • 🧩 Flexible Runtime Configuration. Customize viewport size, coordinate system factors, and User-Agent at runtime via HTTP headers.
  • 🌐 Cross-Platform & Extensible. Support for remote and local browsers, the use of a custom browser engine.

Requirements

  • Node.js 18 or newer
  • VS Code, Cursor, Windsurf, Claude Desktop or any other MCP client

Getting started

Local (Stdio)

First, install the Browser MCP server with your client. A typical configuration looks like this:

js
{  "mcpServers": {    "browser": {      "command": "npx",      "args": [        "@agent-infra/mcp-server-browser@latest"      ]    }  }}
Install in VS Code

You can also install the Browser MCP server using the VS Code CLI:

bash
# For VS Codecode --add-mcp '{"name":"browser","command":"npx","args":["@agent-infra/mcp-server-browser@latest"]}'

After installation, the Browser MCP server will be available for use with your GitHub Copilot agent in VS Code.

Install in Cursor

Go to Cursor Settings -> MCP -> Add new MCP Server. Name to your liking, use command type with the command npx @agent-infra/mcp-server-browser. You can also verify config or add command like arguments via clicking Edit.

js
{  "mcpServers": {    "browser": {      "command": "npx",      "args": [        "@agent-infra/mcp-server-browser@latest"      ]    }  }}
Install in Windsurf

Follow Windsuff MCP documentation. Use following configuration:

js
{  "mcpServers": {    "browser": {      "command": "npx",      "args": [        "@agent-infra/mcp-server-browser@latest"      ]    }  }}
Install in Claude Desktop

Follow the MCP install guide, use following configuration:

js
{  "mcpServers": {    "browser": {      "command": "npx",      "args": [        "@agent-infra/mcp-server-browser@latest"      ]    }  }}
Remote (SSE / Streamable HTTP)

At the same time, use --port $your_port arg to start the browser mcp can be converted into SSE and Streamable HTTP Server.

bash
# normal run remote mcp servernpx @agent-infra/mcp-server-browser --port 8089
# run with DISPLAY environment for VNC or other virtual displayDISPLAY=:0 npx @agent-infra/mcp-server-browser --port 8089

You can use one of the two MCP Server remote endpoint:

  • Streamable HTTP(Recommended): http://127.0.0.1::8089/mcp
  • SSE: http://127.0.0.1::8089/sse

And then in MCP client config, set the url to the SSE endpoint:

js
{  "mcpServers": {    "browser": {      "url": "http://127.0.0.1::8089/sse"    }  }}

url to the Streamable HTTP:

js
{  "mcpServers": {    "browser": {      "type": "streamable-http", // If there is MCP Client support      "url": "http://127.0.0.1::8089/mcp"    }  }}
In-memory call

If your MCP Client is developed based on JavaScript / TypeScript, you can directly use in-process calls to avoid requiring your users to install the command-line interface to use Browser MCP.

js
import { Client } from '@modelcontextprotocol/sdk/client/index.js';import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';
// type: module project usageimport { createServer } from '@agent-infra/mcp-server-browser';// commonjs project usage// const { createServer } = await import('@agent-infra/mcp-server-browser')
const client = new Client(  {    name: 'test browser client',    version: '1.0',  },  {    capabilities: {},  },);
const server = createServer();const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
await Promise.all([  client.connect(clientTransport),  server.connect(serverTransport),]);
// list toolsconst result = await client.listTools();console.log(result);
// call toolconst toolResult = await client.callTool({  name: 'browser_navigate',  arguments: {    url: 'https://www.google.com',  },});console.log(toolResult);

Configuration

Browser MCP server supports following arguments. They can be provided in the JSON configuration above, as a part of the "args" list:

> npx @agent-infra/mcp-server-browser@latest -h  -V, --version              output the version number  --browser <browser>        browser or chrome channel to use, possible values: chrome, edge, firefox.  --cdp-endpoint <endpoint>  CDP endpoint to connect to, for example "http://127.0.0.1:9222/json/version"  --ws-endpoint <endpoint>   WebSocket endpoint to connect to, for example "ws://127.0.0.1:9222/devtools/browser/{id}"  --executable-path <path>   path to the browser executable.  --headless                 run browser in headless mode, headed by default  --host <host>              host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.  --port <port>              port to listen on for SSE and HTTP transport.  --proxy-bypass <bypass>    comma-separated domains to bypass proxy, for example ".com,chromium.org,.domain.com"  --proxy-server <proxy>     specify proxy server, for example "http://myproxy:3128" or "socks5://myproxy:8080"  --user-agent <ua string>   specify user agent string  --user-data-dir <path>     path to the user data directory.  --viewport-size <size>     specify browser viewport size in pixels, for example "1280, 720"  --output-dir <path>        path to the directory for output files  --vision                   Run server that uses screenshots (Aria snapshots are used by default)  -h, --help                 display help for command
Runtime Configuration

The browser runtime requires configuration for Viewport Size, Vision Model Coordinate Factors, and User Agent. These can be passed through corresponding HTTP headers:

HeaderDescription
x-viewport-sizeBrowser viewport size, format: width,height separated by comma
x-vision-factorsVision model coordinate system factors, format: x_factor,y_factor separated by comma
x-user-agentUser Agent string, defaults to system User Agent if not specified

Note: Header names are case-insensitive.

Example:

http
x-viewport-size: 1920,1080x-vision-factors: 1.0,1.0x-user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36

Docker

We have unified the deployment of VNC and MCP under a single URL endpoint, The Dockerfile and DockerHub image will be published together! video

API

Tools
Tool NameDescriptionParameters
browser_clickClick an element on the page, before using the tool, use browser_get_clickable_elements to get the index of the element, but not call browser_get_clickable_elements multiple timesindex (number, optional): Index of the element to click
browser_closeClose the browser when the task is done and the browser is not needed anymore
browser_close_tabClose the current tab
browser_evaluateExecute JavaScript in the browser consolescript (string, required): JavaScript code to execute, () => { /* code */ }
browser_form_input_fillFill out an input field, before using the tool, Either 'index' or 'selector' must be providedselector (string, optional): CSS selector for input field, priority use index, if index is not provided, use selector
index (number, optional): Index of the element to fill
value (string, required): Value to fill
clear (boolean, optional): Whether to clear existing text before filling
browser_get_clickable_elementsGet the clickable or hoverable or selectable elements on the current page, don't call this tool multiple times
browser_get_download_listGet the list of downloaded files
browser_get_markdownGet the markdown content of the current page
browser_get_textGet the text content of the current page
browser_go_backGo back to the previous page
browser_go_forwardGo forward to the next page
browser_hoverHover an element on the page, Either 'index' or 'selector' must be providedindex (number, optional): Index of the element to hover
selector (string, optional): CSS selector for element to hover
browser_navigateNavigate to a URLurl (string, required):
browser_new_tabOpen a new taburl (string, required): URL to open in the new tab
browser_press_keyPress a key on the keyboardkey (string, required): Name of the key to press or a character to generate, such as Enter, Tab, Escape, Backspace, Delete, Insert, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, ArrowLeft, ArrowRight, ArrowUp, ArrowDown, PageUp, PageDown, Home, End, ShiftLeft, ShiftRight, ControlLeft, ControlRight, AltLeft, AltRight, MetaLeft, MetaRight, CapsLock, PrintScreen, ScrollLock, Pause, ContextMenu
browser_read_linksGet all links on the current page
browser_screenshotTake a screenshot of the current page or a specific elementname (string, optional): Name for the screenshot
selector (string, optional): CSS selector for element to screenshot
index (number, optional): index of the element to screenshot
width (number, optional): Width in pixels (default: viewport width)
height (number, optional): Height in pixels (default: viewport height)
fullPage (boolean, optional): Full page screenshot (default: false)
highlight (boolean, optional): Highlight the element
browser_scrollScroll the pageamount (number, optional): Pixels to scroll (positive for down, negative for up), if the amount is not provided, scroll to the bottom of the page
browser_selectSelect an element on the page with index, Either 'index' or 'selector' must be providedindex (number, optional): Index of the element to select
selector (string, optional): CSS selector for element to select
value (string, required): Value to select
browser_switch_tabSwitch to a specific tabindex (number, required): Tab index to switch to
browser_tab_listGet the list of tabs
browser_vision_screen_captureTake a screenshot of the current page for vision mode
browser_vision_screen_clickClick left mouse button on the page with vision and snapshot, before calling this tool, you should call browser_vision_screen_capture first only once, fallback to browser_click if failedfactors (array, optional): Vision model coordinate system scaling factors [width_factor, height_factor] for coordinate space normalization. Transformation formula: x = (x_model * screen_width * width_factor) / width_factor y = (y_model * screen_height * height_factor) / height_factor where x_model, y_model are normalized model output coordinates (0-1), screen_width/height are screen dimensions, width_factor/height_factor are quantization factors, If the factors are unknown, leave it blank. Most models do not require this parameter.
x (number, required): X pixel coordinate
y (number, required): Y pixel coordinate
Resources
Resource NameURI PatternDescriptionMIME Type
Browser console logsconsole://logstext/plain
Browser Downloadsdownload://{name}Automatic identification based on file extension
Browser Screenshotsscreenshot://{name}Automatic identification based on file extension

Development

Access http://127.0.0.1:6274/:

bash
npm run dev

Extended CLI Entry

js
#!/usr/bin/env node
const {  BaseLogger,  setConfig,  addMiddleware,} = require('@agent-infra/mcp-server-browser/request-context');
class CustomLogger extends BaseLogger {  info(...args) {    console.log('custom');    console.log(...args);  }}
addMiddleware((req, res, next) => {  console.log('req', req.headers);  next();});
setConfig({  logger: new CustomLogger(),});
// start serverrequire('@agent-infra/mcp-server-browser/index');

來源:packages/agent-infra/mcp-servers/browser/README.md,提交 2ff41a9

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分