Capture screenshots and read the clipboard on Windows from within a WSL environment.
WSLSnapit-MCP is a powerful Model Context Protocol (MCP) server that provides advanced screenshot capture and clipboard reading capabilities for Windows applications from within WSL environments. It enables AI assistants to capture screens, windows, and monitors with intelligent image processing and optimization, as well as read text and images from the Windows clipboard.
# Clone the repository
git clone https://github.com/yourusername/WSLSnapit-MCP.git
cd WSLSnapit-MCP
# Install dependencies
npm install
# or
yarn install
# or
bun install
Add the following to your Claude Desktop configuration file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"wslsnapit": {
"command": "wsl",
"args": [
"--cd",
"/mnt/h/dev/mcp/wslsnapit-mcp",
"node",
"index.js"
]
}
}
}
Note: Adjust the path /mnt/h/dev/mcp/wslsnapit-mcp
to match your installation location.
The take_screenshot
tool supports various capture modes:
// Capture all monitors (default)
take_screenshot()
// Capture primary monitor only
take_screenshot({ monitor: "primary" })
// Capture specific monitor (1, 2, 3, etc.)
take_screenshot({ monitor: 2 })
// Capture window by title (partial match)
take_screenshot({ windowTitle: "Visual Studio" })
// Capture window by process name
take_screenshot({ processName: "notepad" })
// Handle multiple matching windows
take_screenshot({ windowTitle: "Chrome", windowIndex: 2 })
// Return image directly (default)
take_screenshot({ returnDirect: true })
// Save to file
take_screenshot({
returnDirect: false,
filename: "myshot.png",
folder: "/home/user/screenshots"
})
// Control JPEG quality (for direct return)
take_screenshot({
returnDirect: true,
quality: 90
})
The read_clipboard
tool supports both text and image content:
// Auto-detect clipboard content (default)
read_clipboard()
// Force text reading
read_clipboard({ format: "text" })
// Force image reading
read_clipboard({ format: "image" })
Parameter | Type | Default | Description |
---|---|---|---|
filename | string | "screenshot.png" | Filename when saving to disk |
monitor | string|number | "all" | Monitor selection: "all", "primary", or monitor number |
windowTitle | string | - | Capture window by title (partial match) |
windowIndex | number | 1 | Which window to capture when multiple match |
processName | string | - | Capture window by process name |
folder | string | - | Custom folder path (supports WSL and Windows paths) |
returnDirect | boolean | true | Return image to AI or save to disk |
quality | number | 80 | JPEG quality (1-100) for direct return |
Parameter | Type | Default | Description |
---|---|---|---|
format | string | "auto" | Format: "auto", "text", or "image" |
WSLSnapit-MCP is designed with security in mind:
"No windows found" error
Large screenshots fail to return
Clipboard reading returns empty
Path not found errors
/mnt/c/
for C: driveTo run with debug output:
DEBUG=* node index.js
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ for the WSL and MCP community
Interact with the Umbraco CMS Management API for administrative tasks.
Manage schedules using the Dooray API. Requires API key, member ID, and calendar ID to be configured.
Interact with data in Attio, the AI-native CRM, enabling AI assistants to access and manage your customer relationship information.
A containerized MCP server for Microsoft 365, featuring OAuth authentication and OpenTelemetry instrumentation for monitoring.
Captures screenshots and performs OCR text recognition.
Manage Obsidian vaults with knowledge graph operations and AI-powered features.
A modular MCP server for task orchestration, API integration, and knowledge synthesis using a finite state machine.
Interact with Google Workspace services like Gmail and Google Calendar.
Time and timezone conversion capabilities
Access and manage your VISO TRUST third-party risk program directly through your AI assistant.