FlowiseAI/Flowise · error · Error
Custom MCP script execution disabled. Configure CUSTOM_MCP_A
Error message
Custom MCP script execution disabled. Configure CUSTOM_MCP_ALLOWED_ABSOLUTE_SCRIPT_PATHS environment variable.
What it means
Thrown by validateArgsForLocalFileAccess when CUSTOM_MCP_ALLOWED_ABSOLUTE_SCRIPT_PATHS is unset or empty. The function splits that env var on commas to build allowedScriptPaths; an empty list means script-style local MCP execution is fully disabled by default, so any call to a script-path-based MCP server is refused.
Source
Thrown at packages/components/nodes/tools/MCP/core.ts:257
},
{
name: name,
description: description,
schema: argsSchema
}
)
}
export const validateArgsForLocalFileAccess = (args: string[]): void => {
const allowedScriptPaths = (process.env.CUSTOM_MCP_ALLOWED_ABSOLUTE_SCRIPT_PATHS ?? '')
.split(',')
.map((s) => s.trim())
.filter(Boolean)
const scriptArg = args[0]
if (allowedScriptPaths.length === 0)
throw new Error('Custom MCP script execution disabled. Configure CUSTOM_MCP_ALLOWED_ABSOLUTE_SCRIPT_PATHS environment variable.')
if (!allowedScriptPaths.includes(scriptArg)) throw new Error('Custom MCP script path not in allowed list.')
}
export const validateCommandInjection = (args: string[]): void => {
const dangerousPatterns = [
// Shell metacharacters
/[;&|`$(){}[\]<>]/,
// Command chaining
/&&|\|\||;;/,
// Redirections
/>>|<<|>/,
// Backticks and command substitution
/`|\$\(/,
// Process substitution
/<\(|>\(/
]
View on GitHub (pinned to abe4a8601a)
Solutions
- Set CUSTOM_MCP_ALLOWED_ABSOLUTE_SCRIPT_PATHS to a comma-separated list of absolute script paths you trust (e.g. /opt/mcp/server.js).
- Confirm the script path passed as args[0] exactly matches an entry in that list (no trailing slash, absolute).
- If script execution is not required, route the MCP server through an allowed command instead and leave the list empty.
Example fix
# before # CUSTOM_MCP_ALLOWED_ABSOLUTE_SCRIPT_PATHS= # after CUSTOM_MCP_ALLOWED_ABSOLUTE_SCRIPT_PATHS=/opt/mcp/server.js,/opt/mcp/other.js
Defensive patterns
Strategy: validation
Validate before calling
const allowed = (process.env.CUSTOM_MCP_ALLOWED_ABSOLUTE_SCRIPT_PATHS ?? '').split(',').map(s => s.trim()).filter(Boolean)
if (allowed.length === 0) {
throw new Error('Configure CUSTOM_MCP_ALLOWED_ABSOLUTE_SCRIPT_PATHS before enabling script-based MCP servers')
} Type guard
const scriptExecutionEnabled = (): boolean => (process.env.CUSTOM_MCP_ALLOWED_ABSOLUTE_SCRIPT_PATHS ?? '').split(',').map(s => s.trim()).filter(Boolean).length > 0 Try / catch
try {
validateArgsForLocalFileAccess(args)
} catch (e) {
if (e.message.includes('Custom MCP script execution disabled')) {
// operator must populate CUSTOM_MCP_ALLOWED_ABSOLUTE_SCRIPT_PATHS
}
throw e
} Prevention
- Decide upfront whether script-based MCP servers are allowed and configure the env accordingly.
- Document the exact absolute paths operators should allow-list.
- Run a config check at worker boot that fails fast if a script MCP node is enabled but the allow-list is empty.
When it happens
Trigger: validateArgsForLocalFileAccess is invoked with any args array while CUSTOM_MCP_ALLOWED_ABSOLUTE_SCRIPT_PATHS is unset or empty. Reached via validateMCPServerConfig when serverParams.args is a non-empty array.
Common situations: Default deployment where the operator has not opted into local script MCP servers; env var misspelled; a custom MCP node pointing at a local .js/.py script before the allow-list is configured.
Related errors
- Environment variable '${key}' is not allowed. Permitted: ${[
- Command '${serverParams.command}' is not allowed. Permitted:
- Security validation failed: ${error.message}
- Custom MCP script path not in allowed list.
- Invalid server configuration
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/67c946a381ce8627.
Report an issue: GitHub.