All skills
Skillintermediate

@n8n/computer-use

Computer Use for n8n Assistant. Bridges a remote n8n instance with your local machine — filesystem, shell, screenshots, mouse/keyboard, and browser automation.

Claude Code Knowledge Pack7/10/2026

Overview

@n8n/computer-use

Computer Use for n8n Assistant. Bridges a remote n8n instance with your local machine — filesystem, shell, screenshots, mouse/keyboard, and browser automation.

Why

n8n Assistant runs in the cloud but may need access to your local environment: reading project files, running shell commands, capturing screenshots, controlling the browser, or using mouse and keyboard. This gateway exposes these capabilities as tools that the agent can call remotely over a secure SSE connection.

Capabilities

CapabilityToolsPlatformDefault Permission
Filesystem (read)read_file, list_files, get_file_tree, search_filesAllallow
Filesystem (write)write_file, edit_file, create_directory, delete, move, copy_fileAllask
Shellshell_executeAlldeny
Computerscreen_screenshot, screen_screenshot_region, mouse_move, mouse_click, mouse_double_click, mouse_drag, mouse_scroll, keyboard_type, keyboard_key_tap, keyboard_shortcutmacOS, Linux (X11), Windowsdeny
Browser32 browser automation toolsAllask

Modules that require native dependencies (screenshot, mouse/keyboard) are automatically disabled when their platform requirements aren't met.

Quick start

Daemon mode (recommended)

Start the daemon with your n8n instance URL. n8n will connect to the daemon on 127.0.0.1:7655 when the AI needs local machine access.

# The start command is shown inside n8n AI — replace with your instance URL
npx @n8n/computer-use https://my-instance.app.n8n.cloud

# For local development (localhost is not in the default allowlist)
npx @n8n/computer-use http://localhost:5678 --allowed-origins http://localhost:5678

# Specify a working directory
npx @n8n/computer-use https://my-instance.app.n8n.cloud --dir /path/to/project
npx @n8n/computer-use https://my-instance.app.n8n.cloud -d /path/to/project

# Non-interactive (uses Recommended defaults, override with --permission-* flags)
npx @n8n/computer-use https://my-instance.app.n8n.cloud --non-interactive --permission-shell ask

Direct mode

Connect directly to an n8n instance with a Computer Use token:

npx @n8n/computer-use https://my-n8n.com abc123xyz /path/to/project

Configuration

All configuration follows three-tier precedence: defaults < env vars < CLI flags.

CLI flags

Global

FlagDefaultDescription
--log-level <level>infoLog level: silent, error, warn, info, debug
--allowed-origins <patterns>https://*.app.n8n.cloudComma-separated allowed origin patterns (CLI only)
-p, --port <port>7655Daemon port (daemon mode only)
--non-interactiveSkip all prompts; use defaults and env/CLI overrides
--auto-confirmAuto-confirm all resource access prompts
-h, --helpShow help

Filesystem

FlagDefaultDescription
--dir <path>, -d.Root directory for filesystem tools and shell execution

Permissions

Each capability has an independent permission mode (deny \| ask \| allow):

FlagDefaultDescription
--permission-filesystem-read <mode>allowFilesystem read access
--permission-filesystem-write <mode>askFilesystem write access
--permission-shell <mode>denyShell execution
--permission-computer <mode>denyComputer control (screenshot, mouse/keyboard)
--permission-browser <mode>askBrowser automation

Computer use

FlagDefaultDescription
--computer-shell-timeout <ms>30000Shell command timeout

Browser

FlagDefaultDescription
--browser-default <name>chromeDefault browser

Environment variables

All options can be set via N8N_GATEWAY_* environment variables. CLI flags take precedence.

Env varMaps to
N8N_GATEWAY_LOG_LEVEL--log-level
N8N_GATEWAY_FILESYSTEM_DIR--dir
N8N_GATEWAY_COMPUTER_SHELL_TIMEOUT--computer-shell-timeout
N8N_GATEWAY_BROWSER_DEFAULT--browser-default
N8N_GATEWAY_AUTO_CONFIRM--auto-confirm (set to true)
N8N_GATEWAY_NON_INTERACTIVE--non-interactive (set to true)
N8N_GATEWAY_PERMISSION_FILESYSTEM_READ--permission-filesystem-read
N8N_GATEWAY_PERMISSION_FILESYSTEM_WRITE--permission-filesystem-write
N8N_GATEWAY_PERMISSION_SHELL--permission-shell
N8N_GATEWAY_PERMISSION_COMPUTER--permission-computer
N8N_GATEWAY_PERMISSION_BROWSER--permission-browser

Note: --allowed-origins is CLI-only and cannot be configured via environment variables. This is intentional — it prevents a malicious actor from overriding the allowlist via an env var.

Module reference

Filesystem (read)

Read-only access to files within a sandboxed directory.

ToolDescription
read_fileRead file contents (max 512 KB, paginated by line range)
list_filesList immediate children of a directory
get_file_treeGet indented directory tree (configurable depth)
search_filesRegex search across files with optional glob filter

Filesystem (write)

Write access within the specified directory. Requires --permission-filesystem-write ask or allow.

ToolDescription
write_fileCreate or overwrite a file (parent directories created automatically)
edit_fileTargeted search-and-replace on an existing file
create_directoryCreate a directory (idempotent, parents created automatically)
deleteDelete a file or directory recursively
moveMove or rename a file or directory
copy_fileCopy a file to a new path

All write operations are subject to the same path-scoping rules as read operations — paths outside the configured root are rejected.

Shell

Execute shell commands with configurable timeout.

ToolDescription
shell_executeRun a shell command, returns stdout/stderr/exitCode

Screenshot

Capture screen contents (requires a display and node-screenshots).

ToolDescription
screen_screenshotFull-screen capture as base64 PNG
screen_screenshot_regionCapture a specific region (x, y, width, height)

Mouse & keyboard

Low-level input control (requires @jitsi/robotjs).

ToolDescription
mouse_moveMove cursor to coordinates
mouse_clickClick at coordinates (left/right/middle)
mouse_double_clickDouble-click at coordinates
mouse_dragDrag from one point to another
mouse_scrollScroll at coordinates
keyboard_typeType a string of text
keyboard_key_tapPress a key with optional modifiers
keyboard_shortcutPress a keyboard shortcut

Browser

Full browser automation via @n8n/mcp-browser (32 tools). Supports Chromium, Firefox, Safari, and WebKit across ephemeral, persistent, and local session modes.

See the @n8n/mcp-browser docs for the complete tool reference.

Permissions

The gateway uses a two-tier permission model.

Tool group permission modes

Each capability has an independent mode saved to ~/.n8n-gateway/settings.json.

ModeBehavior
denyCapability disabled. Tools are not registered; the AI has no knowledge of them.
askTools are registered. Before each tool execution the user is prompted to confirm. Existing resource-level rules are applied automatically.
allowTools are registered. All tool calls execute without confirmation. Permanently stored always deny resource-level rules still take precedence.

The gateway will not connect unless at least one capability is set to ask or allow.

Resource-level rules

When a capability is in ask mode, confirmation is scoped to a resource: the domain for browser tools, the normalized command for shell, or the path for filesystem write operations.

RuleEffectPersistence
Allow onceExecute this specific invocation onlyNot stored
Allow for sessionExecute all invocations of this resource until disconnectedIn-memory
Always allowExecute all future invocations of this resourceSaved to settings file
Deny onceBlock this specific invocation onlyNot stored
Always denyBlock all future invocations of this resourceSaved to settings file

Always deny rules take precedence over the tool group mode — a blocked resource is rejected even when the capability is set to allow.

Prerequisites

Filesystem & shell

No extra dependencies — works on all platforms.

Screenshot

Requires a display server. Automatically disabled when no monitors are detected.

Mouse & keyboard

Uses @jitsi/robotjs which needs native build tools:

  • macOS: Xcode Command Line Tools
  • Linux: libxtst-dev, X11 (not supported on Wayland without XWayland)
  • Windows: Visual Studio Build Tools

Automatically disabled when robotjs is unavailable.

Browser

Requires Playwright browsers (for ephemeral/persistent modes):

npx playwright install chromium firefox

For local browser modes, see the @n8n/mcp-browser prerequisites.

Development

pnpm dev    # build, watch for changes, and start daemon on localhost:5678
pnpm build  # production build
pnpm test   # run tests
pnpm start  # start daemon for localhost:5678 (requires prior build)