mcp-browser-dev-tools 0.0.1-beta.2 → 0.0.1-beta.3

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/README.md CHANGED
@@ -10,7 +10,8 @@ It is designed for a local trust boundary:
10
10
 
11
11
  - A stdio MCP server for local desktop and terminal clients
12
12
  - Browser discovery and attach/detach for Chromium-family browsers and Firefox
13
- - Read-oriented tools for DOM inspection, element lookup, console messages, network requests, screenshots, tab listing, and buffered events
13
+ - Inspection tools for DOM lookup, richer element details, console messages, network requests, screenshots, tab listing, and buffered events
14
+ - Page interaction tools for navigation, reload, click, hover, type, select, key presses, scroll, and viewport overrides
14
15
  - Optional JavaScript evaluation behind an explicit environment flag
15
16
  - Helper commands to check browser connectivity, launch a debug-enabled browser, and relay CDP traffic across a local machine boundary
16
17
 
@@ -134,6 +135,16 @@ The `relay` command defaults to `127.0.0.1:9223 -> 127.0.0.1:9222`. Non-loopback
134
135
  - `list_sessions`
135
136
  - `attach_tab`
136
137
  - `detach_tab`
138
+ - `get_page_state`
139
+ - `navigate`
140
+ - `reload`
141
+ - `click`
142
+ - `hover`
143
+ - `type`
144
+ - `select`
145
+ - `press_key`
146
+ - `scroll`
147
+ - `set_viewport`
137
148
  - `get_console_messages`
138
149
  - `get_network_requests`
139
150
  - `get_document`
@@ -145,6 +156,21 @@ The `relay` command defaults to `127.0.0.1:9223 -> 127.0.0.1:9222`. Non-loopback
145
156
 
146
157
  For tools that take `sessionId`, call `attach_tab` first and reuse the returned session.
147
158
 
159
+ ### Locator Syntax
160
+
161
+ Interaction and inspection tools accept these locator forms:
162
+
163
+ - CSS selectors such as `#app button.primary` or `css=.modal button`
164
+ - visible-text lookup such as `text=プラン比較`
165
+ - role plus accessible name such as `role=button[name="プラン比較"]`
166
+ - accessible-name lookup such as `name=プラン比較`
167
+
168
+ `inspect_element` returns layout and accessibility-focused metadata including bounding box, visibility flags, interactivity flags, accessible name, inferred role, and a subset of computed styles. Invalid CSS selectors now return an explicit locator error instead of a generic DOM failure.
169
+
170
+ ### Screenshot Output
171
+
172
+ `take_screenshot` returns base64 image data plus metadata such as `mimeType`, `byteLength`, and `scope`. Pass `selector` to capture a single element instead of the full page.
173
+
148
174
  ## Browser Notes
149
175
 
150
176
  - Chromium uses the standard DevTools endpoints at `/json/version` and `/json/list`
@@ -152,6 +178,12 @@ For tools that take `sessionId`, call `attach_tab` first and reuse the returned
152
178
  - In WSL, Linux browser executables are preferred before Windows fallback paths
153
179
  - For Windows Chrome + WSL, prefer the `relay` command over changing Chrome's remote debugging bind
154
180
 
181
+ ## Debugging Notes
182
+
183
+ - `attach_tab` now seeds network history from the Performance API so already-loaded pages still show useful requests
184
+ - console buffers include source URL, line and column where the browser reports them, plus stack frames when available
185
+ - `get_page_state` reports the current URL, title, viewport, and scroll position without enabling `evaluate_js`
186
+
155
187
  ## Safety Defaults
156
188
 
157
189
  - The broker only allows loopback browser endpoints unless you opt in
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-browser-dev-tools",
3
- "version": "0.0.1-beta.2",
3
+ "version": "0.0.1-beta.3",
4
4
  "description": "Local MCP server for Chromium DevTools Protocol and Firefox WebDriver BiDi",
5
5
  "author": "Hinaser <rindo.hinase@gmail.com>",
6
6
  "type": "module",
@@ -31,6 +31,7 @@
31
31
  "src/index.mjs",
32
32
  "src/json-rpc-stdio.mjs",
33
33
  "src/mcp-server.mjs",
34
+ "src/page-context.mjs",
34
35
  "src/package-info.mjs",
35
36
  "src/session-events.mjs",
36
37
  "src/server.mjs",