screen-mcp
Provides interaction with Hyprland's window manager, enabling enumeration of windows via hyprctl and capturing screenshots of specific windows, regions, or the full screen.
Offers screen capture capabilities on Wayland compositors using grim (wlroots screencopy protocol), supporting region, window, and fullscreen screenshots.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@screen-mcptake a screenshot of the focused window and describe what's on it"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
screen-mcp
An MCP (Model Context Protocol) server that gives AI agents eyes on an
Omarchy / Hyprland Wayland desktop. It captures screenshots via grim and
offers optional image analysis powered by the Gemini API — useful when the
calling model has no native vision encoder.
Features
Tool | What it does | Returns |
| Enumerate Hyprland windows via | Text listing with addresses, titles, workspaces, sizes |
| Capture a pixel rectangle | Inline PNG image (base64) |
| Capture a window by title, class, address, or | Inline PNG image (base64) |
| Capture the entire screen | Inline PNG image (base64) |
| Send an image (base64 or file path) to Gemini for reasoning | Text response |
| Capture a region and analyze it in one call | Text (Gemini response) |
Screenshots use grim (wlroots screencopy protocol) — no X11 required.
Related MCP server: Wayland MCP Server
Prerequisites
Omarchy, Hyprland, or any wlroots-based Wayland compositor
grim— Wayland screenshot toolslurp— (optional) interactive region selection helperhyprctl— Hyprland window/query CLIjq— (optional) used by some helper scripts
Check with:
grim --help && hyprctl clients -j | head -c 20For image analysis (optional)
A Gemini API key — get one at https://aistudio.google.com
Export it in your environment:
export GEMINI_API_KEY="your-api-key-here"Without the key, the screenshot tools still work; only analyze_image and
screenshot_and_analyze will return an error.
Installation
Via Claude Desktop
Add this to your Claude Desktop claude_desktop_config.json:
{
"mcpServers": {
"screen-mcp": {
"command": "npx",
"args": ["-y", "screen-mcp"],
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}Via npx
npx -y screen-mcp
# Or install globally:
npm install -g screen-mcpUsage examples
Capture a screen region
screenshot_region(x=100, y=200, width=800, height=600, include_cursor=true)Capture a specific window
First list available windows to get an address or title:
list_windows()Then capture by title (substring match), address, or "focused":
screenshot_window(window="Spotify")
screenshot_window(window="focused")
screenshot_window(window="0x557ba79b4900")Analyze an image with Gemini
analyze_image(
image_path="/tmp/my-screenshot.png",
prompt="What applications are visible in this screenshot?",
model="gemini-2.5-flash"
)Or pass base64-encoded image data directly:
analyze_image(
image="<base64-encoded-image>",
prompt="Describe what you see in this image.",
mime_type="image/png"
)Capture and analyze in one call
screenshot_and_analyze(
x=0, y=0, width=1920, height=1080,
prompt="Count the number of windows open and list their titles.",
scale=0.5,
model="gemini-2.5-flash"
)Development
# Install deps
npm install
# Build
npm run build
# Run
npm start
# Development (recompile on change)
npm run devHow it works
Capture:
src/capture.tswrapsgrim(screenshots) andhyprctl(window enumeration). Window capture first triesgrim -T <stableId>(foreign-toplevel handle), falling back togrim -g "<x>,<y> <w>x<h>"(geometry from hyprctl).Analysis:
src/gemini.tsuses the official@google/genaiSDK. Images are passed inline as base64 to the Gemini API'sinteractions.createendpoint.Server:
src/index.tswires everything together as a stdio-transported MCP server using@modelcontextprotocol/server.
License
MIT
Available Tools
6 toolsanalyze_imageAnalyze Image (Gemini)ARead-only
Send an image to the Gemini API for visual reasoning. Useful when the calling model has no native image encoder. Provide either a base64-encoded image or a local file path.
| Name | Required | Description | Default |
|---|---|---|---|
| image | No | Base64-encoded image data | |
| model | No | Gemini model to use (default: gemini-2.5-flash) | |
| prompt | Yes | What to analyze or ask about the image | |
| mime_type | No | MIME type of the image (e.g. image/png, image/jpeg) | image/png |
| image_path | No | Path to a local image file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare read-only and non-destructive behavior, lowering the bar for description. The description adds that it uses the Gemini API and accepts either base64 or file path, which is useful but does not disclose potential external API costs, rate limits, or error behaviors. No contradiction with annotations; score reflects minimal but adequate transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with purpose and a clear use case. No wasted words; every clause adds value (purpose, use case, input methods). Perfectly concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple (5 params, 1 required) with good annotations and full schema coverage. The description adequately covers the essential input options and purpose. It does not mention edge cases or error handling, but given the simplicity and existing structured metadata, it is complete enough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema descriptions cover all parameters (100% coverage), setting a baseline of 3. The description adds a note about providing either base64 or file path, which clarifies the mutual exclusivity of image and image_path, but this is a minor addition. It does not significantly enhance understanding beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool sends an image to the Gemini API for visual reasoning, with specific input methods (base64 or file path). This distinguishes it from sibling screenshot tools, which capture images rather than analyze existing ones, and aligns with the context signal that the calling model may lack an image encoder.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on when to use the tool ('when the calling model has no native image encoder') but does not explicitly name alternatives or state when not to use it. This meets the 'clear context, no exclusions' criterion but stops short of the top score.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_windowsList WindowsARead-onlyIdempotent
List all visible windows on the Hyprland desktop via hyprctl. Use the returned address with screenshot_window, or use "focused" to target the active window.
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | No | Filter to a specific workspace ID or name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false. The description aligns with these by describing a listing operation with no side effects. It adds context about the return value being used for screenshots, which does not contradict the annotations. No contradictions present.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and to the point. It conveys the core functionality and a usage tip in two short sentences, with no unnecessary fluff. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that there is no output schema, the description does not need to explain exact return types. However, it does hint at the return content ('returned address'), which is useful context. It is complete enough for typical usage, but could benefit from a note about the format of the window data (e.g., if it returns a list of objects with addresses and titles). Otherwise, it adequately covers the tool's purpose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There is only one parameter, 'workspace', and its description ('Filter to a specific workspace ID or name') is clear and complete. The parameter's purpose and expected format are explicitly stated, providing full semantic coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'List all visible windows on the Hyprland desktop via hyprctl.' This is a specific verb (list) and resource (windows), and it distinguishes from sibling tools by the fact that siblings are screenshot and analysis tools, while this one is for listing window information.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear usage hint: 'Use the returned address with screenshot_window, or use "focused" to target the active window.' This implies when to use the tool (before taking screenshots) and highlights a parameter-specific behavior. However, it does not explicitly mention when not to use it or alternative scenarios, so it is not fully explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
screenshot_and_analyzeScreenshot & AnalyzeARead-only
Capture a screen region and immediately send it to Gemini for analysis in a single call. Combines screenshot_region and analyze_image. Useful for agents without native vision.
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Top-left X coordinate in pixels | |
| y | Yes | Top-left Y coordinate in pixels | |
| model | No | Gemini model to use (default: gemini-2.5-flash) | |
| scale | No | Downscale factor for the screenshot before sending to Gemini | |
| width | Yes | Region width in pixels | |
| height | Yes | Region height in pixels | |
| prompt | Yes | What to analyze or ask about the screenshot | |
| include_cursor | No | Include the mouse cursor in the screenshot |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds context by revealing it is a composite operation ('Combines screenshot_region and analyze_image') and explains its utility for agents without native vision. It does not contradict annotations, and it adds useful behavioral context beyond the structured fields.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary action, and contains no fluff. Every sentence adds value: the first explains what it does, the second provides context and usage guidance. It is appropriately sized for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 8 parameters, no output schema, and is a composite of two tools, the description is mostly complete. It explains the purpose, usage context, and composition. However, it does not explicitly state what the tool returns (the Gemini analysis), though this is implied by 'send it to Gemini for analysis.' Minor gap, but adequate for an agent to use it effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all 8 parameters are already well-documented in the input schema. The description adds minimal parameter-specific meaning—it implicitly clarifies that x, y, width, height define the region and prompt is the analysis question, but this is already evident from the schema. It does not elaborate on scale or model, but the schema covers those. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action: 'Capture a screen region and immediately send it to Gemini for analysis in a single call.' It specifies the resource (screen region) and the purpose (analysis), and distinguishes itself by noting it combines screenshot_region and analyze_image, setting it apart from sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear use case: 'Useful for agents without native vision.' This indicates when to prefer this tool over alternatives. However, it does not explicitly state when not to use it or mention alternative tools like calling screenshot_region and analyze_image separately, so it lacks exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
screenshot_fullscreenScreenshot FullscreenARead-onlyIdempotent
Capture the entire screen using grim. Returns the image inline as base64.
| Name | Required | Description | Default |
|---|---|---|---|
| include_cursor | No | Include the mouse cursor in the screenshot |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds valuable context by stating 'Returns the image inline as base64', which informs the agent about the return format without contradicting any annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences, front-loaded with the action, and contains zero waste. It efficiently communicates the tool's core purpose and output format.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one optional parameter, no output schema, and strong annotations, the description is complete. It covers the action, scope, implementation, and return format, which is sufficient for an agent to select and use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the parameter include_cursor is fully documented in the schema. The description itself adds no extra meaning about the parameter, so a baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Capture the entire screen using grim', which is a specific verb (capture) and resource (entire screen), and distinguishes it from sibling tools like screenshot_window and screenshot_region by explicitly stating the full-screen scope. It also mentions the output format, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool (when you need the entire screen) but does not explicitly mention alternatives or when not to use it. The context is clear from the phrase 'entire screen', which sets it apart from window- or region-specific tools, but it lacks explicit exclusion or alternative guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
screenshot_regionScreenshot RegionARead-onlyIdempotent
Capture a rectangular screen region by pixel coordinates using grim (Wayland wlroots screencopy). Coordinates are in layout pixels. Returns the image inline as base64.
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Top-left X coordinate in pixels | |
| y | Yes | Top-left Y coordinate in pixels | |
| scale | No | Downscale factor (e.g. 0.5 for half resolution) to reduce image size | |
| width | Yes | Region width in pixels | |
| height | Yes | Region height in pixels | |
| include_cursor | No | Include the mouse cursor in the screenshot |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare read-only, idempotent, and non-destructive behavior. The description adds valuable transparency by specifying that it uses grim (Wayland wlroots screencopy) and returns the image as base64, but it does not disclose potential errors or side effects beyond what annotations cover.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences with no filler. It efficiently conveys the core functionality, coordinate system, and output format, making it easy to scan and understand.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that no output schema is provided, the description's note about returning the image inline as base64 is essential context. It also clarifies the coordinate system (layout pixels). However, it lacks information about error handling or edge cases (e.g., out-of-bounds coordinates), which prevents a perfect score.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All parameters (x, y, width, height, scale, include_cursor) have clear descriptions in the schema, covering 100% of the input semantics. The description adds no additional parameter information, so the baseline score of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it captures a rectangular screen region via pixel coordinates, explicitly differentiating from sibling tools like screenshot_window (window capture) and screenshot_fullscreen (fullscreen capture). The verb 'Capture' and specific resource 'rectangular screen region' make the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description mentions pixel coordinates and base64 output, but does not explicitly state when to choose this tool over alternatives like screenshot_window or screenshot_fullscreen. The coordinate-based approach implies region capture, but there is no direct 'use when' or 'use instead' guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
screenshot_windowScreenshot WindowARead-onlyIdempotent
Capture a specific window by title, class, address, or the keyword "focused". Uses hyprctl to resolve the window and grim -T to capture it. Returns the image inline as base64.
| Name | Required | Description | Default |
|---|---|---|---|
| window | Yes | Window to capture: "focused" for the active window, an exact address (0x...), or a substring matched against window title and class | |
| include_cursor | No | Include the mouse cursor in the screenshot |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false, so the description does not need to repeat safety guarantees. It adds valuable behavioral context by revealing the underlying commands (hyprctl, grim) and the return format (base64 inline), which helps the agent understand execution behavior and output handling without contradicting the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no redundancy. It opens with the core purpose, then specifies implementation details and output format. Every sentence carries meaningful information, achieving maximum conciseness without sacrificing clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with only two well-documented parameters and no output schema. The description sufficiently explains that the image is returned inline as base64, which is the critical behavioral output. Given the annotations and schema richness, the description covers all necessary aspects for correct invocation and interpretation of results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Since schema description coverage is 100%, both parameters are thoroughly documented in the input schema. The description restates the window selection logic (title, class, address, focused) but does not add new information beyond the schema. This meets the baseline of 3 for high schema coverage; no extra semantic value is provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Capture a specific window') and the resource (window), while specifying the matching methods (title, class, address, or 'focused'). It distinguishes itself from siblings like screenshot_region and screenshot_fullscreen by focusing on a single window, making the purpose unmistakable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool (capturing a specific window) and mentions the technical approach (hyprctl, grim). It does not explicitly contrast with sibling tools (e.g., 'use screenshot_region for arbitrary areas'), but the specificity of 'a specific window' implies its use case over alternatives, earning a 4 rather than a 5.
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.
6 tool updates
v0.1.0- First observed
analyze_image - First observed
list_windows - First observed
screenshot_and_analyze - First observed
screenshot_fullscreen - First observed
screenshot_region - First observed
screenshot_window
TDQS
Scored across 6 tools
Each tool has a distinct purpose: listing windows, capturing by target (window/region/fullscreen), analyzing an existing image, and a combined capture+analyze convenience. The overlap between screenshot_and_analyze and screenshot_region+analyze_image is intentional but creates slight ambiguity for agents choosing between them.
All tool names follow a consistent snake_case verb_noun pattern (list_windows, screenshot_window, analyze_image). The compound screenshot_and_analyze is well-formed and consistent with the style, maintaining a clear and predictable naming convention.
With 6 tools, the server is well-scoped and each tool serves a clear, non-redundant function for screen capture and image analysis. The count is ideal for a focused utility server.
The tool surface covers the core lifecycle of capturing and analyzing screenshots, including window enumeration and multiple capture modes. Minor gaps exist, such as no explicit monitor listing or image format options, but the essential workflows are fully supported.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Hosted browser for AI agents: screenshots, post-JS DOM, console, WCAG. No install, no API key.
Screenshot any URL/HTML as PNG/JPEG/WebP, or read it as clean Markdown/text for LLMs.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Generate images, GIFs, and PDFs from HTML, URLs, or templates — from your AI agent.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to capture and analyze screenshots of macOS applications, windows, or the entire screen using local (Ollama) or cloud-based AI vision models, with non-intrusive, fast screen capture via Apple's ScreenCaptureKit.372MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to automate Wayland desktop environments through screenshot analysis, mouse control, and keyboard input simulation. It supports visual context via VLM providers like Gemini and OpenRouter to perform complex, multi-step desktop actions.7GPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables screenshot capture and visual analysis using cloud or local vision models, with tools to describe screens, list windows, and analyze images.5614MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to capture screenshots, inspect windows, and interact with the Hyprland desktop environment through mouse clicks and keyboard input.1-