Skip to main content
Glama
peterparker57

Screenshot MCP Server

This repo is in Read Only mode and has been replaced

Use the WSLSnapIt-MCP repo instead (works better, more features!)

Screenshot MCP Server

A Model Context Protocol (MCP) server that enables AI assistants running in WSL to capture Windows screenshots with advanced features like monitor selection and window-specific capture.

Features

  • 📸 Full Desktop Capture - Capture all monitors (default behavior)

  • 🖥️ Monitor Selection - Capture specific monitors (primary, 1, 2, etc.)

  • 🪟 Window Capture - Capture specific windows by title match with DPI awareness

  • 🚀 Process Capture - Capture windows by process name (e.g., notepad.exe)

  • 📂 Custom Save Locations - Save to any folder using WSL or Windows paths

  • 🔄 Automatic Path Conversion - Converts WSL paths to Windows paths

  • 📁 Organized Storage - Screenshots saved to workspace/screenshots/ by default

  • 🎯 DPI Aware - Proper scaling for high-DPI displays

  • 🖼️ Full Window Capture - Includes window shadows and borders without clipping

Related MCP server: MCP Screenshot Server

Prerequisites

  • Windows with WSL (Windows Subsystem for Linux)

  • Node.js installed in WSL

  • Claude Desktop or Claude Code with MCP support

Installation

  1. Clone this repository:

git clone https://github.com/peterparker57/screenshot-mcp.git
cd screenshot-mcp
  1. Install dependencies:

npm install
# or with bun:
bun install
  1. Add to your Claude configuration (~/.claude.json or ~/.claude/claude_desktop_config.json):

{
  "mcpServers": {
    "screenshot": {
      "command": "node",
      "args": [
        "/path/to/screenshot-mcp/index.js"
      ],
      "disabled": false,
      "alwaysAllow": [
        "take_screenshot"
      ]
    }
  }
}
  1. Restart Claude Desktop/Code

Usage

Once installed, you can ask Claude to take screenshots:

Basic Usage

Take a screenshot

Capture Specific Monitor

Take a screenshot of monitor 1
Take a screenshot of the primary monitor

Capture Specific Window by Title

Take a screenshot of the "Chrome" window
Take a screenshot of window titled "Visual Studio Code"

Capture Specific Window by Process Name

Take a screenshot of notepad.exe
Take a screenshot of the chrome process
Take a screenshot of process "Code"

Custom Filename

Take a screenshot and save it as "test.png"

Save to Custom Folder

Take a screenshot and save it to /mnt/c/Users/username/Pictures/
Take a screenshot and save to C:\Users\username\Desktop\
Take a screenshot of monitor 1 and save to folder "../docs/images"

API Reference

The MCP server provides a single tool:

take_screenshot

Parameters:

  • filename (optional): Name for the screenshot file (default: "screenshot.png")

  • monitor (optional): Which monitor to capture

    • "all" - Capture all monitors (default)

    • "primary" - Capture primary monitor only

    • 1, 2, etc. - Capture specific monitor by index

  • windowTitle (optional): Capture a specific window by its title (partial match supported)

  • processName (optional): Capture a specific window by process name (e.g., "notepad.exe" or "notepad")

  • folder (optional): Custom folder path to save the screenshot

    • Supports WSL paths: /mnt/c/Users/...

    • Supports Windows paths: C:\Users\...

    • Supports relative paths: ../images

    • Default: workspace/screenshots/

Returns:

  • Success message with the file path

  • Error message if capture fails

Notes:

  • If both windowTitle and processName are provided, windowTitle takes precedence

  • Custom folders are created automatically if they don't exist

  • Path formats are automatically converted between WSL and Windows as needed

Technical Details

Architecture

  • MCP Server: Node.js with @modelcontextprotocol/sdk

  • Screenshot Capture: PowerShell with .NET Windows Forms

  • Communication: Executes PowerShell commands from WSL

  • Encoding: Base64 encoding for reliable command execution

Window Capture Features

  • DPI Awareness: Automatically handles high-DPI displays for crisp captures

  • Window Padding: Adds 10px padding to capture window shadows and borders

  • Render Wait: Waits 200ms after focusing window to ensure complete rendering

  • Bounds Checking: Prevents negative coordinates when windows are near screen edges

  • Process Matching: Intelligent process name matching (strips .exe extension automatically)

How It Works

  1. MCP server receives screenshot request from Claude

  2. Determines save location (custom folder or default)

  3. Converts paths between WSL and Windows formats as needed

  4. Constructs appropriate PowerShell script based on parameters

  5. Encodes script in base64 to avoid escaping issues

  6. Executes PowerShell command from WSL

  7. PowerShell captures screenshot using Windows Forms APIs

  8. Image is saved to the specified location

Error Handling

  • Filters PowerShell CLIXML output (verbose logging, not errors)

  • Validates monitor indices

  • Provides clear error messages for missing windows or processes

  • Lists available windows when capture fails

  • Automatically creates directories if needed

  • Handles both WSL and Windows path formats

Troubleshooting

Screenshots folder not created

The server automatically creates folders as needed. Ensure you have write permissions to the target location.

PowerShell execution errors

Check your PowerShell execution policy:

Get-ExecutionPolicy

Window not found errors

  • Ensure the window is open and not minimized

  • The title match is case-insensitive and supports partial matches

  • Try using a more specific window title

  • When searching by process, the tool will list all available windows to help you identify the correct one

Window capture is clipped

The latest version includes automatic padding and DPI awareness. If you still experience clipping:

  • Ensure you're using the latest version

  • Try maximizing the window before capture

  • Check if the window has unusual rendering (some apps use custom chrome)

Path conversion issues

The server automatically converts between WSL and Windows path formats:

  • WSL paths like /mnt/c/... are converted to C:\... for PowerShell

  • Windows paths like C:\... are converted to /mnt/c/... for file verification

  • Ensure your paths are accessible from both WSL and Windows

Recent Updates

v1.2.0

  • Added custom folder support with the folder parameter

  • Supports both WSL paths (/mnt/...) and Windows paths (C:\...)

  • Automatic path conversion between WSL and Windows formats

  • Creates custom directories automatically if they don't exist

  • Maintains backward compatibility with default screenshots folder

v1.1.0

  • Added process name capture support

  • Can now capture windows by process name (e.g., "notepad.exe")

  • Intelligent .exe extension handling

  • Enhanced error messages showing available windows

v1.0.1

  • Fixed window capture clipping issues

  • Added DPI awareness for high-DPI displays

  • Added padding to capture window shadows

  • Improved window rendering wait time

  • Added bounds checking for edge cases

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

Acknowledgments

Available Tools

1 tool
take_screenshotC

Take a screenshot of all monitors, specific monitor, or a specific window

ParametersJSON Schema
NameRequiredDescriptionDefault
filenameNoFilename for the screenshot (default: screenshot.png)screenshot.png
monitorNoWhich monitor to capture: "all" (default), "primary", or monitor number (1, 2, etc.)all
windowTitleNoCapture a specific window by its title (partial match supported)
processNameNoCapture a specific window by process name (e.g., "notepad.exe" or just "notepad")
folderNoCustom folder path to save the screenshot (supports both WSL and Windows paths). Defaults to workspace/screenshots/

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'take a screenshot' implies a read operation, it doesn't address permissions needed, whether it requires user interaction, file system access implications, or what happens on failure. The description lacks important behavioral context for a tool that interacts with the display system.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that clearly states the tool's purpose with zero wasted words. It's appropriately sized and front-loaded with the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns, error conditions, or important behavioral aspects like whether it requires specific permissions or has system dependencies. The description should provide more context given the complexity of interacting with display systems.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the input schema already documents all 5 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema, so it meets the baseline expectation but doesn't provide extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('take') and resource ('screenshot') with specific scope options ('all monitors, specific monitor, or a specific window'). It's unambiguous about what the tool does, though without sibling tools to differentiate from, it can't achieve the highest differentiation score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or constraints. It simply states what the tool does without context about appropriate use cases or limitations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.2.0
    • First observedtake_screenshot

TDQS

B3.1/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap between tools. The tool 'take_screenshot' has a single, clear purpose that cannot be mistaken for any other tool in this set.

Naming Consistency5/5

Since there is only one tool, naming consistency is inherently perfect. The tool name 'take_screenshot' follows a clear verb_noun pattern, and there are no other tools to compare it against for inconsistency.

Tool Count2/5

A single tool is too few for a server with the apparent scope of screenshot functionality, which could reasonably include operations like capturing specific regions, saving in different formats, or managing screenshots. This minimal set feels thin and may limit agent capabilities.

Completeness2/5

The tool surface is severely incomplete for a screenshot domain. While 'take_screenshot' covers basic capture, there are obvious gaps such as saving screenshots to files, capturing specific areas, or handling multiple screenshots, which could lead to agent failures in more complex tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables LLMs to capture and analyze screenshots of your screen, windows, or regions with smart detection capabilities. Features natural language queries, automatic window targeting, and text enhancement for UI debugging and visual inspection.
    2
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to capture and analyze screen content across multi-monitor setups with smart image optimization. Provides screenshot capabilities and detailed monitor information for visual debugging, UI analysis, and desktop assistance.
    -
  • A
    license
    A
    quality
    F
    maintenance
    Enables AI assistants to capture screenshots and read clipboard content from Windows applications while operating within a WSL environment. It supports monitor or window-specific targeting and features intelligent image optimization for efficient data transfer.
    2
    5
    MIT