Skip to content

Support multi-file uploads for existing-session mode #1217

@hunter-eric

Description

@hunter-eric

Description of the bug

Summary

When using the existing-session browser mode, file uploads currently only support a single file at a time.

Error message

existing-session file uploads currently support one file at a time.

### Reproduction

Attach MCP to an existing Chrome session
Navigate to a page with input[type="file"][multiple]
Confirm the input supports multiple files
Attempt to upload more than one file in a single operation
Observe the error:
existing-session file uploads currently support one file at a time.


### Expectation

If a page contains a file input with the multiple attribute, the MCP upload API should support uploading multiple files in a single call when attached to an existing browser session.

For example, this should work for:

input[type="file"][multiple]
workflows where the site expects all selected files to be set on the same input at once
cases where sequential single-file uploads overwrite the previous selection instead of appending

Why this matters
Many modern sites support multi-file uploads through a hidden input[type="file"] element with multiple=true. In these cases, automations often need to set all files at once.

Single-file-only behavior is not sufficient because:

the browser automation agent cannot interact with the native OS file picker to manually multi-select files
repeated single-file uploads may replace the previous file selection
some upload components require all files to be provided in one operation

### MCP configuration

_No response_

### Chrome DevTools MCP version

0.20.3

### Chrome version

_No response_

### Coding agent version

_No response_

### Model version

_No response_

### Chat log

_No response_

### Node version

_No response_

### Operating system

None

### Extra checklist

- [ ] I want to provide a PR to fix this bug

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions