@mcp-b/chrome-devtools-mcp 1.0.0 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +69 -31
  2. package/package.json +26 -1
package/README.md CHANGED
@@ -67,9 +67,9 @@ Create a WebMCP tool called "search_products" that searches our product catalog
67
67
  **Step 2: The AI writes the code in your app**
68
68
  ```typescript
69
69
  // Your AI agent writes this code
70
- import { registerTools } from '@mcp-b/global';
70
+ import '@mcp-b/global';
71
71
 
72
- registerTools([{
72
+ navigator.modelContext.registerTool({
73
73
  name: 'search_products',
74
74
  description: 'Search for products by name or category',
75
75
  inputSchema: {
@@ -80,11 +80,13 @@ registerTools([{
80
80
  },
81
81
  required: ['query']
82
82
  },
83
- handler: async ({ query, category }) => {
83
+ async execute({ query, category }) {
84
84
  const results = await searchProducts(query, category);
85
- return { results };
85
+ return {
86
+ content: [{ type: 'text', text: JSON.stringify(results) }]
87
+ };
86
88
  }
87
- }]);
89
+ });
88
90
  ```
89
91
 
90
92
  **Step 3: Your dev server hot-reloads**
@@ -462,26 +464,62 @@ If you run into any issues, checkout our [troubleshooting guide](./docs/troubles
462
464
 
463
465
  ## Prompts
464
466
 
465
- The server includes built-in prompts to help with WebMCP development workflows:
467
+ The server includes built-in prompts to help with WebMCP development workflows. Prompts are reusable message templates that guide AI agents through common tasks.
466
468
 
467
469
  | Prompt | Description |
468
470
  |--------|-------------|
469
- | `webmcp-dev-workflow` | Guides you through the AI-driven development workflow for building and testing WebMCP tools |
470
- | `test-webmcp-tool` | Systematically test a WebMCP tool on the current page with various inputs |
471
- | `debug-webmcp` | Troubleshoot WebMCP connection issues and diagnose why tools aren't appearing |
471
+ | `webmcp-dev-workflow` | Step-by-step guide for building WebMCP tools with AI |
472
+ | `test-webmcp-tool` | Systematically test tools with edge cases and validation |
473
+ | `debug-webmcp` | Diagnose WebMCP connection and registration issues |
472
474
 
473
- ### Using Prompts
475
+ ### webmcp-dev-workflow
474
476
 
475
- In MCP clients that support prompts, you can invoke these directly. For example, in Claude Desktop or Claude Code:
477
+ Guides you through the AI-driven development workflow for building and testing WebMCP tools.
476
478
 
479
+ **When to use:** Starting a new WebMCP tool and want step-by-step guidance through the write → hot-reload → discover → test → iterate cycle.
480
+
481
+ **Arguments:** None
482
+
483
+ **Example:**
477
484
  ```
478
- Use the webmcp-dev-workflow prompt to help me build a new tool
485
+ Use the webmcp-dev-workflow prompt to help me build a search tool
479
486
  ```
480
487
 
481
- Or with arguments:
488
+ ### test-webmcp-tool
489
+
490
+ Systematically test a WebMCP tool with various inputs including valid data, edge cases, and invalid inputs.
491
+
492
+ **When to use:** You have a tool ready and want to verify it handles all input scenarios correctly.
493
+
494
+ **Arguments:**
495
+
496
+ | Argument | Type | Required | Description |
497
+ |----------|------|----------|-------------|
498
+ | `toolName` | string | No | Focus testing on a specific tool |
499
+ | `devServerUrl` | string | No | Dev server URL (default: `http://localhost:3000`) |
500
+
501
+ **Examples:**
502
+ ```
503
+ Use the test-webmcp-tool prompt
504
+ Use the test-webmcp-tool prompt with toolName=search_products
505
+ Use the test-webmcp-tool prompt with devServerUrl=http://localhost:5173 toolName=add_to_cart
506
+ ```
507
+
508
+ ### debug-webmcp
509
+
510
+ Troubleshoot WebMCP connection issues and diagnose why tools aren't appearing or working.
482
511
 
512
+ **When to use:** Tools aren't being discovered, connections are failing, or you see "WebMCP not detected" errors.
513
+
514
+ **Arguments:**
515
+
516
+ | Argument | Type | Required | Description |
517
+ |----------|------|----------|-------------|
518
+ | `url` | string | No | Page URL to debug (default: current page) |
519
+
520
+ **Example:**
483
521
  ```
484
- Use the test-webmcp-tool prompt with devServerUrl=http://localhost:5173
522
+ Use the debug-webmcp prompt with url=http://localhost:3000
485
523
  ```
486
524
 
487
525
  ## Configuration
@@ -713,25 +751,25 @@ The webpage must have WebMCP tools registered. Websites do this by using the
713
751
 
714
752
  ```javascript
715
753
  // Example of how a website registers tools (done by the website developer)
716
- import { registerTools } from '@mcp-b/global';
717
-
718
- registerTools([
719
- {
720
- name: 'search_products',
721
- description: 'Search for products on this website',
722
- inputSchema: {
723
- type: 'object',
724
- properties: {
725
- query: { type: 'string', description: 'Search query' }
726
- },
727
- required: ['query']
754
+ import '@mcp-b/global';
755
+
756
+ navigator.modelContext.registerTool({
757
+ name: 'search_products',
758
+ description: 'Search for products on this website',
759
+ inputSchema: {
760
+ type: 'object',
761
+ properties: {
762
+ query: { type: 'string', description: 'Search query' }
728
763
  },
729
- handler: async ({ query }) => {
730
- // Implementation
731
- return { results: [...] };
732
- }
764
+ required: ['query']
765
+ },
766
+ async execute({ query }) {
767
+ // Implementation
768
+ return {
769
+ content: [{ type: 'text', text: JSON.stringify({ results: [...] }) }]
770
+ };
733
771
  }
734
- ]);
772
+ });
735
773
  ```
736
774
 
737
775
  ### Using WebMCP tools
package/package.json CHANGED
@@ -1,7 +1,32 @@
1
1
  {
2
2
  "name": "@mcp-b/chrome-devtools-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "MCP server for Chrome DevTools with WebMCP integration",
5
+ "keywords": [
6
+ "mcp",
7
+ "model-context-protocol",
8
+ "chrome",
9
+ "devtools",
10
+ "browser-automation",
11
+ "puppeteer",
12
+ "ai-agent",
13
+ "claude",
14
+ "cursor",
15
+ "copilot",
16
+ "gemini",
17
+ "webmcp",
18
+ "web-model-context",
19
+ "ai-tools",
20
+ "llm",
21
+ "ai-assistant",
22
+ "browser-testing",
23
+ "debugging",
24
+ "performance",
25
+ "screenshots",
26
+ "web-automation",
27
+ "anthropic",
28
+ "openai"
29
+ ],
5
30
  "homepage": "https://github.com/WebMCP-org/npm-packages/tree/main/packages/chrome-devtools-mcp#readme",
6
31
  "bugs": {
7
32
  "url": "https://github.com/WebMCP-org/npm-packages/issues"