mcpbrowser 0.3.37 → 0.3.43

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcpbrowser",
3
- "version": "0.3.37",
3
+ "version": "0.3.43",
4
4
  "mcpName": "io.github.cherchyk/mcpbrowser",
5
5
  "type": "module",
6
6
  "description": "MCP browser server - fetch web pages using real Chrome/Edge/Brave browser. Handles authentication, SSO, CAPTCHAs, and anti-bot protection. Browser automation for AI assistants.",
@@ -139,6 +139,11 @@ export const CLICK_ELEMENT_TOOL = {
139
139
  type: "array",
140
140
  items: { type: "string" },
141
141
  description: "Suggested next actions"
142
+ },
143
+ recommendedPlugins: {
144
+ type: "array",
145
+ items: { type: "object" },
146
+ description: "Detected site-specific plugins available for this domain"
142
147
  }
143
148
  },
144
149
  required: ["status", "fallbackUsed", "nativeAttempt", "currentUrl", "message", "html", "nextSteps"],
@@ -81,7 +81,12 @@ export const EXECUTE_JAVASCRIPT_TOOL = {
81
81
  urlChanged: { type: 'boolean', description: 'True if page URL changed during execution' },
82
82
  currentUrl: { type: 'string', description: 'URL after execution' },
83
83
  nextSteps: { type: 'array', items: { type: 'string' } },
84
- error: { type: ['object', 'null'], description: 'Error object when script throws or times out' }
84
+ error: { type: ['object', 'null'], description: 'Error object when script throws or times out' },
85
+ recommendedPlugins: {
86
+ type: 'array',
87
+ items: { type: 'object' },
88
+ description: 'Detected site-specific plugins available for this domain'
89
+ }
85
90
  },
86
91
  required: ['type', 'executionTimeMs', 'truncated', 'urlChanged', 'currentUrl', 'nextSteps'],
87
92
  additionalProperties: false
@@ -91,6 +91,11 @@ export const FETCH_WEBPAGE_TOOL = {
91
91
  type: "array",
92
92
  items: { type: "string" },
93
93
  description: "Suggested next actions"
94
+ },
95
+ recommendedPlugins: {
96
+ type: "array",
97
+ items: { type: "object" },
98
+ description: "Detected site-specific plugins available for this domain"
94
99
  }
95
100
  },
96
101
  required: ["currentUrl", "html", "nextSteps"],
@@ -83,6 +83,11 @@ export const GET_CURRENT_HTML_TOOL = {
83
83
  type: "array",
84
84
  items: { type: "string" },
85
85
  description: "Suggested next actions"
86
+ },
87
+ recommendedPlugins: {
88
+ type: "array",
89
+ items: { type: "object" },
90
+ description: "Detected site-specific plugins available for this domain"
86
91
  }
87
92
  },
88
93
  required: ["currentUrl", "html", "nextSteps"],
@@ -128,6 +128,23 @@ export class InformationalResponse extends MCPResponse {
128
128
  }
129
129
  return summary;
130
130
  }
131
+
132
+ /**
133
+ * Informational responses omit structuredContent to avoid schema violations.
134
+ * Their fields (message, reason, status) don't match tool-specific outputSchemas.
135
+ * @returns {Object} MCP-compliant response with text content only
136
+ */
137
+ toMcpFormat() {
138
+ return {
139
+ content: [
140
+ {
141
+ type: "text",
142
+ text: this.getTextSummary()
143
+ }
144
+ ],
145
+ isError: false
146
+ };
147
+ }
131
148
  }
132
149
 
133
150
  /**
@@ -272,6 +289,23 @@ export class HttpStatusResponse extends MCPResponse {
272
289
  }
273
290
  return summary;
274
291
  }
292
+
293
+ /**
294
+ * HTTP status responses omit structuredContent to avoid schema violations.
295
+ * Their fields (url, statusCode, etc.) don't match tool-specific outputSchemas.
296
+ * @returns {Object} MCP-compliant response with text content only
297
+ */
298
+ toMcpFormat() {
299
+ return {
300
+ content: [
301
+ {
302
+ type: "text",
303
+ text: this.getTextSummary()
304
+ }
305
+ ],
306
+ isError: false
307
+ };
308
+ }
275
309
  }
276
310
 
277
311
  /**