n8n-io/n8n · error · Error

MCP server "${config.name}": provide either "url" or "comman

Error message

MCP server "${config.name}": provide either "url" or "command"

What it means

Thrown by the Set node validator (v3.3+) when an assignment object has id/name/type but assignment.value is undefined. value is required even when empty — pass an explicit empty string or null rather than omitting it.

Source

Thrown at packages/@n8n/agents/src/runtime/mcp/mcp-connection.ts:281

			const url = new URL(config.url);
			const requestInit: RequestInit | undefined = config.headers
				? { headers: config.headers }
				: undefined;

			if (config.transport === 'streamableHttp') {
				return new sdk.StreamableHTTPClientTransport(url, {
					requestInit,
					fetch: config.fetch,
				});
			}

			return new sdk.SSEClientTransport(url, {
				requestInit,
				fetch: config.fetch,
				eventSourceInit: config.fetch ? { fetch: config.fetch } : undefined,
			});
		}
		throw new Error(`MCP server "${config.name}": provide either "url" or "command"`);
	}
}

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Always set an explicit value, even if it is '' or null.
  2. If computing the value from upstream data, default it (e.g. value: upstream ?? '').
  3. Remove the assignment entirely if it has no value to set.

Example fix

// before — value omitted
assignments: { assignments: [{ id: '1', name: 'note', type: 'string' }] }

// after
assignments: {
  assignments: [{ id: '1', name: 'note', value: '', type: 'string' }],
}
Defensive patterns

Strategy: validation

Validate before calling

function hasValue(a: Record<string, unknown>): boolean {
  return 'value' in a && a.value !== undefined;
}

if (!hasValue(assignment)) throw new Error('Assignment is missing the value field');

Prevention

When it happens

Trigger: assignment.value === undefined for a record assignment that otherwise passed the id/name/type checks. Reported at parameterPath parameters.assignments.assignments[index].value.

Common situations: Building assignments dynamically where a value resolved to undefined; an AI builder treats value as optional; a refactor that drops the value key.

Related errors


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/95cfde1233ae65d5. Report an issue: GitHub.