mcpbrowser 0.3.48 → 0.3.49
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 +6 -3
- package/src/actions/click-element.js +1 -1
- package/src/actions/close-tab.js +1 -1
- package/src/actions/detect-forms.js +1 -1
- package/src/actions/execute-javascript.js +1 -1
- package/src/actions/fetch-page.js +1 -1
- package/src/actions/get-current-html.js +1 -1
- package/src/actions/navigate-history.js +1 -1
- package/src/actions/plugin-action.js +3 -3
- package/src/actions/plugin-info.js +1 -1
- package/src/actions/scroll-page.js +1 -1
- package/src/actions/take-screenshot.js +1 -1
- package/src/actions/type-text.js +1 -1
- package/src/mcp-browser.js +18 -11
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcpbrowser",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.49",
|
|
4
4
|
"mcpName": "io.github.cherchyk/mcpbrowser",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"description": "MCP browser server
|
|
6
|
+
"description": "MCP browser server — load and interact with any web page using a real Chrome/Edge/Brave browser with full JavaScript execution. Handles login flows, authentication, SSO, CAPTCHAs, and anti-bot protection. Use whenever a real browser is needed to load a page, especially when JavaScript rendering or user login is required.",
|
|
7
7
|
"main": "src/mcp-browser.js",
|
|
8
8
|
"bin": {
|
|
9
9
|
"mcpbrowser": "src/mcp-browser.js"
|
|
@@ -38,7 +38,10 @@
|
|
|
38
38
|
"claude",
|
|
39
39
|
"ai-assistant",
|
|
40
40
|
"cdp",
|
|
41
|
-
"devtools"
|
|
41
|
+
"devtools",
|
|
42
|
+
"javascript-rendering",
|
|
43
|
+
"login",
|
|
44
|
+
"interactive"
|
|
42
45
|
],
|
|
43
46
|
"author": "cherchyk",
|
|
44
47
|
"license": "MIT",
|
|
@@ -88,7 +88,7 @@ export class ClickWithFallbackResponse extends MCPResponse {
|
|
|
88
88
|
export const CLICK_ELEMENT_TOOL = {
|
|
89
89
|
name: "browser_click_element",
|
|
90
90
|
title: "Click Element",
|
|
91
|
-
description: "
|
|
91
|
+
description: "Click buttons, links, or any element on a browser-loaded page. Use when: you need to navigate a website, submit a form, press a button, follow a link, or interact with any clickable UI element. Targets by CSS selector or visible text. Returns updated page HTML after click. PREREQUISITE: Page must be loaded with browser_fetch_webpage first.",
|
|
92
92
|
inputSchema: {
|
|
93
93
|
type: "object",
|
|
94
94
|
properties: {
|
package/src/actions/close-tab.js
CHANGED
|
@@ -59,7 +59,7 @@ export class CloseTabSuccessResponse extends MCPResponse {
|
|
|
59
59
|
export const CLOSE_TAB_TOOL = {
|
|
60
60
|
name: "browser_close_tab",
|
|
61
61
|
title: "Close Tab",
|
|
62
|
-
description: "
|
|
62
|
+
description: "Close a browser tab to free resources. Use when: you are done with a page and want to release memory, or need to reset session state for a hostname. Uses exact hostname match.",
|
|
63
63
|
inputSchema: {
|
|
64
64
|
type: "object",
|
|
65
65
|
properties: {
|
|
@@ -74,7 +74,7 @@ export class DetectFormsResponse extends MCPResponse {
|
|
|
74
74
|
export const DETECT_FORMS_TOOL = {
|
|
75
75
|
name: "browser_detect_forms",
|
|
76
76
|
title: "Detect Forms",
|
|
77
|
-
description: "
|
|
77
|
+
description: "Scan a browser-loaded page and return all forms as structured JSON — fields, types, validation rules, submit buttons, and orphaned inputs. Use when: you need to understand a form before filling it, discover what fields exist on a page, or map form structure for automation. PREREQUISITE: Page must be loaded with browser_fetch_webpage first.",
|
|
78
78
|
inputSchema: {
|
|
79
79
|
type: "object",
|
|
80
80
|
properties: {
|
|
@@ -59,7 +59,7 @@ export class ExecuteJavascriptResponse extends MCPResponse {
|
|
|
59
59
|
export const EXECUTE_JAVASCRIPT_TOOL = {
|
|
60
60
|
name: 'browser_execute_javascript',
|
|
61
61
|
title: 'Execute JavaScript',
|
|
62
|
-
description: '
|
|
62
|
+
description: 'Run JavaScript on a browser-loaded page and get the result. Use when: you need to extract structured data from a page, manipulate the DOM, read page state, run custom queries on page content, or perform UI actions that CSS selectors cannot reach. Returns the script result as JSON, text, or void. PREREQUISITE: Page must be loaded with browser_fetch_webpage first.',
|
|
63
63
|
inputSchema: {
|
|
64
64
|
type: 'object',
|
|
65
65
|
properties: {
|
|
@@ -74,7 +74,7 @@ export class FetchPageSuccessResponse extends MCPResponse {
|
|
|
74
74
|
export const FETCH_WEBPAGE_TOOL = {
|
|
75
75
|
name: "browser_fetch_webpage",
|
|
76
76
|
title: "Fetch Web Page",
|
|
77
|
-
description: "
|
|
77
|
+
description: "Load any URL and return its content using a real browser with full JavaScript execution. Use when: user shares a URL, you need to read a webpage, fetch content from a link, open a page, check a website, load a GitHub PR/issue, read documentation, or access any HTTP/HTTPS resource. Handles JavaScript rendering, login/SSO, CAPTCHA, and anti-bot protection automatically. Works on all sites including those behind authentication. Prefer this over generic HTTP fetch — it always works, even on authenticated or JS-heavy pages that require proper JavaScript execution or user login.",
|
|
78
78
|
inputSchema: {
|
|
79
79
|
type: "object",
|
|
80
80
|
properties: {
|
|
@@ -72,7 +72,7 @@ export class GetCurrentHtmlSuccessResponse extends MCPResponse {
|
|
|
72
72
|
export const GET_CURRENT_HTML_TOOL = {
|
|
73
73
|
name: "browser_get_current_html",
|
|
74
74
|
title: "Get Current HTML",
|
|
75
|
-
description: "
|
|
75
|
+
description: "Re-read HTML from an already-loaded page without reloading it. Use when: you need to check page state after a click or form fill, re-extract content from the current page, or get updated HTML after dynamic changes. Much faster than browser_fetch_webpage since it skips navigation. PREREQUISITE: Page must be loaded with browser_fetch_webpage first.",
|
|
76
76
|
inputSchema: {
|
|
77
77
|
type: "object",
|
|
78
78
|
properties: {
|
|
@@ -71,7 +71,7 @@ export class NavigateHistorySuccessResponse extends MCPResponse {
|
|
|
71
71
|
export const NAVIGATE_HISTORY_TOOL = {
|
|
72
72
|
name: "browser_navigate_history",
|
|
73
73
|
title: "Navigate Back/Forward",
|
|
74
|
-
description: "
|
|
74
|
+
description: "Go back or forward in browser history. Use when: you clicked a link and need to return to the previous page, or want to go forward after going back. PREREQUISITE: Page must be loaded with browser_fetch_webpage first.",
|
|
75
75
|
inputSchema: {
|
|
76
76
|
type: "object",
|
|
77
77
|
properties: {
|
|
@@ -38,17 +38,17 @@ export class PluginActionSuccessResponse extends MCPResponse {
|
|
|
38
38
|
export const PLUGIN_ACTION_TOOL = {
|
|
39
39
|
name: "browser_plugin_action",
|
|
40
40
|
title: "Plugin Action",
|
|
41
|
-
description: "Execute a site-specific plugin action.
|
|
41
|
+
description: "Execute a site-specific plugin action. Call browser_plugin_info first to discover available plugins and their actions.",
|
|
42
42
|
inputSchema: {
|
|
43
43
|
type: "object",
|
|
44
44
|
properties: {
|
|
45
45
|
plugin: {
|
|
46
46
|
type: "string",
|
|
47
|
-
description: "Plugin name (
|
|
47
|
+
description: "Plugin name (use browser_plugin_info to list available plugins)"
|
|
48
48
|
},
|
|
49
49
|
action: {
|
|
50
50
|
type: "string",
|
|
51
|
-
description: "Action name within the plugin (
|
|
51
|
+
description: "Action name within the plugin (use browser_plugin_info to discover available actions)"
|
|
52
52
|
},
|
|
53
53
|
params: {
|
|
54
54
|
type: "object",
|
|
@@ -55,7 +55,7 @@ export class PluginActionDetailResponse extends MCPResponse {
|
|
|
55
55
|
export const PLUGIN_INFO_TOOL = {
|
|
56
56
|
name: "browser_plugin_info",
|
|
57
57
|
title: "Plugin Info",
|
|
58
|
-
description: "
|
|
58
|
+
description: "List available site-specific plugins and their actions. Use when: browser_fetch_webpage suggests a plugin in nextSteps, or you want to check what optimized actions are available for the current site. Call with no arguments to list all plugins, or with a plugin name for details.",
|
|
59
59
|
inputSchema: {
|
|
60
60
|
type: "object",
|
|
61
61
|
properties: {
|
|
@@ -94,7 +94,7 @@ export class ScrollPageSuccessResponse extends MCPResponse {
|
|
|
94
94
|
export const SCROLL_PAGE_TOOL = {
|
|
95
95
|
name: "browser_scroll_page",
|
|
96
96
|
title: "Scroll Page",
|
|
97
|
-
description: "
|
|
97
|
+
description: "Scroll within a browser-loaded page. Use when: you need to see more content below the fold, bring an element into view before clicking, scroll to a specific section, or navigate long pages. Supports scroll by direction, to a CSS selector, or to absolute coordinates. PREREQUISITE: Page must be loaded with browser_fetch_webpage first.",
|
|
98
98
|
inputSchema: {
|
|
99
99
|
type: "object",
|
|
100
100
|
properties: {
|
|
@@ -89,7 +89,7 @@ export class TakeScreenshotSuccessResponse extends MCPResponse {
|
|
|
89
89
|
export const TAKE_SCREENSHOT_TOOL = {
|
|
90
90
|
name: "browser_take_screenshot",
|
|
91
91
|
title: "Take Screenshot",
|
|
92
|
-
description: "
|
|
92
|
+
description: "Capture a screenshot of a browser-loaded page as PNG. Use when: you need to see what a page looks like, analyze visual layout, view charts/images/graphs, debug UI issues, or when HTML alone is insufficient to understand the page content. Returns base64-encoded PNG. PREREQUISITE: Page must be loaded with browser_fetch_webpage first.",
|
|
93
93
|
inputSchema: {
|
|
94
94
|
type: "object",
|
|
95
95
|
properties: {
|
package/src/actions/type-text.js
CHANGED
|
@@ -66,7 +66,7 @@ export class TypeTextSuccessResponse extends MCPResponse {
|
|
|
66
66
|
export const TYPE_TEXT_TOOL = {
|
|
67
67
|
name: "browser_type_text",
|
|
68
68
|
title: "Type Text",
|
|
69
|
-
description: "
|
|
69
|
+
description: "Type text into input fields on a browser-loaded page. Use when: you need to fill a form, enter a search query, type into a text box, or input data into any editable field. Supports filling multiple fields in a single call. PREREQUISITE: Page must be loaded with browser_fetch_webpage first.",
|
|
70
70
|
inputSchema: {
|
|
71
71
|
type: "object",
|
|
72
72
|
properties: {
|
package/src/mcp-browser.js
CHANGED
|
@@ -61,15 +61,30 @@ async function main() {
|
|
|
61
61
|
const packageJson = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'));
|
|
62
62
|
|
|
63
63
|
const server = new Server(
|
|
64
|
-
{ name: "
|
|
64
|
+
{ name: "MCPBrowser", version: packageJson.version },
|
|
65
65
|
{ capabilities: { tools: {}, logging: {} } }
|
|
66
66
|
);
|
|
67
67
|
|
|
68
68
|
// Wire server to logger so logs flow to agent via notifications/message.
|
|
69
69
|
attachLoggerServer(server);
|
|
70
70
|
|
|
71
|
+
// Load plugins before assembling tools so we only expose plugin tools when plugins are enabled
|
|
72
|
+
const pluginCount = await loadPlugins();
|
|
73
|
+
if (pluginCount > 0) {
|
|
74
|
+
logger.info(`${pluginCount} plugin(s) loaded and ready`);
|
|
75
|
+
}
|
|
76
|
+
|
|
71
77
|
// Assemble tools from action imports
|
|
72
|
-
//
|
|
78
|
+
// Only include plugin tools when plugins are actually enabled, with descriptions referencing loaded plugin names
|
|
79
|
+
const pluginTools = [];
|
|
80
|
+
if (pluginCount > 0) {
|
|
81
|
+
const pluginNames = [...getLoadedPlugins().keys()];
|
|
82
|
+
const nameList = pluginNames.join(', ');
|
|
83
|
+
pluginTools.push(
|
|
84
|
+
{ ...PLUGIN_INFO_TOOL, description: `${PLUGIN_INFO_TOOL.description} Enabled plugins: ${nameList}.` },
|
|
85
|
+
{ ...PLUGIN_ACTION_TOOL, description: `${PLUGIN_ACTION_TOOL.description} Enabled plugins: ${nameList}.` }
|
|
86
|
+
);
|
|
87
|
+
}
|
|
73
88
|
const tools = [
|
|
74
89
|
// ACCEPT_EULA_TOOL,
|
|
75
90
|
FETCH_WEBPAGE_TOOL,
|
|
@@ -82,8 +97,7 @@ async function main() {
|
|
|
82
97
|
SCROLL_PAGE_TOOL,
|
|
83
98
|
NAVIGATE_HISTORY_TOOL,
|
|
84
99
|
DETECT_FORMS_TOOL,
|
|
85
|
-
|
|
86
|
-
PLUGIN_ACTION_TOOL
|
|
100
|
+
...pluginTools
|
|
87
101
|
];
|
|
88
102
|
|
|
89
103
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools }));
|
|
@@ -182,13 +196,6 @@ async function main() {
|
|
|
182
196
|
});
|
|
183
197
|
|
|
184
198
|
const transport = new StdioServerTransport();
|
|
185
|
-
|
|
186
|
-
// Load plugins before starting the server
|
|
187
|
-
const pluginCount = await loadPlugins();
|
|
188
|
-
if (pluginCount > 0) {
|
|
189
|
-
logger.info(`${pluginCount} plugin(s) loaded and ready`);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
199
|
await server.connect(transport);
|
|
193
200
|
logger.info(`MCPBrowser server v${packageJson.version} started`);
|
|
194
201
|
}
|