screencye

screencye

Eyes for text-only LLMs: decodes screenshots into exact structured text (words, coordinates, sizes, colors) using pure-code CV and OCR. Enables text-only models to reason about UI layouts without vision models or VRAM usage.

Category
访问服务器

README

screencye — eyes for text-only LLMs

Decode a screenshot into exact structured text so any text-only model can "see" your UI — words, coordinates, sizes, colors, spacing. Pure-code CV + OCR. Zero VRAM. Deterministic.

Give a screenshot to a text-only model (DeepSeek, a local model, Claude Code, Hermes, etc.) and it can now reason about exact positions instead of hallucinating them — because the screenshot was decoded into a transcript with precise measurements.

┌ CARD "Welcome back ..." at (431,197) 418×406 · fill #ffffff
  │ TEXT "Welcome back" at (556,240) 168×19 · #111827
  ┌ INPUT "you@example.com" at (468,341) 344×40 · fill #ffffff
  ┌ BUTTON "Log in" at (467,517) 346×46 · fill #2563eb · text #ffffff

Here's a text-only agent (Hermes) using both tools — decode_screenshot + describe_screenshot — to answer "what do you see?":

A text-only agent reading a screenshot through screencye

Why it exists

  • Text-only models can't see screenshots — and describing a misaligned button in words is error-prone.
  • Vision models steal VRAM — a local vision encoder (like Gemma's --mmproj) lives in GPU memory even when idle, squeezing the text model.
  • screencye runs on CPU — the decode is pure code + PaddleOCR via ONNX Runtime. No GPU, no network, no vision model in the reading path. All your VRAM stays with your text model. (The optional describe_screenshot tool uses a tiny on-CPU MobileCLIP2-S2 classifier — still zero VRAM.)

Skip the vision encoder — save the VRAM

Running a local vision-language model in llama-server (Qwen-VL, Gemma 3, LLaVA, MiniCPM-V)? That --mmproj flag is its vision encoder — a separate projector file (~0.8–1.1 GB) sitting in VRAM on top of the LLM, even when you're only reading text.

For reading screens you don't need a vision model — you need the information in the image. screencye turns any screenshot into exact text (words, coordinates, colors, spacing) with a ~21 MB on-device engine and deterministic pixel analysis. Zero VRAM. Runs on CPU.

Drop --mmproj, run the model text-only, and let screencye do the looking:

Setup VRAM
Qwen-VL / Gemma 3 with --mmproj full model + ~0.8–1.1 GB projector
Text-only model + screencye MCP no projector; screen reading happens on CPU

Same ability to read a UI at a fraction of the memory — and because the decode is exhaustive and deterministic, nothing is silently missed the way a vision encoder's selective attention can skip details.

If your job is understanding arbitrary images — a photo's subject, a chart's trend — keep the vision model. screencye is for screens: exact, complete, and nearly free to run.

How it works (no AI in the decode)

  1. OCR — PaddleOCR v5 mobile (ONNX Runtime, ~21 MB) reads every word with a bounding box + confidence.
  2. Layout — pure pixel code: Sobel edges, color-quantized flood fill, connected components → finds buttons, inputs, cards.
  3. Inference — geometric heuristics classify each box (centered text in a bordered box = button, etc.).
  4. Transcript — computed coordinates, spacing, alignment, colors; rendered as a nested tree in reading order.

Deterministic: same screenshot → byte-identical transcript, every time.

Install

CLI (any agent or script)

npm install -g screencye-mcp
screencye /path/to/screenshot.png

MCP server (Claude Code, Hermes, etc.)

Add to your agent's MCP config (claude mcp add or the client's MCP settings):

{
  "mcpServers": {
    "screencye": {
      "command": "screencye-mcp",
      "args": []
    }
  }
}

Then any agent can call the decode_screenshot tool with a file path and get the transcript.

Model files

The PaddleOCR models (~21 MB) are resolved in this order:

  1. SCREENCYE_MODEL_DIR env var (explicit override)
  2. <install>/models/ (drop the files here to bundle)
  3. A sibling screenshot-reader/models/ folder (shared dev copy)

Grab the OCR models from the browser project (det) and rec + the ppocrv5_dict.txt.

MobileCLIP2-S2 (semantic tagger for describe_screenshot) is bundled in models/ (fp16, ~68 MB — the file that ships with this repo on GitHub):

  • mobileclip-vision.onnx — the vision encoder (256×256 input → 512-d embedding)
  • mobileclip-labels.json — precomputed label embeddings (no tokenizer/text model needed at runtime)

The label list lives in scripts/build_labels.py (one-time build: tokenizes labels and runs the MobileCLIP text encoder; needs the text ONNX, ~250 MB, from RuteNL/MobileCLIP2-S2-OpenCLIP-ONNX). The screenshot-reader/models/ copy is an int8 variant (~38 MB) for the browser app's IONOS 50 MB/file limit.

Bigger models (S3/S4, higher zero-shot accuracy) are NOT bundled — their fp16 exports exceed GitHub's 100 MB/file limit, so they can't ship in this repo. Power users can point SCREENCYE_MODEL_DIR at an S3/S4 mobileclip-vision.onnx (from RuteNL/MobileCLIP2-S3-OpenCLIP-ONNX or S4) for a ~3–5% zero-shot accuracy boost.

Tools

Tool Input Output
decode_screenshot path (absolute file path) Structured transcript (words, coords, colors, spacing)
describe_screenshot path (absolute file path) Top semantic labels (MobileCLIP2-S2: "login page", "dashboard", "map", "game", …)

describe_screenshot classifies against ~96 broad labels (UI types, games, photos, documents, charts, code, media, abstract). If no label clears the confidence threshold it appends a LOW CONFIDENCE warning instead of forcing a guess — so a blind model isn't misled while debugging. The label list lives in scripts/build_labels.py.

Privacy

Everything runs locally. The screenshot never leaves the machine — no API calls, no data egress.

Test

npm test        # parity + structure + determinism on golden screenshots
node test/mcp-handshake-test.mjs   # full MCP handshake

Files

File Purpose
src/decoder.js The 5-pass deterministic decoder (Node port)
src/server.mjs MCP server (stdio) with decode_screenshot
src/cli.js CLI entry (screencye image.png)
src/config.js Model-path resolution

Roadmap

  • decode_screenshot_base64 — pass image bytes directly (no temp file needed)
  • screenshot capture helper

Powered by VELOCE AI Accelerator · ONNX Runtime · PaddleOCR

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选