Skip to content

Expose browser filesystem through MCP - #144

Open
masnwilliams wants to merge 2 commits into
mainfrom
hypeship/expose-browser-files
Open

Expose browser filesystem through MCP#144
masnwilliams wants to merge 2 commits into
mainfrom
hypeship/expose-browser-files

Conversation

@masnwilliams

@masnwilliams masnwilliams commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

summary

  • add a manage_browser_files MCP tool backed by the existing browser filesystem SDK
  • support text and base64 writes/uploads, embedded-resource downloads, directory archives, and filesystem management actions
  • register the toolset and document the new model-facing capability

testing

  • bun test (90 tests passed)
  • bunx tsc --noEmit
  • targeted Prettier check for changed files
  • bun run build compiled and typechecked successfully, then stopped during page-data collection because KERNEL_CLI_PROD_CLIENT_ID is not set in the local environment

Note

Medium Risk
Destructive VM filesystem actions (delete, move, permission changes) are exposed to authenticated MCP clients; behavior is bounded to per-session browser VMs but misuse or path mistakes could affect automation artifacts.

Overview
Introduces manage_browser_files, a new manage_* MCP tool that exposes filesystem operations on running browser VMs via client.browsers.fs. Models can list, inspect, read, write, upload (including multi-file and zip extract), download files or directory zips, and perform moves, deletes, mkdir, and permission changes—all scoped by session_id and an action parameter.

Read vs download: text reads return plain text; download and download_dir_zip return embedded MCP resources (kernel-browser-file://… URIs with base64 blobs). Writes and uploads accept utf8 or base64 content (with validation before hitting the API), since the server cannot read the caller’s local paths.

Registration adds the browser_files toolset (aliases browser_fs, manage_browser_files), updates the disabled-toolsets test list, and bumps the README model-facing tool count to 18.

Reviewed by Cursor Bugbot for commit 34756cd. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mcp Ready Ready Preview Aug 7, 2026 6:14pm

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7e50277. Configure here.

Comment thread src/lib/mcp/tools/browser-files.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant