[FEATURE] Add filePath parameter to Claude Code's built-in browser screenshot tool
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Claude Code's built-in browser integration (the Chrome extension) has a computer tool with a screenshot action that captures the viewport and returns an in-memory imageId. However, there is no way to save that screenshot to a file on the local filesystem.
This blocks any workflow where Claude Code needs to capture browser screenshots and save them as project assets — for example, generating documentation with UI screenshots, building ebooks, or capturing authenticated page states for testing.
The screenshot is visible to the AI in conversation context but cannot be persisted to disk in any supported way.
Proposed Solution
Add an optional filePath parameter to the computer tool's screenshot action:
computer
action: screenshot
tabId: 12345
filePath: "/path/to/project/assets/screenshot.png"
When filePath is provided, save the screenshot PNG to that path on disk (in addition to returning the imageId as today). When omitted, current behavior is preserved — no breaking change.
The native messaging host already has filesystem access for other Claude Code operations, so adding a file-write for screenshot data should be straightforward.
Alternative Solutions
Workarounds tried — all fragile or broken:
- html2canvas via JavaScript execution — breaks on cross-origin resources and CSP restrictions on most modern sites (ChatGPT, Gemini, etc.)
- GIF creator with download — produces GIF format (not PNG), includes visual overlays (click indicators, watermark), saves to Downloads instead of target directory
- Upload image tool — uploads screenshot to web form inputs only, cannot target local filesystem
Priority
High - Significant impact on productivity
Feature Category
MCP server integration
Use Case Example
- I'm building an ebook about AI tools that needs UI screenshots of ChatGPT, Gemini, ElevenLabs, HeyGen
- These pages require authentication — only Claude Code's built-in browser can access them (it uses the user's real logged-in Chrome session)
- I need to capture these screens and save them as PNG files in my project's
assets/directory - Currently I can SEE the screenshots in conversation but cannot SAVE them to disk
- With
filePath, the workflow would be: navigate → screenshot with filePath → done
Additional Context
The third-party chrome-devtools-mcp server already implements this exact pattern via its take_screenshot tool with a filePath parameter (added in their PR #172). However, that MCP server runs a separate browser instance without the user's logged-in session, so it cannot capture authenticated pages. Claude Code's built-in browser is the only one with session state, making this feature essential.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗