@mcpc-tech/unplugin-dev-inspector-mcp 0.0.21 → 0.0.22
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 +44 -26
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -53,12 +53,15 @@ This project uses the following sponsor APIs and platforms:
|
|
|
53
53
|
## Key Features
|
|
54
54
|
|
|
55
55
|
### 🎯 Visual Context
|
|
56
|
+
|
|
56
57
|
Click any element to instantly send its source code location, computed styles, and DOM hierarchy to AI. No more explaining "it's the blue button in the header".
|
|
57
58
|
|
|
58
59
|
### 🛠️ Full DevTools Access
|
|
60
|
+
|
|
59
61
|
AI can access Chrome DevTools to analyze network requests, console logs, and performance metrics. It sees what you see.
|
|
60
62
|
|
|
61
63
|
### 🤖 Multi-Agent Workflow
|
|
64
|
+
|
|
62
65
|
Switch between agents (Claude Code, Goose) and track their debugging progress visually with step-by-step status updates.
|
|
63
66
|
|
|
64
67
|
## Quick Start
|
|
@@ -87,6 +90,7 @@ npx @mcpc-tech/unplugin-dev-inspector-mcp setup
|
|
|
87
90
|
```
|
|
88
91
|
|
|
89
92
|
**Options:**
|
|
93
|
+
|
|
90
94
|
- `--dry-run` - Preview changes without applying them
|
|
91
95
|
- `--config <path>` - Specify config file path (auto-detect by default)
|
|
92
96
|
- `--bundler <type>` - Specify bundler type: vite, webpack, nextjs
|
|
@@ -94,6 +98,7 @@ npx @mcpc-tech/unplugin-dev-inspector-mcp setup
|
|
|
94
98
|
- `--help` - Show help message
|
|
95
99
|
|
|
96
100
|
**Examples:**
|
|
101
|
+
|
|
97
102
|
```bash
|
|
98
103
|
# Preview changes before applying
|
|
99
104
|
npx @mcpc-tech/unplugin-dev-inspector-mcp setup --dry-run
|
|
@@ -106,6 +111,7 @@ npx @mcpc-tech/unplugin-dev-inspector-mcp setup --bundler vite
|
|
|
106
111
|
```
|
|
107
112
|
|
|
108
113
|
This will:
|
|
114
|
+
|
|
109
115
|
- Detect your bundler configuration
|
|
110
116
|
- Add the necessary import
|
|
111
117
|
- Add the plugin to your configuration
|
|
@@ -237,6 +243,7 @@ export default function RootLayout({ children }) {
|
|
|
237
243
|
```
|
|
238
244
|
|
|
239
245
|
**Running modes:**
|
|
246
|
+
|
|
240
247
|
- **Webpack mode:** `next dev` (uses webpack configuration)
|
|
241
248
|
- **Turbopack mode:** `next dev --turbopack` (uses turbopack configuration, Next.js 16+ default)
|
|
242
249
|
|
|
@@ -255,8 +262,6 @@ export default function RootLayout({ children }) {
|
|
|
255
262
|
|
|
256
263
|
- **Angular** - Support coming soon
|
|
257
264
|
|
|
258
|
-
|
|
259
|
-
|
|
260
265
|
## Configuration
|
|
261
266
|
|
|
262
267
|
### Auto-Update MCP Config
|
|
@@ -270,13 +275,13 @@ The plugin automatically updates MCP configuration files for detected editors wh
|
|
|
270
275
|
DevInspector.vite({
|
|
271
276
|
// Auto-detect and update (default: true)
|
|
272
277
|
updateConfig: true,
|
|
273
|
-
|
|
278
|
+
|
|
274
279
|
// Or specify editors manually
|
|
275
280
|
updateConfig: ['cursor', 'vscode'],
|
|
276
|
-
|
|
281
|
+
|
|
277
282
|
// Or disable
|
|
278
283
|
updateConfig: false,
|
|
279
|
-
|
|
284
|
+
|
|
280
285
|
// Server name in MCP config (default: 'dev-inspector')
|
|
281
286
|
updateConfigServerName: 'my-app-inspector',
|
|
282
287
|
})
|
|
@@ -301,13 +306,12 @@ DevInspector.vite({
|
|
|
301
306
|
|
|
302
307
|
### Custom Agents
|
|
303
308
|
|
|
304
|
-
This plugin uses the [Agent Client Protocol (ACP)](https://agentclientprotocol.com) to connect with AI agents.
|
|
309
|
+
This plugin uses the [Agent Client Protocol (ACP)](https://agentclientprotocol.com) to connect with AI agents.
|
|
305
310
|
|
|
306
311
|
⏱️ **Note:** Initial connection may be slow as agents are launched via `npx` (downloads packages on first run).
|
|
307
312
|
|
|
308
313
|
Default agents: [View configuration →](https://github.com/mcpc-tech/dev-inspector-mcp/blob/main/packages/unplugin-dev-inspector/client/constants/agents.ts)
|
|
309
314
|
|
|
310
|
-
|
|
311
315
|
You can customize available AI agents and set a default agent:
|
|
312
316
|
|
|
313
317
|
```typescript
|
|
@@ -339,11 +343,11 @@ export default {
|
|
|
339
343
|
```
|
|
340
344
|
|
|
341
345
|
**Key Features:**
|
|
346
|
+
|
|
342
347
|
- Custom agents with the **same name** as [default agents](https://agentclientprotocol.com/overview/agents) automatically inherit missing properties (icons, env)
|
|
343
348
|
- You can override just the command/args while keeping default icons
|
|
344
349
|
- If no custom agents provided, defaults are: Claude Code, Codex CLI, Gemini CLI, Kimi CLI, Goose, OpenCode
|
|
345
350
|
|
|
346
|
-
|
|
347
351
|
## What It Does
|
|
348
352
|
|
|
349
353
|
**Click element → Describe issue → AI analyzes → Get fix**
|
|
@@ -354,56 +358,67 @@ export default {
|
|
|
354
358
|
4. Get intelligent solutions through natural conversation
|
|
355
359
|
|
|
356
360
|
**Examples:**
|
|
361
|
+
|
|
357
362
|
- "Why is this button not clickable?" → AI checks `pointer-events`, z-index, overlays
|
|
358
363
|
- "This API call is failing" → AI analyzes network requests, timing, responses
|
|
359
364
|
- "Where is this component?" → Jump to source file and line number
|
|
360
365
|
|
|
361
366
|
## Two Workflow Modes
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
367
|
+
|
|
368
|
+
DevInspector offers two ways to interact with your AI, depending on your preference:
|
|
369
|
+
|
|
370
|
+
### 1. Editor Mode
|
|
371
|
+
|
|
372
|
+
**Best for:** Code-heavy tasks, refactoring, and maintaining flow.
|
|
373
|
+
|
|
374
|
+
- **How it works:** You use your IDE's AI assistant (Cursor, Windsurf, Copilot).
|
|
375
|
+
- **The Flow:** Click an element in the browser -> The context (source, props, styles) is sent to your Editor via MCP -> You ask your Editor to fix it.
|
|
376
|
+
- **Why:** Keeps you in your coding environment.
|
|
377
|
+
|
|
378
|
+
### 2. Inspector Bar Mode (Recommended)
|
|
379
|
+
|
|
380
|
+
**Best for:** Quick fixes, visual tweaks, or if you don't use an AI editor.
|
|
381
|
+
|
|
382
|
+
- **How it works:** You use the floating "Inspector Bar" directly in the browser.
|
|
383
|
+
- **The Flow:** Click "Ask AI" in the browser -> Select an agent (e.g., Claude Code, Custom Script) -> The agent runs in your terminal but interacts with the browser overlay.
|
|
384
|
+
- **Why:** No context switching. Great for "what is this?" questions or network debugging.
|
|
385
|
+
|
|
386
|
+
## MCP Tools
|
|
380
387
|
|
|
381
388
|
### `capture_element_context`
|
|
389
|
+
|
|
382
390
|
Activates visual selector. Returns source location, DOM hierarchy, styles, dimensions, and user notes.
|
|
383
391
|
|
|
384
392
|
### `list_inspections`
|
|
393
|
+
|
|
385
394
|
Shows all inspections with ID, element details, notes, and status (pending/in-progress/completed/failed).
|
|
386
395
|
|
|
387
396
|
### `update_inspection_status`
|
|
397
|
+
|
|
388
398
|
Updates inspection status with optional progress steps.
|
|
389
399
|
|
|
390
400
|
**Parameters:** `status`, `message` (required for completed/failed), `progress`, `inspectionId` (optional)
|
|
391
401
|
|
|
392
402
|
### `execute_page_script`
|
|
403
|
+
|
|
393
404
|
Executes JavaScript in browser context. Access to window, document, React/Vue instances, localStorage.
|
|
394
405
|
|
|
395
406
|
### `chrome_devtools`
|
|
407
|
+
|
|
396
408
|
Agentic tool for Chrome DevTools access. Provides network inspection, console logs, performance metrics, element interaction, and more.
|
|
397
409
|
|
|
398
410
|
## MCP Prompts
|
|
399
411
|
|
|
400
412
|
### `capture_element`
|
|
413
|
+
|
|
401
414
|
Capture and analyze UI element context.
|
|
402
415
|
|
|
403
416
|
### `view_inspections`
|
|
417
|
+
|
|
404
418
|
View all pending, in-progress, and completed inspections.
|
|
405
419
|
|
|
406
420
|
### `launch_chrome_devtools`
|
|
421
|
+
|
|
407
422
|
Opens Chrome with DevTools API. Unlocks network analysis, console logs, performance metrics.
|
|
408
423
|
|
|
409
424
|
**Parameter:** `url` (defaults to dev server)
|
|
@@ -411,11 +426,13 @@ Opens Chrome with DevTools API. Unlocks network analysis, console logs, performa
|
|
|
411
426
|
💡 Optional if Chrome is already open. Use when you need to launch a new Chrome instance.
|
|
412
427
|
|
|
413
428
|
### `get_network_requests`
|
|
429
|
+
|
|
414
430
|
List network requests or get details of a specific one. Always refreshes the list first.
|
|
415
431
|
|
|
416
432
|
**Parameter:** `reqid` (optional) - If provided, get details for that request. If omitted, just list all requests.
|
|
417
433
|
|
|
418
434
|
### `get_console_messages`
|
|
435
|
+
|
|
419
436
|
List console messages or get details of a specific one. Always refreshes the list first.
|
|
420
437
|
|
|
421
438
|
**Parameter:** `msgid` (optional) - If provided, get details for that message. If omitted, just list all messages.
|
|
@@ -425,6 +442,7 @@ List console messages or get details of a specific one. Always refreshes the lis
|
|
|
425
442
|
For a deep dive into how the MCP context, CMCP library, and Puppet binding mechanism work together, see the [Architecture Documentation](./docs/architecture/mcp-cmcp-puppet-architecture.md).
|
|
426
443
|
|
|
427
444
|
**Key concepts:**
|
|
445
|
+
|
|
428
446
|
- **Hub-and-spoke model**: Vite dev server acts as central hub managing multiple client connections
|
|
429
447
|
- **CMCP bidirectional execution**: Server defines tool schemas, browser client provides implementations
|
|
430
448
|
- **Puppet binding**: Enables Chrome DevTools ↔ Inspector message passthrough
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcpc-tech/unplugin-dev-inspector-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"description": "Universal dev inspector plugin for React/Vue - inspect component sources and API calls in any bundler",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"lint:fix": "oxlint --fix .",
|
|
86
86
|
"format": "oxfmt .",
|
|
87
87
|
"format:check": "oxfmt --check .",
|
|
88
|
-
"prepublishOnly": "cp
|
|
88
|
+
"prepublishOnly": "cp ./README.md ../../ && pnpm build"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"esbuild": ">=0.17.0",
|
|
@@ -164,6 +164,7 @@
|
|
|
164
164
|
"tokenlens": "^1.3.1",
|
|
165
165
|
"unplugin": "^2.3.10",
|
|
166
166
|
"use-stick-to-bottom": "^1.1.1",
|
|
167
|
+
"@vue/compiler-sfc": "^3.5.25",
|
|
167
168
|
"zod": "^3.24.1"
|
|
168
169
|
},
|
|
169
170
|
"devDependencies": {
|
|
@@ -173,7 +174,6 @@
|
|
|
173
174
|
"@types/node": "^24.7.2",
|
|
174
175
|
"@types/react": "^19.2.2",
|
|
175
176
|
"@types/react-dom": "^19.2.2",
|
|
176
|
-
"@vue/compiler-sfc": "^3.5.25",
|
|
177
177
|
"esbuild": "^0.25.11",
|
|
178
178
|
"oxfmt": "^0.17.0",
|
|
179
179
|
"oxlint": "^1.32.0",
|