@darbotlabs/darbot-browser-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +973 -0
- package/cli.js +18 -0
- package/config.d.ts +128 -0
- package/index.d.ts +28 -0
- package/index.js +19 -0
- package/lib/browserContextFactory.js +227 -0
- package/lib/browserServer.js +151 -0
- package/lib/cdpRelay.js +275 -0
- package/lib/config.js +204 -0
- package/lib/connection.js +84 -0
- package/lib/context.js +291 -0
- package/lib/fileUtils.js +32 -0
- package/lib/httpServer.js +201 -0
- package/lib/index.js +36 -0
- package/lib/javascript.js +49 -0
- package/lib/manualPromise.js +111 -0
- package/lib/package.js +20 -0
- package/lib/pageSnapshot.js +43 -0
- package/lib/program.js +80 -0
- package/lib/resources/resource.js +16 -0
- package/lib/server.js +48 -0
- package/lib/tab.js +123 -0
- package/lib/tools/common.js +68 -0
- package/lib/tools/console.js +44 -0
- package/lib/tools/dialogs.js +52 -0
- package/lib/tools/files.js +51 -0
- package/lib/tools/install.js +57 -0
- package/lib/tools/keyboard.js +46 -0
- package/lib/tools/navigate.js +93 -0
- package/lib/tools/network.js +51 -0
- package/lib/tools/pdf.js +49 -0
- package/lib/tools/profiles.js +271 -0
- package/lib/tools/screenshot.js +77 -0
- package/lib/tools/snapshot.js +204 -0
- package/lib/tools/tabs.js +118 -0
- package/lib/tools/testing.js +60 -0
- package/lib/tools/tool.js +18 -0
- package/lib/tools/utils.js +81 -0
- package/lib/tools/vision.js +189 -0
- package/lib/tools/wait.js +59 -0
- package/lib/tools.js +70 -0
- package/lib/transport.js +133 -0
- package/package.json +67 -0
package/README.md
ADDED
|
@@ -0,0 +1,973 @@
|
|
|
1
|
+
# Darbot Browser MCP
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
**🤖 Your Autonomous Browser Companion - Powered by AI**
|
|
6
|
+
|
|
7
|
+
A Model Context Protocol (MCP) server that provides intelligent browser automation capabilities. This server enables AI models to interact with web pages through structured accessibility snapshots, delivering autonomous browsing without requiring vision models. Optimized for Microsoft Edge with comprehensive work profile support.
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@darbotlabs/darbot-browser-mcp)
|
|
10
|
+
[](https://www.npmjs.com/package/@darbotlabs/darbot-browser-mcp)
|
|
11
|
+
[](https://marketplace.visualstudio.com/items?itemName=darbotlabs.darbot-browser-mcp)
|
|
12
|
+
[](./LICENSE)
|
|
13
|
+
|
|
14
|
+
## ✨ Key Features
|
|
15
|
+
|
|
16
|
+
- **🚀 Fast and lightweight** - Uses accessibility tree, not pixel-based input
|
|
17
|
+
- **🧠 AI-friendly** - No vision models needed, operates purely on structured data
|
|
18
|
+
- **🎯 Deterministic** - Avoids ambiguity common with screenshot-based approaches
|
|
19
|
+
- **🔄 Work Profiles** - Save and restore complete browser sessions
|
|
20
|
+
- **🛠️ 29 Autonomous Tools** - Comprehensive browser automation capabilities
|
|
21
|
+
- **⚡ Multi-Platform** - Available as NPM package, VS Code extension, NuGet package, and browser extension
|
|
22
|
+
|
|
23
|
+
## 📋 Requirements
|
|
24
|
+
- **Node.js** 18 or newer
|
|
25
|
+
- **VS Code, Cursor, Windsurf, Claude Desktop** or any other MCP client
|
|
26
|
+
- **Microsoft Edge** (recommended) or Chrome/Firefox/WebKit
|
|
27
|
+
|
|
28
|
+
## 📦 Installation Options
|
|
29
|
+
|
|
30
|
+
Darbot Browser MCP is available in multiple package formats:
|
|
31
|
+
|
|
32
|
+
### 🔧 NPM Package
|
|
33
|
+
```bash
|
|
34
|
+
# Install globally
|
|
35
|
+
npm install -g @darbotlabs/darbot-browser-mcp
|
|
36
|
+
|
|
37
|
+
# Or use with npx (recommended)
|
|
38
|
+
npx @darbotlabs/darbot-browser-mcp@latest
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 🔌 VS Code Extension
|
|
42
|
+
Install the **"Darbot Browser MCP"** extension from the VS Code marketplace or search for `darbotlabs.darbot-browser-mcp`.
|
|
43
|
+
|
|
44
|
+
[**📥 Install VS Code Extension**](https://marketplace.visualstudio.com/items?itemName=darbotlabs.darbot-browser-mcp)
|
|
45
|
+
|
|
46
|
+
### 📚 NuGet Package (.NET)
|
|
47
|
+
```bash
|
|
48
|
+
# Install for .NET projects
|
|
49
|
+
dotnet add package DarbotLabs.Browser.MCP
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 🌐 Browser Extension
|
|
53
|
+
Install the **Browser MCP Bridge** extension from the Chrome Web Store to share browser tabs with the MCP server.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 🎯 Why Choose Darbot Browser MCP?
|
|
58
|
+
|
|
59
|
+
| Traditional Browser Automation | 🤖 Darbot Browser MCP |
|
|
60
|
+
|--------------------------------|------------------------|
|
|
61
|
+
| ❌ Pixel-based, brittle selectors | ✅ AI-friendly accessibility snapshots |
|
|
62
|
+
| ❌ Requires vision models | ✅ Pure structured data approach |
|
|
63
|
+
| ❌ Complex setup and maintenance | ✅ Simple NPM install, ready in seconds |
|
|
64
|
+
| ❌ Browser-specific code | ✅ Universal MCP protocol |
|
|
65
|
+
| ❌ No session management | ✅ Advanced work profiles |
|
|
66
|
+
|
|
67
|
+
### 🛠️ Complete Autonomous Toolkit (29 Tools)
|
|
68
|
+
|
|
69
|
+
<details>
|
|
70
|
+
<summary><b>🔧 Core Automation</b></summary>
|
|
71
|
+
|
|
72
|
+
- `browser_navigate` - Navigate to any URL
|
|
73
|
+
- `browser_click` - Intelligent element clicking
|
|
74
|
+
- `browser_type` - Smart text input with submit options
|
|
75
|
+
- `browser_snapshot` - AI-optimized accessibility snapshots
|
|
76
|
+
- `browser_wait_for` - Intelligent waiting conditions
|
|
77
|
+
|
|
78
|
+
</details>
|
|
79
|
+
|
|
80
|
+
<details>
|
|
81
|
+
<summary><b>📁 Work Profile Management</b></summary>
|
|
82
|
+
|
|
83
|
+
- `browser_save_profile` - Save complete browser sessions
|
|
84
|
+
- `browser_switch_profile` - Instantly load saved profiles
|
|
85
|
+
- `browser_list_profiles` - Manage all your profiles
|
|
86
|
+
- `browser_delete_profile` - Clean profile management
|
|
87
|
+
|
|
88
|
+
</details>
|
|
89
|
+
|
|
90
|
+
<details>
|
|
91
|
+
<summary><b>🖼️ Media & Resources</b></summary>
|
|
92
|
+
|
|
93
|
+
- `browser_take_screenshot` - High-quality screenshots
|
|
94
|
+
- `browser_pdf_save` - Generate PDFs from pages
|
|
95
|
+
- `browser_file_upload` - Handle file uploads seamlessly
|
|
96
|
+
|
|
97
|
+
</details>
|
|
98
|
+
|
|
99
|
+
<details>
|
|
100
|
+
<summary><b>🗂️ Tab Management</b></summary>
|
|
101
|
+
|
|
102
|
+
- `browser_tab_new` - Open new tabs programmatically
|
|
103
|
+
- `browser_tab_list` - Get all open tabs
|
|
104
|
+
- `browser_tab_select` - Switch between tabs
|
|
105
|
+
- `browser_tab_close` - Clean tab management
|
|
106
|
+
|
|
107
|
+
</details>
|
|
108
|
+
|
|
109
|
+
<details>
|
|
110
|
+
<summary><b>🧪 Testing & Development</b></summary>
|
|
111
|
+
|
|
112
|
+
- `browser_generate_playwright_test` - Auto-generate test code
|
|
113
|
+
- `browser_console_messages` - Debug with console access
|
|
114
|
+
- `browser_network_requests` - Monitor network activity
|
|
115
|
+
|
|
116
|
+
</details>
|
|
117
|
+
|
|
118
|
+
[**📖 View All 29 Tools**](#tools)
|
|
119
|
+
|
|
120
|
+
<!--
|
|
121
|
+
// Generate using:
|
|
122
|
+
node utils/generate-links.js
|
|
123
|
+
-->
|
|
124
|
+
|
|
125
|
+
## 🚀 Getting Started
|
|
126
|
+
|
|
127
|
+
First, install the Browser MCP server with your client. A typical configuration looks like this:
|
|
128
|
+
|
|
129
|
+
```js
|
|
130
|
+
{
|
|
131
|
+
"mcpServers": {
|
|
132
|
+
"browser": {
|
|
133
|
+
"command": "npx",
|
|
134
|
+
"args": [
|
|
135
|
+
"@darbotlabs/darbot-browser-mcp@latest"
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### 📱 Quick Install Buttons
|
|
143
|
+
|
|
144
|
+
[<img src="https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visual-studio-code" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522browser%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540darbotlabs%252Fdarbot-browser-mcp%2540latest%2522%255D%257D) [<img src="https://img.shields.io/badge/VS_Code_Insiders-Install_Server-24bfa5?style=for-the-badge&logo=visual-studio-code" alt="Install in VS Code Insiders">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522browser%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540darbotlabs%252Fdarbot-browser-mcp%2540latest%2522%255D%257D)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
<details><summary><b>Install in VS Code</b></summary>
|
|
148
|
+
|
|
149
|
+
You can also install the Browser MCP server using the VS Code CLI:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# For VS Code
|
|
153
|
+
code --add-mcp '{"name":"browser","command":"npx","args":["@darbotlabs/darbot-browser-mcp@latest"]}'
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
After installation, the Browser MCP server will be available for use with your GitHub Copilot agent in VS Code.
|
|
157
|
+
</details>
|
|
158
|
+
|
|
159
|
+
<details>
|
|
160
|
+
<summary><b>Install in Cursor</b></summary>
|
|
161
|
+
|
|
162
|
+
#### Click the button to install:
|
|
163
|
+
|
|
164
|
+
[](https://cursor.com/install-mcp?name=browser&config=eyJjb21tYW5kIjogIm5weCBAZGFyYm90bGFicy9kYXJib3QtYnJvd3Nlci1tY3BAbGF0ZXN0In0K)
|
|
165
|
+
|
|
166
|
+
#### Or install manually:
|
|
167
|
+
|
|
168
|
+
Go to `Cursor Settings` -> `MCP` -> `Add new MCP Server`. Name to your liking, use `command` type with the command `npx @darbotlabs/darbot-browser-mcp`. You can also verify config or add command like arguments via clicking `Edit`.
|
|
169
|
+
|
|
170
|
+
```js
|
|
171
|
+
{
|
|
172
|
+
"mcpServers": {
|
|
173
|
+
"browser": {
|
|
174
|
+
"command": "npx",
|
|
175
|
+
"args": [
|
|
176
|
+
"@darbotlabs/darbot-browser-mcp@latest"
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
</details>
|
|
183
|
+
|
|
184
|
+
<details>
|
|
185
|
+
<summary><b>Install in Windsurf</b></summary>
|
|
186
|
+
|
|
187
|
+
Follow Windsuff MCP [documentation](https://docs.windsurf.com/windsurf/cascade/mcp). Use following configuration:
|
|
188
|
+
|
|
189
|
+
```js
|
|
190
|
+
{
|
|
191
|
+
"mcpServers": {
|
|
192
|
+
"browser": {
|
|
193
|
+
"command": "npx",
|
|
194
|
+
"args": [
|
|
195
|
+
"@darbotlabs/darbot-browser-mcp@latest"
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
</details>
|
|
202
|
+
|
|
203
|
+
<details>
|
|
204
|
+
<summary><b>Install in Claude Desktop</b></summary>
|
|
205
|
+
|
|
206
|
+
Follow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user), use following configuration:
|
|
207
|
+
|
|
208
|
+
```js
|
|
209
|
+
{
|
|
210
|
+
"mcpServers": {
|
|
211
|
+
"browser": {
|
|
212
|
+
"command": "npx",
|
|
213
|
+
"args": [
|
|
214
|
+
"@darbotlabs/darbot-browser-mcp@latest"
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
</details>
|
|
221
|
+
|
|
222
|
+
<details>
|
|
223
|
+
<summary><b>Install in Claude Code</b></summary>
|
|
224
|
+
|
|
225
|
+
Use the Claude Code CLI to add the Browser MCP server:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
claude mcp add browser npx @darbotlabs/darbot-browser-mcp@latest
|
|
229
|
+
```
|
|
230
|
+
</details>
|
|
231
|
+
|
|
232
|
+
<details>
|
|
233
|
+
<summary><b>Install in Qodo Gen</b></summary>
|
|
234
|
+
|
|
235
|
+
Open [Qodo Gen](https://docs.qodo.ai/qodo-documentation/qodo-gen) chat panel in VSCode or IntelliJ → Connect more tools → + Add new MCP → Paste the following configuration:
|
|
236
|
+
|
|
237
|
+
```js
|
|
238
|
+
{
|
|
239
|
+
"mcpServers": {
|
|
240
|
+
"browser": {
|
|
241
|
+
"command": "npx",
|
|
242
|
+
"args": [
|
|
243
|
+
"@darbotlabs/darbot-browser-mcp@latest"
|
|
244
|
+
]
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Click <code>Save</code>.
|
|
251
|
+
</details>
|
|
252
|
+
|
|
253
|
+
### Configuration
|
|
254
|
+
|
|
255
|
+
Browser MCP server supports following arguments. They can be provided in the JSON configuration above, as a part of the `"args"` list:
|
|
256
|
+
|
|
257
|
+
<!--- Options generated by update-readme.js -->
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
> npx darbot-browser-mcp@latest --help
|
|
261
|
+
--allowed-origins <origins> semicolon-separated list of origins to allow the
|
|
262
|
+
browser to request. Default is to allow all.
|
|
263
|
+
--blocked-origins <origins> semicolon-separated list of origins to block the
|
|
264
|
+
browser from requesting. Blocklist is evaluated
|
|
265
|
+
before allowlist. If used without the allowlist,
|
|
266
|
+
requests not matching the blocklist are still
|
|
267
|
+
allowed.
|
|
268
|
+
--block-service-workers block service workers
|
|
269
|
+
--browser <browser> browser or chrome channel to use, possible
|
|
270
|
+
values: msedge, chrome, firefox, webkit.
|
|
271
|
+
--browser-agent <endpoint> Use browser agent (experimental).
|
|
272
|
+
--caps <caps> comma-separated list of capabilities to enable,
|
|
273
|
+
possible values: tabs, pdf, history, wait, files,
|
|
274
|
+
install. Default is all.
|
|
275
|
+
--cdp-endpoint <endpoint> CDP endpoint to connect to.
|
|
276
|
+
--config <path> path to the configuration file.
|
|
277
|
+
--device <device> device to emulate, for example: "iPhone 15"
|
|
278
|
+
--executable-path <path> path to the browser executable.
|
|
279
|
+
--headless run browser in headless mode, headed by default
|
|
280
|
+
--host <host> host to bind server to. Default is localhost. Use
|
|
281
|
+
0.0.0.0 to bind to all interfaces.
|
|
282
|
+
--ignore-https-errors ignore https errors
|
|
283
|
+
--isolated keep the browser profile in memory, do not save
|
|
284
|
+
it to disk.
|
|
285
|
+
--image-responses <mode> whether to send image responses to the client.
|
|
286
|
+
Can be "allow", "omit", or "auto". Defaults to
|
|
287
|
+
"auto", which sends images if the client can
|
|
288
|
+
display them.
|
|
289
|
+
--no-sandbox disable the sandbox for all process types that
|
|
290
|
+
are normally sandboxed.
|
|
291
|
+
--output-dir <path> path to the directory for output files.
|
|
292
|
+
--port <port> port to listen on for SSE transport.
|
|
293
|
+
--proxy-bypass <bypass> comma-separated domains to bypass proxy, for
|
|
294
|
+
example ".com,chromium.org,.domain.com"
|
|
295
|
+
--proxy-server <proxy> specify proxy server, for example
|
|
296
|
+
"http://myproxy:3128" or "socks5://myproxy:8080"
|
|
297
|
+
--save-trace Whether to save the Playwright Trace of the
|
|
298
|
+
session into the output directory.
|
|
299
|
+
--storage-state <path> path to the storage state file for isolated
|
|
300
|
+
sessions.
|
|
301
|
+
--user-agent <ua string> specify user agent string
|
|
302
|
+
--user-data-dir <path> path to the user data directory. If not
|
|
303
|
+
specified, a temporary directory will be created.
|
|
304
|
+
--viewport-size <size> specify browser viewport size in pixels, for
|
|
305
|
+
example "1280, 720"
|
|
306
|
+
--vision Run server that uses screenshots (Aria snapshots
|
|
307
|
+
are used by default)
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
<!--- End of options generated section -->
|
|
311
|
+
|
|
312
|
+
### User profile
|
|
313
|
+
|
|
314
|
+
You can run Browser MCP with persistent profile like a regular browser (default), or in the isolated contexts for the testing sessions.
|
|
315
|
+
|
|
316
|
+
**Persistent profile**
|
|
317
|
+
|
|
318
|
+
All the logged in information will be stored in the persistent profile, you can delete it between sessions if you'd like to clear the offline state.
|
|
319
|
+
Persistent profile is located at the following locations and you can override it with the `--user-data-dir` argument.
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
# Windows
|
|
323
|
+
%USERPROFILE%\AppData\Local\ms-playwright\mcp-{channel}-profile
|
|
324
|
+
|
|
325
|
+
# macOS
|
|
326
|
+
- ~/Library/Caches/ms-playwright/mcp-{channel}-profile
|
|
327
|
+
|
|
328
|
+
# Linux
|
|
329
|
+
- ~/.cache/ms-playwright/mcp-{channel}-profile
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
**Isolated**
|
|
333
|
+
|
|
334
|
+
In the isolated mode, each session is started in the isolated profile. Every time you ask MCP to close the browser,
|
|
335
|
+
the session is closed and all the storage state for this session is lost. You can provide initial storage state
|
|
336
|
+
to the browser via the config's `contextOptions` or via the `--storage-state` argument. Learn more about the storage
|
|
337
|
+
state [here](https://playwright.dev/docs/auth).
|
|
338
|
+
|
|
339
|
+
```js
|
|
340
|
+
{
|
|
341
|
+
"mcpServers": {
|
|
342
|
+
"browser": {
|
|
343
|
+
"command": "npx",
|
|
344
|
+
"args": [
|
|
345
|
+
"@darbotlabs/darbot-browser-mcp@latest",
|
|
346
|
+
"--isolated",
|
|
347
|
+
"--storage-state={path/to/storage.json}"
|
|
348
|
+
]
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### Configuration file
|
|
355
|
+
|
|
356
|
+
The Browser MCP server can be configured using a JSON configuration file. You can specify the configuration file
|
|
357
|
+
using the `--config` command line option:
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
npx @darbotlabs/darbot-browser-mcp@latest --config path/to/config.json
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
<details>
|
|
364
|
+
<summary>Configuration file schema</summary>
|
|
365
|
+
|
|
366
|
+
```typescript
|
|
367
|
+
{
|
|
368
|
+
// Browser configuration
|
|
369
|
+
browser?: {
|
|
370
|
+
// Browser type to use (chromium, firefox, or webkit)
|
|
371
|
+
browserName?: 'chromium' | 'firefox' | 'webkit';
|
|
372
|
+
|
|
373
|
+
// Keep the browser profile in memory, do not save it to disk.
|
|
374
|
+
isolated?: boolean;
|
|
375
|
+
|
|
376
|
+
// Path to user data directory for browser profile persistence
|
|
377
|
+
userDataDir?: string;
|
|
378
|
+
|
|
379
|
+
// Browser launch options (see Playwright docs)
|
|
380
|
+
// @see https://playwright.dev/docs/api/class-browsertype#browser-type-launch
|
|
381
|
+
launchOptions?: {
|
|
382
|
+
channel?: string; // Browser channel (e.g. 'msedge')
|
|
383
|
+
headless?: boolean; // Run in headless mode
|
|
384
|
+
executablePath?: string; // Path to browser executable
|
|
385
|
+
// ... other Playwright launch options
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
// Browser context options
|
|
389
|
+
// @see https://playwright.dev/docs/api/class-browser#browser-new-context
|
|
390
|
+
contextOptions?: {
|
|
391
|
+
viewport?: { width: number, height: number };
|
|
392
|
+
// ... other Playwright context options
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
// CDP endpoint for connecting to existing browser
|
|
396
|
+
cdpEndpoint?: string;
|
|
397
|
+
|
|
398
|
+
// Remote Playwright server endpoint
|
|
399
|
+
remoteEndpoint?: string;
|
|
400
|
+
},
|
|
401
|
+
|
|
402
|
+
// Server configuration
|
|
403
|
+
server?: {
|
|
404
|
+
port?: number; // Port to listen on
|
|
405
|
+
host?: string; // Host to bind to (default: localhost)
|
|
406
|
+
},
|
|
407
|
+
|
|
408
|
+
// List of enabled capabilities
|
|
409
|
+
capabilities?: Array<
|
|
410
|
+
'core' | // Core browser automation
|
|
411
|
+
'tabs' | // Tab management
|
|
412
|
+
'pdf' | // PDF generation
|
|
413
|
+
'history' | // Browser history
|
|
414
|
+
'wait' | // Wait utilities
|
|
415
|
+
'files' | // File handling
|
|
416
|
+
'install' | // Browser installation
|
|
417
|
+
'testing' // Testing
|
|
418
|
+
>;
|
|
419
|
+
|
|
420
|
+
// Enable vision mode (screenshots instead of accessibility snapshots)
|
|
421
|
+
vision?: boolean;
|
|
422
|
+
|
|
423
|
+
// Directory for output files
|
|
424
|
+
outputDir?: string;
|
|
425
|
+
|
|
426
|
+
// Network configuration
|
|
427
|
+
network?: {
|
|
428
|
+
// List of origins to allow the browser to request. Default is to allow all. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked.
|
|
429
|
+
allowedOrigins?: string[];
|
|
430
|
+
|
|
431
|
+
// List of origins to block the browser to request. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked.
|
|
432
|
+
blockedOrigins?: string[];
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Do not send image responses to the client.
|
|
437
|
+
*/
|
|
438
|
+
noImageResponses?: boolean;
|
|
439
|
+
}
|
|
440
|
+
```
|
|
441
|
+
</details>
|
|
442
|
+
|
|
443
|
+
### Standalone MCP server
|
|
444
|
+
|
|
445
|
+
When running headed browser on system w/o display or from worker processes of the IDEs,
|
|
446
|
+
run the MCP server from environment with the DISPLAY and pass the `--port` flag to enable SSE transport.
|
|
447
|
+
|
|
448
|
+
```bash
|
|
449
|
+
npx @darbotlabs/darbot-browser-mcp@latest --port 8931
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
And then in MCP client config, set the `url` to the SSE endpoint:
|
|
453
|
+
|
|
454
|
+
```js
|
|
455
|
+
{
|
|
456
|
+
"mcpServers": {
|
|
457
|
+
"playwright": {
|
|
458
|
+
"url": "http://localhost:8931/sse"
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
<details>
|
|
465
|
+
<summary><b>Docker</b></summary>
|
|
466
|
+
|
|
467
|
+
**NOTE:** The Docker implementation only supports headless chromium at the moment.
|
|
468
|
+
|
|
469
|
+
```js
|
|
470
|
+
{
|
|
471
|
+
"mcpServers": {
|
|
472
|
+
"playwright": {
|
|
473
|
+
"command": "docker",
|
|
474
|
+
"args": ["run", "-i", "--rm", "--init", "--pull=always", "mcr.microsoft.com/playwright/mcp"]
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
You can build the Docker image yourself.
|
|
481
|
+
|
|
482
|
+
```
|
|
483
|
+
docker build -t mcr.microsoft.com/playwright/mcp .
|
|
484
|
+
```
|
|
485
|
+
</details>
|
|
486
|
+
|
|
487
|
+
<details>
|
|
488
|
+
<summary><b>Programmatic usage</b></summary>
|
|
489
|
+
|
|
490
|
+
```js
|
|
491
|
+
import http from 'http';
|
|
492
|
+
|
|
493
|
+
import { createConnection } from '@darbotlabs/darbot-browser-mcp';
|
|
494
|
+
import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js';
|
|
495
|
+
|
|
496
|
+
http.createServer(async (req, res) => {
|
|
497
|
+
// ...
|
|
498
|
+
|
|
499
|
+
// Creates a headless Browser MCP server with SSE transport
|
|
500
|
+
const connection = await createConnection({ browser: { launchOptions: { headless: true } } });
|
|
501
|
+
const transport = new SSEServerTransport('/messages', res);
|
|
502
|
+
await connection.sever.connect(transport);
|
|
503
|
+
|
|
504
|
+
// ...
|
|
505
|
+
});
|
|
506
|
+
```
|
|
507
|
+
</details>
|
|
508
|
+
|
|
509
|
+
### Tools
|
|
510
|
+
|
|
511
|
+
The tools are available in two modes:
|
|
512
|
+
|
|
513
|
+
1. **Snapshot Mode** (default): Uses accessibility snapshots for better performance and reliability
|
|
514
|
+
2. **Vision Mode**: Uses screenshots for visual-based interactions
|
|
515
|
+
|
|
516
|
+
To use Vision Mode, add the `--vision` flag when starting the server:
|
|
517
|
+
|
|
518
|
+
```js
|
|
519
|
+
{
|
|
520
|
+
"mcpServers": {
|
|
521
|
+
"browser": {
|
|
522
|
+
"command": "npx",
|
|
523
|
+
"args": [
|
|
524
|
+
"@darbotlabs/darbot-browser-mcp@latest",
|
|
525
|
+
"--vision"
|
|
526
|
+
]
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
Vision Mode works best with the computer use models that are able to interact with elements using
|
|
533
|
+
X Y coordinate space, based on the provided screenshot.
|
|
534
|
+
|
|
535
|
+
<!--- Tools generated by update-readme.js -->
|
|
536
|
+
|
|
537
|
+
<details>
|
|
538
|
+
<summary><b>Interactions</b></summary>
|
|
539
|
+
|
|
540
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
541
|
+
|
|
542
|
+
- **browser_snapshot**
|
|
543
|
+
- Title: Page snapshot
|
|
544
|
+
- Description: Capture accessibility snapshot of the current page, this is better than screenshot
|
|
545
|
+
- Parameters: None
|
|
546
|
+
- Read-only: **true**
|
|
547
|
+
|
|
548
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
549
|
+
|
|
550
|
+
- **browser_click**
|
|
551
|
+
- Title: Click
|
|
552
|
+
- Description: Perform click on a web page
|
|
553
|
+
- Parameters:
|
|
554
|
+
- `element` (string): Human-readable element description used to obtain permission to interact with the element
|
|
555
|
+
- `ref` (string): Exact target element reference from the page snapshot
|
|
556
|
+
- Read-only: **false**
|
|
557
|
+
|
|
558
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
559
|
+
|
|
560
|
+
- **browser_drag**
|
|
561
|
+
- Title: Drag mouse
|
|
562
|
+
- Description: Perform drag and drop between two elements
|
|
563
|
+
- Parameters:
|
|
564
|
+
- `startElement` (string): Human-readable source element description used to obtain the permission to interact with the element
|
|
565
|
+
- `startRef` (string): Exact source element reference from the page snapshot
|
|
566
|
+
- `endElement` (string): Human-readable target element description used to obtain the permission to interact with the element
|
|
567
|
+
- `endRef` (string): Exact target element reference from the page snapshot
|
|
568
|
+
- Read-only: **false**
|
|
569
|
+
|
|
570
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
571
|
+
|
|
572
|
+
- **browser_hover**
|
|
573
|
+
- Title: Hover mouse
|
|
574
|
+
- Description: Hover over element on page
|
|
575
|
+
- Parameters:
|
|
576
|
+
- `element` (string): Human-readable element description used to obtain permission to interact with the element
|
|
577
|
+
- `ref` (string): Exact target element reference from the page snapshot
|
|
578
|
+
- Read-only: **true**
|
|
579
|
+
|
|
580
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
581
|
+
|
|
582
|
+
- **browser_type**
|
|
583
|
+
- Title: Type text
|
|
584
|
+
- Description: Type text into editable element
|
|
585
|
+
- Parameters:
|
|
586
|
+
- `element` (string): Human-readable element description used to obtain permission to interact with the element
|
|
587
|
+
- `ref` (string): Exact target element reference from the page snapshot
|
|
588
|
+
- `text` (string): Text to type into the element
|
|
589
|
+
- `submit` (boolean, optional): Whether to submit entered text (press Enter after)
|
|
590
|
+
- `slowly` (boolean, optional): Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.
|
|
591
|
+
- Read-only: **false**
|
|
592
|
+
|
|
593
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
594
|
+
|
|
595
|
+
- **browser_select_option**
|
|
596
|
+
- Title: Select option
|
|
597
|
+
- Description: Select an option in a dropdown
|
|
598
|
+
- Parameters:
|
|
599
|
+
- `element` (string): Human-readable element description used to obtain permission to interact with the element
|
|
600
|
+
- `ref` (string): Exact target element reference from the page snapshot
|
|
601
|
+
- `values` (array): Array of values to select in the dropdown. This can be a single value or multiple values.
|
|
602
|
+
- Read-only: **false**
|
|
603
|
+
|
|
604
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
605
|
+
|
|
606
|
+
- **browser_press_key**
|
|
607
|
+
- Title: Press a key
|
|
608
|
+
- Description: Press a key on the keyboard
|
|
609
|
+
- Parameters:
|
|
610
|
+
- `key` (string): Name of the key to press or a character to generate, such as `ArrowLeft` or `a`
|
|
611
|
+
- Read-only: **false**
|
|
612
|
+
|
|
613
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
614
|
+
|
|
615
|
+
- **browser_wait_for**
|
|
616
|
+
- Title: Wait for
|
|
617
|
+
- Description: Wait for text to appear or disappear or a specified time to pass
|
|
618
|
+
- Parameters:
|
|
619
|
+
- `time` (number, optional): The time to wait in seconds
|
|
620
|
+
- `text` (string, optional): The text to wait for
|
|
621
|
+
- `textGone` (string, optional): The text to wait for to disappear
|
|
622
|
+
- Read-only: **true**
|
|
623
|
+
|
|
624
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
625
|
+
|
|
626
|
+
- **browser_file_upload**
|
|
627
|
+
- Title: Upload files
|
|
628
|
+
- Description: Upload one or multiple files
|
|
629
|
+
- Parameters:
|
|
630
|
+
- `paths` (array): The absolute paths to the files to upload. Can be a single file or multiple files.
|
|
631
|
+
- Read-only: **false**
|
|
632
|
+
|
|
633
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
634
|
+
|
|
635
|
+
- **browser_handle_dialog**
|
|
636
|
+
- Title: Handle a dialog
|
|
637
|
+
- Description: Handle a dialog
|
|
638
|
+
- Parameters:
|
|
639
|
+
- `accept` (boolean): Whether to accept the dialog.
|
|
640
|
+
- `promptText` (string, optional): The text of the prompt in case of a prompt dialog.
|
|
641
|
+
- Read-only: **false**
|
|
642
|
+
|
|
643
|
+
</details>
|
|
644
|
+
|
|
645
|
+
<details>
|
|
646
|
+
<summary><b>Navigation</b></summary>
|
|
647
|
+
|
|
648
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
649
|
+
|
|
650
|
+
- **browser_navigate**
|
|
651
|
+
- Title: Navigate to a URL
|
|
652
|
+
- Description: Navigate to a URL
|
|
653
|
+
- Parameters:
|
|
654
|
+
- `url` (string): The URL to navigate to
|
|
655
|
+
- Read-only: **false**
|
|
656
|
+
|
|
657
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
658
|
+
|
|
659
|
+
- **browser_navigate_back**
|
|
660
|
+
- Title: Go back
|
|
661
|
+
- Description: Go back to the previous page
|
|
662
|
+
- Parameters: None
|
|
663
|
+
- Read-only: **true**
|
|
664
|
+
|
|
665
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
666
|
+
|
|
667
|
+
- **browser_navigate_forward**
|
|
668
|
+
- Title: Go forward
|
|
669
|
+
- Description: Go forward to the next page
|
|
670
|
+
- Parameters: None
|
|
671
|
+
- Read-only: **true**
|
|
672
|
+
|
|
673
|
+
</details>
|
|
674
|
+
|
|
675
|
+
<details>
|
|
676
|
+
<summary><b>Resources</b></summary>
|
|
677
|
+
|
|
678
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
679
|
+
|
|
680
|
+
- **browser_take_screenshot**
|
|
681
|
+
- Title: Take a screenshot
|
|
682
|
+
- Description: Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
|
|
683
|
+
- Parameters:
|
|
684
|
+
- `raw` (boolean, optional): Whether to return without compression (in PNG format). Default is false, which returns a JPEG image.
|
|
685
|
+
- `filename` (string, optional): File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified.
|
|
686
|
+
- `element` (string, optional): Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too.
|
|
687
|
+
- `ref` (string, optional): Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too.
|
|
688
|
+
- Read-only: **true**
|
|
689
|
+
|
|
690
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
691
|
+
|
|
692
|
+
- **browser_pdf_save**
|
|
693
|
+
- Title: Save as PDF
|
|
694
|
+
- Description: Save page as PDF
|
|
695
|
+
- Parameters:
|
|
696
|
+
- `filename` (string, optional): File name to save the pdf to. Defaults to `page-{timestamp}.pdf` if not specified.
|
|
697
|
+
- Read-only: **true**
|
|
698
|
+
|
|
699
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
700
|
+
|
|
701
|
+
- **browser_network_requests**
|
|
702
|
+
- Title: List network requests
|
|
703
|
+
- Description: Returns all network requests since loading the page
|
|
704
|
+
- Parameters: None
|
|
705
|
+
- Read-only: **true**
|
|
706
|
+
|
|
707
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
708
|
+
|
|
709
|
+
- **browser_console_messages**
|
|
710
|
+
- Title: Get console messages
|
|
711
|
+
- Description: Returns all console messages
|
|
712
|
+
- Parameters: None
|
|
713
|
+
- Read-only: **true**
|
|
714
|
+
|
|
715
|
+
</details>
|
|
716
|
+
|
|
717
|
+
<details>
|
|
718
|
+
<summary><b>Utilities</b></summary>
|
|
719
|
+
|
|
720
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
721
|
+
|
|
722
|
+
- **browser_install**
|
|
723
|
+
- Title: Install the browser specified in the config
|
|
724
|
+
- Description: Install the browser specified in the config. Call this if you get an error about the browser not being installed.
|
|
725
|
+
- Parameters: None
|
|
726
|
+
- Read-only: **false**
|
|
727
|
+
|
|
728
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
729
|
+
|
|
730
|
+
- **browser_close**
|
|
731
|
+
- Title: Close browser
|
|
732
|
+
- Description: Close the page
|
|
733
|
+
- Parameters: None
|
|
734
|
+
- Read-only: **true**
|
|
735
|
+
|
|
736
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
737
|
+
|
|
738
|
+
- **browser_resize**
|
|
739
|
+
- Title: Resize browser window
|
|
740
|
+
- Description: Resize the browser window
|
|
741
|
+
- Parameters:
|
|
742
|
+
- `width` (number): Width of the browser window
|
|
743
|
+
- `height` (number): Height of the browser window
|
|
744
|
+
- Read-only: **true**
|
|
745
|
+
|
|
746
|
+
</details>
|
|
747
|
+
|
|
748
|
+
<details>
|
|
749
|
+
<summary><b>Tabs</b></summary>
|
|
750
|
+
|
|
751
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
752
|
+
|
|
753
|
+
- **browser_tab_list**
|
|
754
|
+
- Title: List tabs
|
|
755
|
+
- Description: List browser tabs
|
|
756
|
+
- Parameters: None
|
|
757
|
+
- Read-only: **true**
|
|
758
|
+
|
|
759
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
760
|
+
|
|
761
|
+
- **browser_tab_new**
|
|
762
|
+
- Title: Open a new tab
|
|
763
|
+
- Description: Open a new tab
|
|
764
|
+
- Parameters:
|
|
765
|
+
- `url` (string, optional): The URL to navigate to in the new tab. If not provided, the new tab will be blank.
|
|
766
|
+
- Read-only: **true**
|
|
767
|
+
|
|
768
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
769
|
+
|
|
770
|
+
- **browser_tab_select**
|
|
771
|
+
- Title: Select a tab
|
|
772
|
+
- Description: Select a tab by index
|
|
773
|
+
- Parameters:
|
|
774
|
+
- `index` (number): The index of the tab to select
|
|
775
|
+
- Read-only: **true**
|
|
776
|
+
|
|
777
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
778
|
+
|
|
779
|
+
- **browser_tab_close**
|
|
780
|
+
- Title: Close a tab
|
|
781
|
+
- Description: Close a tab
|
|
782
|
+
- Parameters:
|
|
783
|
+
- `index` (number, optional): The index of the tab to close. Closes current tab if not provided.
|
|
784
|
+
- Read-only: **false**
|
|
785
|
+
|
|
786
|
+
</details>
|
|
787
|
+
|
|
788
|
+
<details>
|
|
789
|
+
<summary><b>Work Profiles</b></summary>
|
|
790
|
+
|
|
791
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
792
|
+
|
|
793
|
+
- **browser_save_profile**
|
|
794
|
+
- Title: Save Work Profile
|
|
795
|
+
- Description: Save the current browser state as a work profile
|
|
796
|
+
- Parameters:
|
|
797
|
+
- `name` (string): Name for the work profile
|
|
798
|
+
- `description` (string, optional): Optional description for the work profile
|
|
799
|
+
- Read-only: **false**
|
|
800
|
+
|
|
801
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
802
|
+
|
|
803
|
+
- **browser_switch_profile**
|
|
804
|
+
- Title: Switch Work Profile
|
|
805
|
+
- Description: Switch to a saved work profile
|
|
806
|
+
- Parameters:
|
|
807
|
+
- `name` (string): Name of the work profile to switch to
|
|
808
|
+
- Read-only: **false**
|
|
809
|
+
|
|
810
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
811
|
+
|
|
812
|
+
- **browser_list_profiles**
|
|
813
|
+
- Title: List Work Profiles
|
|
814
|
+
- Description: List all saved work profiles
|
|
815
|
+
- Parameters: None
|
|
816
|
+
- Read-only: **true**
|
|
817
|
+
|
|
818
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
819
|
+
|
|
820
|
+
- **browser_delete_profile**
|
|
821
|
+
- Title: Delete Work Profile
|
|
822
|
+
- Description: Delete a saved work profile
|
|
823
|
+
- Parameters:
|
|
824
|
+
- `name` (string): Name of the work profile to delete
|
|
825
|
+
- Read-only: **false**
|
|
826
|
+
|
|
827
|
+
</details>
|
|
828
|
+
|
|
829
|
+
<details>
|
|
830
|
+
<summary><b>Testing</b></summary>
|
|
831
|
+
|
|
832
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
833
|
+
|
|
834
|
+
- **browser_generate_playwright_test**
|
|
835
|
+
- Title: Generate a Playwright test
|
|
836
|
+
- Description: Generate a Playwright test for given scenario
|
|
837
|
+
- Parameters:
|
|
838
|
+
- `name` (string): The name of the test
|
|
839
|
+
- `description` (string): The description of the test
|
|
840
|
+
- `steps` (array): The steps of the test
|
|
841
|
+
- Read-only: **true**
|
|
842
|
+
|
|
843
|
+
</details>
|
|
844
|
+
|
|
845
|
+
<details>
|
|
846
|
+
<summary><b>Vision mode</b></summary>
|
|
847
|
+
|
|
848
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
849
|
+
|
|
850
|
+
- **browser_screen_capture**
|
|
851
|
+
- Title: Take a screenshot
|
|
852
|
+
- Description: Take a screenshot of the current page
|
|
853
|
+
- Parameters: None
|
|
854
|
+
- Read-only: **true**
|
|
855
|
+
|
|
856
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
857
|
+
|
|
858
|
+
- **browser_screen_move_mouse**
|
|
859
|
+
- Title: Move mouse
|
|
860
|
+
- Description: Move mouse to a given position
|
|
861
|
+
- Parameters:
|
|
862
|
+
- `element` (string): Human-readable element description used to obtain permission to interact with the element
|
|
863
|
+
- `x` (number): X coordinate
|
|
864
|
+
- `y` (number): Y coordinate
|
|
865
|
+
- Read-only: **true**
|
|
866
|
+
|
|
867
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
868
|
+
|
|
869
|
+
- **browser_screen_click**
|
|
870
|
+
- Title: Click
|
|
871
|
+
- Description: Click left mouse button
|
|
872
|
+
- Parameters:
|
|
873
|
+
- `element` (string): Human-readable element description used to obtain permission to interact with the element
|
|
874
|
+
- `x` (number): X coordinate
|
|
875
|
+
- `y` (number): Y coordinate
|
|
876
|
+
- Read-only: **false**
|
|
877
|
+
|
|
878
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
879
|
+
|
|
880
|
+
- **browser_screen_drag**
|
|
881
|
+
- Title: Drag mouse
|
|
882
|
+
- Description: Drag left mouse button
|
|
883
|
+
- Parameters:
|
|
884
|
+
- `element` (string): Human-readable element description used to obtain permission to interact with the element
|
|
885
|
+
- `startX` (number): Start X coordinate
|
|
886
|
+
- `startY` (number): Start Y coordinate
|
|
887
|
+
- `endX` (number): End X coordinate
|
|
888
|
+
- `endY` (number): End Y coordinate
|
|
889
|
+
- Read-only: **false**
|
|
890
|
+
|
|
891
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
892
|
+
|
|
893
|
+
- **browser_screen_type**
|
|
894
|
+
- Title: Type text
|
|
895
|
+
- Description: Type text
|
|
896
|
+
- Parameters:
|
|
897
|
+
- `text` (string): Text to type into the element
|
|
898
|
+
- `submit` (boolean, optional): Whether to submit entered text (press Enter after)
|
|
899
|
+
- Read-only: **false**
|
|
900
|
+
|
|
901
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
902
|
+
|
|
903
|
+
- **browser_press_key**
|
|
904
|
+
- Title: Press a key
|
|
905
|
+
- Description: Press a key on the keyboard
|
|
906
|
+
- Parameters:
|
|
907
|
+
- `key` (string): Name of the key to press or a character to generate, such as `ArrowLeft` or `a`
|
|
908
|
+
- Read-only: **false**
|
|
909
|
+
|
|
910
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
911
|
+
|
|
912
|
+
- **browser_wait_for**
|
|
913
|
+
- Title: Wait for
|
|
914
|
+
- Description: Wait for text to appear or disappear or a specified time to pass
|
|
915
|
+
- Parameters:
|
|
916
|
+
- `time` (number, optional): The time to wait in seconds
|
|
917
|
+
- `text` (string, optional): The text to wait for
|
|
918
|
+
- `textGone` (string, optional): The text to wait for to disappear
|
|
919
|
+
- Read-only: **true**
|
|
920
|
+
|
|
921
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
922
|
+
|
|
923
|
+
- **browser_file_upload**
|
|
924
|
+
- Title: Upload files
|
|
925
|
+
- Description: Upload one or multiple files
|
|
926
|
+
- Parameters:
|
|
927
|
+
- `paths` (array): The absolute paths to the files to upload. Can be a single file or multiple files.
|
|
928
|
+
- Read-only: **false**
|
|
929
|
+
|
|
930
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
931
|
+
|
|
932
|
+
- **browser_handle_dialog**
|
|
933
|
+
- Title: Handle a dialog
|
|
934
|
+
- Description: Handle a dialog
|
|
935
|
+
- Parameters:
|
|
936
|
+
- `accept` (boolean): Whether to accept the dialog.
|
|
937
|
+
- `promptText` (string, optional): The text of the prompt in case of a prompt dialog.
|
|
938
|
+
- Read-only: **false**
|
|
939
|
+
|
|
940
|
+
</details>
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
<!--- End of tools generated section -->
|
|
944
|
+
|
|
945
|
+
## Package Formats
|
|
946
|
+
|
|
947
|
+
### NPM Package
|
|
948
|
+
- **Name**: `@darbotlabs/darbot-browser-mcp`
|
|
949
|
+
- **Installation**: `npm install -g @darbotlabs/darbot-browser-mcp`
|
|
950
|
+
- **Usage**: `npx @darbotlabs/darbot-browser-mcp@latest`
|
|
951
|
+
|
|
952
|
+
### VS Code Extension
|
|
953
|
+
- **Name**: Darbot Browser MCP
|
|
954
|
+
- **Publisher**: darbotlabs
|
|
955
|
+
- **Installation**: Search for "Darbot Browser MCP" in VS Code Extensions marketplace
|
|
956
|
+
- **Features**: Start/stop MCP server, status monitoring, configuration management
|
|
957
|
+
|
|
958
|
+
### NuGet Package (.NET)
|
|
959
|
+
- **Name**: `DarbotLabs.Browser.MCP`
|
|
960
|
+
- **Installation**: `dotnet add package DarbotLabs.Browser.MCP`
|
|
961
|
+
- **Usage**: Host the Browser MCP server in .NET applications
|
|
962
|
+
|
|
963
|
+
### Browser Extension
|
|
964
|
+
- **Name**: Browser MCP Bridge
|
|
965
|
+
- **Installation**: Available in Chrome Web Store (coming soon)
|
|
966
|
+
- **Features**: Share browser tabs with MCP server via CDP bridge
|
|
967
|
+
|
|
968
|
+
## Repository Structure
|
|
969
|
+
- `/vscode-extension/` - VS Code extension source
|
|
970
|
+
- `/dotnet/` - .NET NuGet package source
|
|
971
|
+
- `/extension/` - Browser extension source
|
|
972
|
+
- `/src/` - Main MCP server source code
|
|
973
|
+
- `/tests/` - Test suite
|