Skip to main content
Glama
soulyamo

screen-mcp

by soulyamo

# 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: Screen View MCP

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

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/soulyamo/screen-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server