mcpbrowser 0.3.59 → 0.4.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/package.json +1 -1
- package/src/actions/click-element.js +5 -5
- package/src/actions/detect-forms.js +1 -1
- package/src/actions/execute-javascript.js +2 -2
- package/src/actions/fetch-page.js +8 -8
- package/src/actions/get-current-html.js +1 -1
- package/src/actions/navigate-history.js +2 -2
- package/src/actions/take-screenshot.js +1 -1
- package/src/actions/type-text.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcpbrowser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"mcpName": "io.github.cherchyk/mcpbrowser",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "MCP browser server — loads and interacts with web pages using the user's Chromium-based browser with full JavaScript execution. Handles authentication, SSO, and anti-bot protection automatically via the user's existing browser session.",
|
|
@@ -98,11 +98,11 @@ export const CLICK_ELEMENT_TOOL = {
|
|
|
98
98
|
url: { type: "string", description: "The URL of the page (must match a previously fetched page)" },
|
|
99
99
|
selector: { type: "string", description: "CSS selector for the element to click (e.g., '#submit-btn', '.login-button')" },
|
|
100
100
|
text: { type: "string", description: "Text content to search for if selector is not provided (e.g., 'Sign In', 'Submit')" },
|
|
101
|
-
waitForElementTimeout: { type: "number", description: "Maximum time to wait for element in milliseconds", default: 1000 },
|
|
102
|
-
returnHtml: { type: "boolean", description: "Whether to wait for stability and return HTML after clicking. Set to false for fast form interactions (checkboxes, radio buttons).", default: true },
|
|
103
|
-
removeUnnecessaryHTML: { type: "boolean", description: "Remove Unnecessary HTML for size reduction by 90%. Only used when returnHtml is true.", default: true },
|
|
104
|
-
postClickWait: { type: "number", description: "Milliseconds to wait after click for SPAs to render dynamic content.", default: 1000 },
|
|
105
|
-
htmlSelector: { type: "string", description: "CSS selector to extract a specific DOM subtree from the post-click page instead of the full page. Use on heavy SPAs (e.g., ADO, Jira) to reduce response size. Only used when returnHtml is true. Example: '.activity-feed', '[role=\"main\"]'." },
|
|
101
|
+
// waitForElementTimeout: { type: "number", description: "Maximum time to wait for element in milliseconds", default: 1000 },
|
|
102
|
+
// returnHtml: { type: "boolean", description: "Whether to wait for stability and return HTML after clicking. Set to false for fast form interactions (checkboxes, radio buttons).", default: true },
|
|
103
|
+
// removeUnnecessaryHTML: { type: "boolean", description: "Remove Unnecessary HTML for size reduction by 90%. Only used when returnHtml is true.", default: true },
|
|
104
|
+
// postClickWait: { type: "number", description: "Milliseconds to wait after click for SPAs to render dynamic content.", default: 1000 },
|
|
105
|
+
// htmlSelector: { type: "string", description: "CSS selector to extract a specific DOM subtree from the post-click page instead of the full page. Use on heavy SPAs (e.g., ADO, Jira) to reduce response size. Only used when returnHtml is true. Example: '.activity-feed', '[role=\"main\"]'." },
|
|
106
106
|
detectForms: { type: "boolean", description: "Scan page for forms after click and return structured form data (fields, selectors, submit buttons, orphaned inputs). Only applies when returnHtml=true. Set to true when you need to fill or interact with forms after clicking.", default: false }
|
|
107
107
|
},
|
|
108
108
|
required: ["url"],
|
|
@@ -79,7 +79,7 @@ export const DETECT_FORMS_TOOL = {
|
|
|
79
79
|
type: "object",
|
|
80
80
|
properties: {
|
|
81
81
|
url: { type: "string", description: "URL of the already-loaded page" },
|
|
82
|
-
includeHidden: { type: "boolean", default: false, description: "Include hidden fields (type=hidden). Useful for understanding form state." }
|
|
82
|
+
// includeHidden: { type: "boolean", default: false, description: "Include hidden fields (type=hidden). Useful for understanding form state." }
|
|
83
83
|
},
|
|
84
84
|
required: ["url"],
|
|
85
85
|
additionalProperties: false
|
|
@@ -70,8 +70,8 @@ export const EXECUTE_JAVASCRIPT_TOOL = {
|
|
|
70
70
|
properties: {
|
|
71
71
|
url: { type: 'string', description: 'The URL of the page (must match a previously fetched page)' },
|
|
72
72
|
script: { type: 'string', description: 'JavaScript source code to execute in page context' },
|
|
73
|
-
timeoutMs: { type: 'number', description: 'Maximum execution time in milliseconds', default: EXECUTION_TIMEOUT_DEFAULT_MS },
|
|
74
|
-
returnType: { type: 'string', description: "How to interpret the result: 'json' | 'text' | 'void'", enum: ['json', 'text', 'void'], default: 'json' }
|
|
73
|
+
// timeoutMs: { type: 'number', description: 'Maximum execution time in milliseconds', default: EXECUTION_TIMEOUT_DEFAULT_MS },
|
|
74
|
+
// returnType: { type: 'string', description: "How to interpret the result: 'json' | 'text' | 'void'", enum: ['json', 'text', 'void'], default: 'json' }
|
|
75
75
|
},
|
|
76
76
|
required: ['url', 'script'],
|
|
77
77
|
additionalProperties: false
|
|
@@ -82,15 +82,15 @@ export const FETCH_WEBPAGE_TOOL = {
|
|
|
82
82
|
type: "object",
|
|
83
83
|
properties: {
|
|
84
84
|
url: { type: "string", description: "The URL to fetch" },
|
|
85
|
-
browser: {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
removeUnnecessaryHTML: { type: "boolean", description: "Remove Unnecessary HTML for size reduction by 90%.", default: true },
|
|
85
|
+
// browser: {
|
|
86
|
+
// type: "string",
|
|
87
|
+
// enum: ["chrome", "edge", "brave"],
|
|
88
|
+
// description: "Browser to use. Uses CDP to connect to the user's existing browser session.",
|
|
89
|
+
// default: "chrome"
|
|
90
|
+
// },
|
|
91
|
+
// removeUnnecessaryHTML: { type: "boolean", description: "Remove Unnecessary HTML for size reduction by 90%.", default: true },
|
|
92
92
|
selector: { type: "string", description: "CSS selector to extract a specific DOM subtree instead of the full page. Use to scope extraction and reduce response size (e.g., 'main', '[role=\"main\"]', 'body > div:first-child'). If no elements match, falls back to full page with a note." },
|
|
93
|
-
postLoadWait: { type: "number", description: "Additional milliseconds to wait after page load before extracting HTML. Use for pages that need extra time to render. Default: 0 (no extra wait, SPA detection handles most cases automatically).", default: 0 },
|
|
93
|
+
// postLoadWait: { type: "number", description: "Additional milliseconds to wait after page load before extracting HTML. Use for pages that need extra time to render. Default: 0 (no extra wait, SPA detection handles most cases automatically).", default: 0 },
|
|
94
94
|
detectForms: { type: "boolean", description: "Scan page for forms and return structured form data (fields, selectors, submit buttons, orphaned inputs). Set to true when you need to fill or interact with forms.", default: false }
|
|
95
95
|
},
|
|
96
96
|
required: ["url"],
|
|
@@ -80,7 +80,7 @@ export const GET_CURRENT_HTML_TOOL = {
|
|
|
80
80
|
type: "object",
|
|
81
81
|
properties: {
|
|
82
82
|
url: { type: "string", description: "The URL of the page (must match a previously fetched page)" },
|
|
83
|
-
removeUnnecessaryHTML: { type: "boolean", description: "Remove Unnecessary HTML for size reduction by 90%.", default: true },
|
|
83
|
+
// removeUnnecessaryHTML: { type: "boolean", description: "Remove Unnecessary HTML for size reduction by 90%.", default: true },
|
|
84
84
|
selector: { type: "string", description: "CSS selector to extract a specific DOM subtree instead of the full page. Use to scope extraction and reduce response size (e.g., 'main', '[role=\"main\"]', 'body > div:first-child'). If no elements match, falls back to full page with a note." },
|
|
85
85
|
detectForms: { type: "boolean", description: "Scan page for forms and return structured form data (fields, selectors, submit buttons, orphaned inputs). Set to true when you need to fill or interact with forms.", default: false }
|
|
86
86
|
},
|
|
@@ -82,8 +82,8 @@ export const NAVIGATE_HISTORY_TOOL = {
|
|
|
82
82
|
description: "Navigation direction: 'back' to go to previous page, 'forward' to go to next page",
|
|
83
83
|
default: "back"
|
|
84
84
|
},
|
|
85
|
-
returnHtml: { type: "boolean", description: "Return page HTML after navigation", default: true },
|
|
86
|
-
removeUnnecessaryHTML: { type: "boolean", description: "Remove unnecessary HTML elements (scripts, styles, etc.) for size reduction.", default: true }
|
|
85
|
+
// returnHtml: { type: "boolean", description: "Return page HTML after navigation", default: true },
|
|
86
|
+
// removeUnnecessaryHTML: { type: "boolean", description: "Remove unnecessary HTML elements (scripts, styles, etc.) for size reduction.", default: true }
|
|
87
87
|
},
|
|
88
88
|
required: ["url"],
|
|
89
89
|
additionalProperties: false
|
|
@@ -94,7 +94,7 @@ export const TAKE_SCREENSHOT_TOOL = {
|
|
|
94
94
|
type: "object",
|
|
95
95
|
properties: {
|
|
96
96
|
url: { type: "string", description: "The URL of the page (must match a previously fetched page)" },
|
|
97
|
-
fullPage: { type: "boolean", description: "RECOMMENDED: set to true to capture the entire scrollable page in one shot instead of just the viewport. Avoids multiple scroll+screenshot cycles. Automatically falls back to viewport if the page is extremely tall.", default: false }
|
|
97
|
+
// fullPage: { type: "boolean", description: "RECOMMENDED: set to true to capture the entire scrollable page in one shot instead of just the viewport. Avoids multiple scroll+screenshot cycles. Automatically falls back to viewport if the page is extremely tall.", default: false }
|
|
98
98
|
},
|
|
99
99
|
required: ["url"],
|
|
100
100
|
additionalProperties: false
|
package/src/actions/type-text.js
CHANGED
|
@@ -87,9 +87,9 @@ export const TYPE_TEXT_TOOL = {
|
|
|
87
87
|
},
|
|
88
88
|
minItems: 1
|
|
89
89
|
},
|
|
90
|
-
returnHtml: { type: "boolean", description: "Whether to wait for stability and return HTML after typing.", default: true },
|
|
91
|
-
removeUnnecessaryHTML: { type: "boolean", description: "Remove Unnecessary HTML for size reduction by 90%. Only used when returnHtml is true.", default: true },
|
|
92
|
-
postTypeWait: { type: "number", description: "Milliseconds to wait after typing for SPAs to render dynamic content.", default: 1000 }
|
|
90
|
+
// returnHtml: { type: "boolean", description: "Whether to wait for stability and return HTML after typing.", default: true },
|
|
91
|
+
// removeUnnecessaryHTML: { type: "boolean", description: "Remove Unnecessary HTML for size reduction by 90%. Only used when returnHtml is true.", default: true },
|
|
92
|
+
// postTypeWait: { type: "number", description: "Milliseconds to wait after typing for SPAs to render dynamic content.", default: 1000 }
|
|
93
93
|
},
|
|
94
94
|
required: ["url", "fields"],
|
|
95
95
|
additionalProperties: false
|