MCP Screenshot Server
Supports running the screenshot server as a containerized service, allowing deployment and execution within Docker containers.
Integrates with macOS Preview.app to open captured and annotated screenshots for additional markup and editing using native tools like freehand drawing, shapes, text, and signatures.
Click on "Deploy 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., "@MCP Screenshot Server capture a screenshot and add a red arrow pointing to the submit button"
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.
MCP Screenshot Server đ¸
A powerful Model Context Protocol (MCP) server for capturing screenshots and annotating images with boxes, lines, arrows, circles, text, and highlights.
Features
đ¯ Smart Annotation (NEW!)
đ§ Unified
annotateTool - One tool for all annotation typesđ Flexible Positioning - Named positions ("top-left", "center"), percentages ("50%,30%"), or pixels
â Anchor & Offset - Control which part of annotation aligns to position, with pixel-level fine-tuning
đ Auto-Adjust - Annotations automatically stay within image bounds
⥠Batch Annotations - Apply multiple annotations in a single call
đˇī¸ Quick Labeling - Label multiple regions with one command
đ¯ Pixel-Perfect Mode -
precise_annotatefor exact coordinate control
đ¤ AI Vision Integration
Works great with Gemini, Claude, and other vision models for intelligent annotation placement
AI can analyze images and provide exact coordinates for annotations
Combine vision analysis with
precise_annotatefor pinpoint accuracy
Capture & Load
đˇ Screenshot Capture - Full screen, region, or window-specific captures
đ Load Images - Load existing image files for annotation
Annotations
đĻ Box Annotation - Draw rectangles with customizable colors and fill
âĄī¸ Arrow Annotation - Draw directional arrows with adjustable head sizes
đ Line Drawing - Simple line annotations
â Circle/Ellipse - Draw circles and ellipses
đ Text Overlay - Add text with custom fonts and backgrounds
đĻ Highlight Regions - Semi-transparent highlight overlays
đĸ Numbered Callouts - Auto-numbered callouts for step-by-step guides
đŧī¸ Border Tool - Add borders around images
Editing
đ˛ Blur/Pixelate - Hide sensitive information (passwords, emails)
âī¸ Crop - Crop images to specific regions
đ Resize - Resize with scale or exact dimensions
đ Rotate/Flip - Rotate 90/180/270 degrees, flip horizontal/vertical
đ Brightness/Contrast - Adjust image appearance
đ§ Watermark - Add text watermarks
âŠī¸ Undo - Undo annotations (up to 10 levels)
Export
đž Save Images - Export to PNG, JPG, WebP, and more
⥠Quick Save - One-click save to Desktop/Downloads
đ Clipboard Support - Copy images directly to system clipboard
đī¸ Preview Integration - Open in macOS Preview.app for native editing
đŗ Docker Ready - Run as a containerized service
Related MCP server: MCP Screenshot Server
Examples
Screenshots captured from the browser and annotated using the MCP Screenshot Server tools:
Basic Annotations
Box, arrow, text, highlight, and circle annotations:

Numbered Callouts
Step-by-step guides with numbered markers:

Highlights & Regions
Highlight important sections and mark areas for blur:

Pixel-Perfect Annotations
Using precise_annotate with exact coordinates:
![]()
PII Redaction
Blur or redact sensitive information:

Quick Start
Installation
# Using pip
pip install mcp-screenshot-server
# Using uv (recommended)
uv add mcp-screenshot-server
# From source
git clone https://github.com/aamar-shahzad/mcp-screenshot-server.git
cd mcp-screenshot-server
pip install -e .Running the Server
# stdio transport (default - for Cursor AI, Claude Desktop, etc.)
mcp-screenshot-server
# HTTP transport (for web clients)
mcp-screenshot-server --transport streamable-http --port 8000
# SSE transport
mcp-screenshot-server --transport sse --port 8000Integration with Cursor AI
Method 1: Local Installation (Recommended)
Install the package:
pip install mcp-screenshot-server # or uv tool install mcp-screenshot-serverAdd to Cursor settings (
~/.cursor/mcp.jsonor workspace.cursor/mcp.json):{ "mcpServers": { "screenshot": { "command": "mcp-screenshot-server", "args": [] } } }Restart Cursor to load the MCP server.
Method 2: Using uvx (No Installation)
{
"mcpServers": {
"screenshot": {
"command": "uvx",
"args": ["mcp-screenshot-server"]
}
}
}Method 3: Using Docker
Build the Docker image:
docker build -t mcp-screenshot-server .Add to Cursor settings:
{ "mcpServers": { "screenshot": { "command": "docker", "args": ["run", "-i", "--rm", "mcp-screenshot-server"] } } }
Method 4: HTTP Transport
Start the server:
mcp-screenshot-server --transport streamable-http --port 8000Add to Cursor settings:
{ "mcpServers": { "screenshot": { "url": "http://localhost:8000/mcp" } } }
Available Tools
đ¯ Smart Annotation Tools (Recommended!)
These tools use flexible positioning and auto-adjustment for easier annotation:
Tool | Description |
| Unified annotation with smart positioning |
| Pixel-perfect annotations at exact coords |
| Apply multiple annotations in ONE call |
| Quickly label multiple areas with one command |
Position Formats:
Named:
"top-left","center","bottom-right","top-right-quarter", etc.Percentage:
"50%, 30%"(from top-left)Pixels:
"100px, 200px"(absolute coordinates)
Anchor Options (controls which part of annotation aligns to position):
"top-left","top-center","top-right""center-left","center","center-right""bottom-left","bottom-center","bottom-right"
Examples:
# Smart annotation with anchor and offset
annotate(img, "box", "830px, 195px", width=140, height=55,
anchor="top-left", offset_x=0, offset_y=0)
# Pixel-perfect annotation (no transformations)
precise_annotate(img, "box", x=830, y=195, width=140, height=55, color="blue")
precise_annotate(img, "text", x=830, y=168, text="Code Button", font_size=24)
precise_annotate(img, "arrow", x=100, y=200, x2=300, y2=200, color="red")
# Multiple annotations in one call
batch_annotate(img, '[{"type":"box","position":"top-left"},{"type":"text","position":"center","text":"Hello"}]')
# Label multiple regions at once
label_regions(img, '{"Header":"top-center","Sidebar":"center-left","Main":"center"}')đ¤ Using with AI Vision Models
For the most accurate annotations, combine with vision-capable AI models:
1. Take screenshot with browser/capture tool
2. AI (Gemini/Claude) analyzes image and identifies element coordinates
3. Use precise_annotate with exact coordinates from AI
4. Result: pixel-perfect annotations every timeScreenshot Capture
Tool | Description |
| Capture full screen, region, or window screenshots |
| Load an existing image file for annotation |
Basic Annotation Tools (for pixel-precise control)
Tool | Description |
| NEW! Pixel-perfect multi-type tool |
| Draw rectangles/boxes on images |
| Draw lines on images |
| Draw arrows on images |
| Add text annotations |
| Draw circles/ellipses |
| Add semi-transparent highlight regions |
| Add auto-numbered callouts (1, 2, 3...) |
| Add border around entire image |
Editing Tools
Tool | Description |
| Blur/pixelate sensitive areas |
| Crop image to specific region |
| Resize with scale or dimensions |
| Rotate 90, 180, or 270 degrees |
| Flip horizontal or vertical |
| Adjust image brightness |
| Adjust image contrast |
| Add text watermark |
| Undo last annotation (up to 10 levels) |
| Check available undo operations |
| Reset auto-numbering to 0 |
Image Management
Tool | Description |
| List all images in the current session |
| Get a specific image by ID |
| Create a copy of an existing image |
| Remove an image from the session |
Export Tools
Tool | Description |
| Save image to disk (PNG, JPG, WebP, etc.) |
| Quick save to Desktop/Downloads/Documents |
| Copy image to system clipboard |
| Get image as base64-encoded string |
| Open image in macOS Preview or default viewer |
| Open any image file in Preview/default viewer |
macOS Preview Integration
On macOS, you can use the open_in_preview tool to open images in the native Preview.app, which provides additional markup tools.
Preview's Native Tools:
âī¸ Sketch - Freehand drawing
âŦ Shapes - Rectangles, circles, arrows, speech bubbles
đ Text - Add text boxes with custom fonts
âī¸ Signature - Add your saved signature
đ¨ Colors - Full color picker
đ Border - Adjust line thickness
This allows you to combine MCP annotations with Preview's native tools for more complex edits.
Usage Examples
Basic Screenshot and Annotation
# In Cursor AI, you can ask:
# "Take a screenshot and add a red box around the error message"
# The AI will use these tools:
# 1. capture_screenshot() -> returns image_id
# 2. add_box(image_id, x=100, y=200, width=300, height=50, color="red")
# 3. save_image(image_id, path="~/Desktop/annotated.png")Creating a Bug Report Screenshot
User: Take a screenshot of my screen and highlight the button at coordinates
(500, 300) with a red circle, add an arrow pointing to it, and save it.
AI uses:
1. capture_screenshot(mode="fullscreen")
2. add_circle(image_id, x=500, y=300, radius=40, color="red", line_width=3)
3. add_arrow(image_id, x1=400, y1=200, x2=480, y2=280, color="red")
4. add_text(image_id, x=350, y=180, text="Click here!", color="red")
5. save_image(image_id, path="~/Desktop/bug-report.png")Annotating an Existing Image
User: Load the image at ~/Downloads/mockup.png and add numbered callouts
AI uses:
1. load_image(path="~/Downloads/mockup.png")
2. add_circle(image_id, x=100, y=100, radius=20, color="blue", fill="blue")
3. add_text(image_id, x=92, y=88, text="1", color="white")
4. add_circle(image_id, x=300, y=200, radius=20, color="blue", fill="blue")
5. add_text(image_id, x=292, y=188, text="2", color="white")
6. save_image(image_id, path="~/Downloads/mockup-annotated.png")Docker Usage
Build and Run
# Build the image
docker build -t mcp-screenshot-server .
# Run with stdio transport
docker run -i --rm mcp-screenshot-server
# Run with HTTP transport
docker run -p 8000:8000 mcp-screenshot-server \
--transport streamable-http --port 8000
# Run with volume for saving screenshots
docker run -p 8000:8000 -v $(pwd)/screenshots:/app/screenshots \
mcp-screenshot-server --transport streamable-httpDocker Compose
# Start HTTP server
docker-compose up -d mcp-screenshot-server
# Start stdio server
docker-compose --profile stdio up -d mcp-screenshot-server-stdioConfiguration
Environment Variables
Variable | Description | Default |
| Host for HTTP transport |
|
| Port for HTTP transport |
|
Command Line Arguments
mcp-screenshot-server [OPTIONS]
Options:
--transport {stdio,streamable-http,sse}
Transport to use (default: stdio)
--host HOST Host for HTTP transports (default: 0.0.0.0)
--port PORT Port for HTTP transports (default: 8000)Platform Support
Platform | Screenshot | Clipboard | Notes |
macOS | â
Native | â AppleScript | Full support |
Windows | â PIL ImageGrab | â PowerShell | Full support |
Linux | â PIL/scrot | â xclip/wl-copy | Requires X11/Wayland |
Docker | â With Xvfb | â ī¸ Limited | Headless mode |
Development
Setup Development Environment
# Clone the repository
git clone https://github.com/aamar-shahzad/mcp-screenshot-server.git
cd mcp-screenshot-server
# Install with development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run linting
ruff check src/Project Structure
mcp-screenshot-server/
âââ src/
â âââ mcp_screenshot_server/
â âââ __init__.py
â âââ server.py # Main MCP server implementation
âââ tests/
âââ Dockerfile
âââ docker-compose.yml
âââ pyproject.toml
âââ README.md
âââ LICENSETroubleshooting
macOS: "screencapture" requires screen recording permission
Go to System Preferences > Privacy & Security > Screen Recording and enable the terminal or IDE you're using.
Linux: Clipboard not working
Install clipboard tools:
# For X11
sudo apt install xclip
# For Wayland
sudo apt install wl-clipboardDocker: Screenshots are blank
The Docker container runs in headless mode. For actual screen capture, you need to run the server natively on the host system.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Built with MCP Python SDK
Image processing powered by Pillow
Available Tools
42 toolsadd_arrowC
Draw an arrow on the image.
Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +4 more. Returns: Result of an annotation operation.
add_borderC
Add a border around the entire image.
Inputs: image_id (required), color, width. Returns: Result of a screenshot capture.
add_boxB
Draw a rectangle/box on the image.
Inputs: x (required), y (required), width (required), height (required), +4 more. Returns: Result of an annotation operation.
add_circleC
Draw a circle on the image.
Inputs: x (required), y (required), radius (required), image_id (required), +3 more. Returns: Result of an annotation operation.
add_highlightC
Add a semi-transparent highlight region to the image.
Inputs: x (required), y (required), width (required), height (required), +3 more. Returns: Result of an annotation operation.
add_lineC
Draw a line on the image.
Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +3 more. Returns: Result of an annotation operation.
add_numbered_calloutC
Add a numbered callout (circled number) to the image.
Numbers auto-increment if not specified, making it easy to add sequential callouts.
Inputs: x (required), y (required), image_id (required), size, +3 more. Returns: Result of an annotation operation.
add_textC
Add text annotation to the image.
Inputs: x (required), y (required), text (required), image_id (required), +3 more. Returns: Result of an annotation operation.
add_watermarkC
Add a text watermark to the image.
Inputs: text (required), image_id (required), color, opacity, +2 more. Returns: Result of an annotation operation.
adjust_brightnessB
Adjust image brightness.
Inputs: image_id (required), factor. Returns: Result of an annotation operation.
adjust_contrastC
Adjust image contrast.
Inputs: image_id (required), factor. Returns: Result of an annotation operation.
annotateA
Smart unified annotation tool with flexible positioning and anchor support.
Position formats:
Named: "top-left", "center", "bottom-right", "top-left-quarter", etc.
Percentage: "50%, 30%" (from top-left corner)
Pixels: "100px, 200px" or "100, 200" (absolute x, y)
Anchor controls which part of the annotation aligns to the position:
"top-left": annotation's top-left corner at position
"center": annotation's center at position (default)
"bottom-right": annotation's bottom-right corner at position
Offset allows fine-tuning: offset_x=10 moves 10px right, offset_y=-5 moves 5px up.
Examples:
annotate(img, "box", "50%,10%", width=200, height=50, anchor="top-center")
annotate(img, "text", "100px,50px", text="Label", anchor="top-left", offset_x=5)
annotate(img, "callout", "center", text="Note", offset_y=-20)
Inputs: image_id (required), annotation_type (required), text, color, +11 more. Returns: Result of an annotation operation.
annotate_stepA
Add a numbered step annotation with callout circle, arrow, and optional text.
This is a composite tool that combines a numbered callout with an arrow pointing to a target location. Useful for creating step-by-step tutorials or highlighting UI elements.
If callout_position is not specified, it's automatically placed offset from the target.
Inputs: image_id (required), text, color, arrow_width, +4 more. Returns: Result of adding a step annotation (callout + arrow + optional text).
batch_annotateA
Apply multiple annotations in a single call.
Pass a JSON array of annotation specs. Each annotation follows the same format as the annotate() tool.
Example: [ {"type": "box", "position": "top-left", "width": 200, "height": 100, "color": "blue"}, {"type": "text", "position": "top-left", "text": "Header Area"}, {"type": "arrow", "position": "center-left", "end_position": "center-right", "color": "green"}, {"type": "callout", "position": "bottom-right", "text": "Click here"} ]
Inputs: image_id (required), annotations (required). Returns: Result of an annotation operation.
blur_regionA
Blur or pixelate a region of the image to hide sensitive information.
Use this for hiding passwords, email addresses, personal info, etc.
Inputs: x (required), y (required), width (required), height (required), +3 more. Returns: Result of an annotation operation.
capture_screenshotA
Capture a screenshot of the screen, a region, or a specific window.
On macOS, this uses the native screencapture command. On other systems, it uses PIL's ImageGrab or pyautogui as fallback.
For window capture on macOS, you need the numeric window ID (not the window name). You can find window IDs using: osascript -e 'tell app "System Events" to get id of windows of processes'
Inputs: x, y, mode, width, +2 more. Returns: Result of a screenshot capture.
compare_imagesA
Compare two images and optionally create a diff image highlighting differences.
Returns the percentage of pixels that differ and creates a new image showing the differences if highlight_differences is True.
Useful for comparing before/after screenshots, detecting UI changes, or validating visual regression tests.
Inputs: image_id_1 (required), image_id_2 (required), threshold, diff_color, +1 more. Returns: Result of comparing two images.
configure_limitsA
Configure memory limits for the image store. Triggers eviction if new limits are lower.
Inputs: max_images, undo_levels, max_memory_mb. Returns: Result of configuring memory limits.
copy_to_clipboardA
Copy an image to the system clipboard.
Inputs: image_id (required). Returns: Result of clipboard operation.
create_side_by_sideA
Create a side-by-side comparison image from two images.
Useful for visual comparisons, before/after documentation, or A/B testing screenshots. Labels are added above each image if label_height > 0.
Inputs: image_id_1 (required), image_id_2 (required), gap, label_1, +3 more. Returns: Result of a screenshot capture.
crop_imageC
Crop the image to a specific region.
Inputs: x (required), y (required), width (required), height (required), +1 more. Returns: Result of a screenshot capture.
delete_imageB
Delete an image from the session.
Inputs: image_id (required). Returns: Result of deleting an image.
duplicate_imageB
Create a copy of an existing image.
Inputs: image_id (required). Returns: Result of a screenshot capture.
export_sessionA
Export all images and metadata to a zip archive for later restoration.
The archive contains:
All images as PNG files
A manifest.json with image IDs, dimensions, and order
Optionally, undo history for each image
Use import_session to restore the session later.
Inputs: path (required), include_history. Returns: Result of exporting a session.
flip_imageB
Flip the image horizontally (mirror) or vertically.
Inputs: image_id (required), direction. Returns: Result of a screenshot capture.
get_imageB
Get a specific image by its ID. Returns the image data.
Inputs: image_id (required).
get_image_base64B
Get an image as a base64-encoded string.
Inputs: image_id (required). Returns: Result of base64 encoding.
get_memory_statsA
Get current memory usage statistics for the image store.
Inputs: no named parameters. Returns: Memory usage statistics for the image store.
get_undo_countA
Get the number of available undo operations for an image.
Inputs: image_id (required). Returns: Result of getting undo count.
import_sessionA
Import a previously exported session from a zip archive.
By default, merges with the existing session. Set merge=False to replace all current images with the imported ones.
Inputs: path (required), merge, restore_history. Returns: Result of importing a session.
label_regionsB
Quickly label multiple regions of an image.
Pass a JSON object mapping region names to positions.
Example: { "Navigation": "top-left", "Search Bar": "top-center", "User Menu": "top-right", "Sidebar": "center-left", "Main Content": "center", "Footer": "bottom-center" }
Inputs: regions (required), image_id (required), color, style. Returns: Result of an annotation operation.
list_imagesA
List all images stored in the current session.
Inputs: no named parameters. Returns: List of available images.
load_imageB
Load an existing image file for annotation.
Inputs: path (required). Returns: Result of a screenshot capture.
open_file_in_previewA
Open an image file directly in the native Preview app (macOS) or default viewer.
This doesn't require loading the image into the session first.
Inputs: path (required). Returns: Result of opening image in preview.
open_in_previewB
Open an image in the native Preview app (macOS only).
On macOS, this opens the image in Preview.app for viewing and native annotation. On other platforms, it opens with the default image viewer.
Inputs: image_id (required), save_path. Returns: Result of opening image in preview.
precise_annotateA
Pixel-perfect annotation tool. Places annotations at EXACT pixel coordinates. No anchor adjustments, no auto-positioning - pure pixel placement.
Coordinates:
x, y: Top-left corner for box, center for circle, start for text
x2, y2: End point for arrows/lines
Examples:
precise_annotate(img, "box", x=100, y=200, width=150, height=50)
precise_annotate(img, "text", x=100, y=180, text="Label")
precise_annotate(img, "arrow", x=50, y=100, x2=200, y2=100)
precise_annotate(img, "circle", x=300, y=300, radius=40)
Inputs: x (required), y (required), image_id (required), annotation_type (required), +9 more. Returns: Result of an annotation operation.
quick_saveB
Quick save to common locations (Desktop, Downloads, Documents, or temp).
Automatically determines the correct path based on the operating system.
Inputs: image_id (required), filename, location. Returns: Result of saving an image.
reset_callout_counterA
Reset the auto-increment callout counter to 0.
Inputs: no named parameters. Returns: Result of deleting an image.
resize_imageB
Resize the image by dimensions or scale factor.
Inputs: image_id (required), scale, width, height, +1 more. Returns: Result of a screenshot capture.
rotate_imageB
Rotate the image by 90, 180, or 270 degrees.
Inputs: image_id (required), angle. Returns: Result of a screenshot capture.
save_imageC
Save an image to disk.
Inputs: path (required), image_id (required), quality, image_format. Returns: Result of saving an image.
undoA
Undo the last annotation on an image.
Inputs: image_id (required). Returns: Result of an annotation operation.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogâĻ
TDQS
Scored across 42 tools
Many annotation tools overlap heavily: add_box, add_circle, add_line, add_arrow, and add_text duplicate the same operations available through annotate and precise_annotate via type parameters. add_numbered_callout and annotate_step both create numbered callouts with arrows, making the intended tool hard to select without reading every description.
Tool names overwhelmingly follow a predictable snake_case verb_noun pattern like list_images, crop_image, rotate_image, and delete_image. Minor deviations like quick_save, precise_annotate, and annotate_step are still readable and consistent with the overall style.
42 tools is excessive for a screenshot and annotation server, especially since many are redundant variations of the same annotation capability. The core workflow could be served with roughly half the tools, so the count feels inflated rather than deliberate.
The surface covers the full screenshot lifecycle well: capture, load, annotate, edit, compare, save, export/import, and session management. Minor gaps exist such as no redo operation or explicit clear-session tool, but agents can work around these.
Maintenance
Related MCP Connectors
Screenshot any website as PNG, JPEG, WebP, PDF or scrolling MP4/GIF video, with public file links.
Turn screen recordings into step-by-step guides, SOPs, tutorials and user docs with screenshots.
Capture website screenshots, run bulk captures, and manage screenshot schedules and history.
Full-page, first-screen, mobile or element screenshots of any URL as PNG, JPEG or PDF.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables comprehensive image editing operations including resizing, format conversion, cropping, compression, rotation, flipping, and batch processing. Supports JPEG, PNG, WebP, and AVIF formats with quality control and metadata extraction.814 npm19MIT
- AlicenseNot gradedqualityDmaintenanceEnterprise-grade screenshot capture server for AI agents with multi-format support, PII masking, multi-monitor support, and security controls for capturing full screens, specific windows, or custom regions across Linux, macOS, and Windows.2MIT
- AlicenseBqualityDmaintenanceProvides screen capture and optical character recognition (OCR) capabilities for entire displays or specific application windows. It enables users to list running applications, take screenshots, and extract text from images using multi-language support.51ISC
- AlicenseNot gradedqualityFmaintenanceEnables taking screenshots of the entire desktop or specific windows, with automatic clipboard integration and support for Windows, macOS, and Linux.1MIT