feat: add proxy for native Gyazo MCP server tools #52
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.
This pull request introduces native screen capture and upload functionality for Gyazo on Windows and macOS, integrating it into the existing toolset. The changes include a new module for managing the native MCP server, updates to the tool handlers to support capture-related operations, and enhancements to ensure graceful shutdown of resources.
New Native Capture Integration
GyazoNativeMCPServer
class: Added a singleton class insrc/capture-proxy.ts
to manage the lifecycle of the native MCP server, including initialization, request handling, and cleanup. It supports operations such as listing capturable windows, capturing the primary screen, capturing a selected region, and capturing a specific window.Tool Handler Updates
listToolsHandler
insrc/handlers/tools.ts
to dynamically include native capture tools if the MCP server is available. These tools allow users to perform screen capture operations and upload results to Gyazo. [1] [2]gyazo_list_capturable_windows
,gyazo_capture_and_upload_primary_screen
,gyazo_capture_and_upload_region
, andgyazo_capture_and_upload_window
) to process requests and interact with the MCP server. [1] [2]Graceful Shutdown Enhancements
src/index.ts
to ensure the MCP server is properly shut down during application termination (e.g., onSIGINT
,SIGTERM
, or process exit).Type Definitions
CapturableWindow
andCaptureUploadResponse
types insrc/types.ts
to standardize data structures for capturable windows and capture responses.