Skip to content

feat(snap-happy): Windows/WSL2 support and MCP tool annotations #53

@bryankthompson

Description

@bryankthompson

Summary

I've developed comprehensive Windows and WSL2 support for snap-happy, along with MCP tool annotations. These changes are currently in my standalone fork at triepod-ai/snap-happy-mcp.

Features Added

1. Windows/WSL2 Support

  • WSL2 detection via WSL_DISTRO_NAME environment variable
  • Automatic path conversion from WSL paths (/mnt/c/) to Windows paths (C:\)
  • Window-specific capture on Windows using PrintWindow Win32 API via PowerShell
  • ListWindows on Windows - enumerates visible windows with handles
  • PowerShell temp script handling with proper cleanup

2. MCP Tool Annotations

Added annotations to all three tools per MCP specification:

Tool title readOnlyHint destructiveHint idempotentHint openWorldHint
GetLastScreenshot "Get Last Screenshot" true - - false
TakeScreenshot "Take Screenshot" false false false false
ListWindows "List Windows" true - - false

Current Upstream Limitation

The upstream currently only supports full-screen capture on Windows/Linux, with window-specific capture limited to macOS.

Contribution Approach

Since my fork is a standalone repo and this is a monorepo, I can't create a direct PR. I'm happy to:

  1. Provide patches/diffs for manual integration
  2. Fork this repo and create a proper PR with the changes ported over
  3. Collaborate on integration in whatever way works best

Reference Implementation

Full implementation available at: https://github.com/triepod-ai/snap-happy-mcp

Key files:

  • src/screenshot.ts - Windows/WSL2 screenshot implementation
  • src/tools.ts - MCP tool annotations

Let me know how you'd like to proceed!

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions