n8n-nodes-smart-browser-automation 1.6.21 → 1.6.22

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.
@@ -96,6 +96,14 @@ class SmartBrowserAutomationTools {
96
96
  },
97
97
  ],
98
98
  properties: [
99
+ {
100
+ displayName: 'MCP Endpoint Override',
101
+ name: 'mcpEndpointOverride',
102
+ type: 'string',
103
+ default: '',
104
+ placeholder: 'http://localhost:3000',
105
+ description: 'Override the MCP endpoint from credentials (optional)',
106
+ },
99
107
  {
100
108
  displayName: 'CDP Endpoint Override',
101
109
  name: 'cdpOverride',
@@ -110,10 +118,11 @@ class SmartBrowserAutomationTools {
110
118
  const node = this.getNode();
111
119
  const credentials = await this.getCredentials('smartBrowserAutomationApi');
112
120
  const sessionManager = BrowserSessionManager_1.default.getInstance();
121
+ const mcpOverride = this.getNodeParameter('mcpEndpointOverride', itemIndex, '');
113
122
  const cdpOverride = this.getNodeParameter('cdpOverride', itemIndex, '');
114
123
  const useCDP = credentials.browserMode === 'cdp';
115
124
  const cdpUrl = (cdpOverride || credentials.cdpEndpoint || '').trim();
116
- const mcpEndpoint = (credentials.mcpEndpoint || '').trim();
125
+ const mcpEndpoint = (mcpOverride || credentials.mcpEndpoint || '').trim();
117
126
  if (!mcpEndpoint) {
118
127
  throw new n8n_workflow_1.NodeOperationError(node, 'MCP Endpoint is required in credentials', {
119
128
  itemIndex,
@@ -129,7 +138,12 @@ class SmartBrowserAutomationTools {
129
138
  }
130
139
  catch (error) {
131
140
  const e = error;
132
- throw new n8n_workflow_1.NodeOperationError(node, `Failed to connect to MCP at ${mcpEndpoint} (${useCDP ? 'cdp' : 'launch'}${useCDP ? ` | cdp=${cdpUrl || 'unset'}` : ''}): ${e.message}`, { itemIndex });
141
+ const mode = useCDP ? 'cdp' : 'launch';
142
+ const details = `mcp=${mcpEndpoint} | mode=${mode}${useCDP ? ` | cdp=${cdpUrl || 'unset'}` : ''}`;
143
+ throw new n8n_workflow_1.NodeOperationError(node, `Failed to connect to MCP: ${e.message}`, {
144
+ itemIndex,
145
+ description: details,
146
+ });
133
147
  }
134
148
  const mcpTools = await sessionManager.listTools();
135
149
  if (!mcpTools.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-smart-browser-automation",
3
- "version": "1.6.21",
3
+ "version": "1.6.22",
4
4
  "description": "n8n node for AI-driven browser automation using MCP",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",