screen-mcp
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., "@screen-mcpanalyze my screen"
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
Screen-aware MCP (Model Context Protocol) server. Captures the user's screen, finds text-worthy regions via heuristic analysis, runs OCR, and returns a compact JSON (~500 tokens) instead of a full screenshot (~500,000 tokens).
Architecture
Module | Description |
screenshot.py | Fast screen capture via mss |
detection.py | Heuristic text-region finder (edge density + contrast scoring) |
ocr.py | Tesseract OCR wrapper |
main.py | MCP stdio server + HTTP debug server + ScreenWatcher background monitor |
Related MCP server: MCP Screen Text
Three Modes
1. MCP stdio (for Codex / Claude Desktop / Cursor)
Add to your MCP config (mcp.json):
json { "mcpServers": { "screen": { "command": "python", "args": ["-m", "src.main"], "cwd": "/path/to/screen-mcp" } } }
Three tools are exposed:
screen_analyze - Full analysis: capture -> detect regions -> OCR
screen_watch - Background monitoring: start / stop / status / force_check
screen_diff - One-shot change detection
2. Demo Mode
ash python -m src.main --demo
Outputs a JSON analysis of the current screen to stdout.
3. HTTP Debug Server
ash python -m src.main --http-port 8000
GET /health returns {"status": "ok"}
POST /analyze returns full screen analysis JSON
Installation
`ash pip install mss Pillow pytesseract numpy fastapi uvicorn
Install Tesseract OCR separately
Windows: winget install UB-Mannheim.TesseractOCR
macOS: brew install tesseract
Linux: sudo apt install tesseract-ocr
`
Output Example
json { "monitors": [{"left": 0, "top": 0, "width": 1920, "height": 1080}], "regions": [{"x1": 420, "y1": 140, "x2": 1160, "y2": 460, "confidence": 0.76}], "texts": [ {"text": "New chat", "confidence": 0.96, "bbox": [43, 54, 100, 64]}, {"text": "Search", "confidence": 0.96, "bbox": [43, 84, 82, 94]} ], "summary": "Found 5 text regions | Text (118): New chat, Search, Plugins..." }
Token Savings
Method | Tokens |
Raw screenshot (1920x1080 PNG) | ~500,000+ |
screen-mcp JSON | ~500-2,000 |
Savings | 99.6% |
Configuration
Parameter | Default | Description |
--min-area | 3000 | Min pixel area for text region detection |
--ocr-conf | 0.4 | Minimum OCR confidence threshold |
--monitor | 1 | Monitor index (1=primary) |
Notes
OCR uses Tesseract with English language pack by default
Chinese OCR requires installing chi_sim.traineddata
The ScreenWatcher background monitor uses MSE-based frame differencing with configurable interval and threshold
Tesseract auto-detects common installation paths; falls back to PATH lookup
This server cannot be deployed
Maintenance
Related MCP Connectors
Screenshot any URL/HTML as PNG/JPEG/WebP, or read it as clean Markdown/text for LLMs.
Desktop and mobile website screenshots plus page context for AI agents and automation workflows.
Screenshot any URL to PNG/JPEG. Cookie banners and chat widgets removed by default.
- GrabbitOAuthlive.grabbit
Screenshot any URL as a hosted image. No local browser; handles bot walls and full-page captures.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables 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.2MIT
- FlicenseBqualityDmaintenanceProvides 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.51-
- AlicenseNot gradedqualityDmaintenanceLets an LLM see what's on your screen by capturing an entire monitor or a specific application window.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to capture screen regions by defining a visual overlay or arbitrary coordinates, returning base64 PNG images.31 npmMIT