fix: complete screenshot feature with missing GDScript autoload#65
Open
sajadghawami wants to merge 2 commits intoCoding-Solo:mainfrom
Open
fix: complete screenshot feature with missing GDScript autoload#65sajadghawami wants to merge 2 commits intoCoding-Solo:mainfrom
sajadghawami wants to merge 2 commits intoCoding-Solo:mainfrom
Conversation
Add a new MCP tool that captures screenshots from running Godot projects using Godot's native viewport capture API instead of external screen capture libraries. Features: - Uses file-based IPC to communicate with running Godot project - Cross-platform support (Windows, macOS, Linux) - Returns screenshot as base64 image or saves to specified path - Requires ScreenshotManager autoload in the Godot project The implementation works by: 1. Creating a trigger file in Godot's user:// directory 2. ScreenshotManager autoload detects the file and captures viewport 3. Screenshot is saved and read back by the MCP server Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add screenshot_manager.gd that captures viewport via file-based IPC - Add setup_screenshot_manager tool to install autoload into projects - Update build.js to copy screenshot_manager.gd to build/scripts - Improve error messages with clearer setup instructions - Remove unused dependencies (screenshot-desktop, axios) - Delete unused screenshot-desktop.d.ts type declarations - Add Claude Code files to .gitignore The take_screenshot tool now works by: 1. User calls setup_screenshot_manager to install the autoload 2. User runs the project with run_project 3. User calls take_screenshot which creates a request file 4. The GDScript autoload detects the request and captures the viewport 5. Screenshot is returned as base64 PNG or saved to file Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the
take_screenshottool from PR #62 which didn't work because:ScreenshotManagerGDScript autoload was never providedscreenshot-desktop,axios) were added but never usedThis PR completes the feature by:
screenshot_manager.gd- GDScript autoload that captures viewport via file-based IPCsetup_screenshot_managertool to automatically install the autoload into projectsHow it works
setup_screenshot_managerwith project path to install the autoloadrun_projecttake_screenshotto capture the viewportTest plan
setup_screenshot_managercopies script and configures autoload in project.godotrun_projectlaunches Godot projecttake_screenshotcaptures viewport and returns base64 PNGstop_projectstops the running projectCloses #62
🤖 Generated with Claude Code