n8n-nodes-smart-browser-automation 1.6.19 → 1.6.20
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.
|
@@ -113,14 +113,21 @@ class SmartBrowserAutomationTools {
|
|
|
113
113
|
const cdpOverride = this.getNodeParameter('cdpOverride', itemIndex, '');
|
|
114
114
|
const useCDP = credentials.browserMode === 'cdp';
|
|
115
115
|
const cdpUrl = (cdpOverride || credentials.cdpEndpoint || '').trim();
|
|
116
|
+
const mcpEndpoint = (credentials.mcpEndpoint || '').trim();
|
|
117
|
+
if (!mcpEndpoint) {
|
|
118
|
+
throw new n8n_workflow_1.NodeOperationError(node, 'MCP Endpoint is required in credentials', {
|
|
119
|
+
itemIndex,
|
|
120
|
+
description: 'Please configure the MCP Endpoint in your Smart Browser Automation credentials',
|
|
121
|
+
});
|
|
122
|
+
}
|
|
116
123
|
try {
|
|
117
|
-
await sessionManager.initialize(
|
|
124
|
+
await sessionManager.initialize(mcpEndpoint, useCDP, useCDP ? cdpUrl : undefined);
|
|
118
125
|
}
|
|
119
126
|
catch (error) {
|
|
120
127
|
throw new n8n_workflow_1.NodeOperationError(node, `Failed to connect to MCP server: ${error.message}`, {
|
|
121
128
|
itemIndex,
|
|
122
129
|
description: JSON.stringify({
|
|
123
|
-
mcpEndpoint
|
|
130
|
+
mcpEndpoint,
|
|
124
131
|
browserMode: credentials.browserMode,
|
|
125
132
|
useCDP,
|
|
126
133
|
cdpEndpoint: useCDP ? cdpUrl : undefined,
|