npu-vision-fallback
The npu-vision-fallback server provides local, privacy-first vision capabilities for desktop AI agents to understand and interact with screen content — no cloud, no GPU required.
health_check— Verify the server is running and responsive.list_backends— Discover which vision backends (e.g.,winocr,openvino_npu,openvino_cpu,rapid_ocr) are currently available.ocr_region— Extract text from a specific screen region (or full screen) using the best available OCR backend; optionally force a specific backend.detect_ui— Detect UI elements (buttons, fields, icons, etc.) in a screen region using a YOLOv8n model on OpenVINO (NPU or CPU), returning bounding boxes with labels and confidence scores.analyze_screen⭐ — The primary all-in-one tool: captures a screen region, runs NPU YOLO UI detection and OCR in parallel, then spatially fuses results into an ordered list of interactive elements annotated with their visible text — ideal for agents navigating complex UIs.
It works as an MCP server compatible with Claude Code, Codex, OpenCode, etc., and includes a standalone CLI for batch processing image files.
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., "@npu-vision-fallback Read the screen at [0,0,1280,800] and locate the 'Start Game' 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.
🔋 npu-vision-fallback
⚠️ Archived experiment — no longer actively developed
An Intel NPU screen-vision + MCP integration experiment. Backend routing and Windows-native OCR integration worked; the NPU-first product hypothesis did not find a stable user need. Code preserved for reference.
English | 中文
🗄️ Why This Is Archived
This project tested whether desktop AI agents would benefit from running low-level screen perception — "find the button", "read this region" — locally on an Intel NPU, exposed as an MCP server. That was a hypothesis, not a verified need; it never crystallized into stable demand, so development stopped.
Two things the experiment did prove:
Backend routing with graceful fallback — NPU → CPU → system OCR → cross-platform OCR, driven by a power policy, with heavy dependencies kept optional.
Windows-native OCR over MCP — WinRT OCR wired into the same tool surface as the OpenVINO NPU UI detector.
What I still use it for: batch OCR of long screenshots. Note that the implementation has no complete tiling guarantee for very long images — it may drop content on extreme captures. Treat the code as a reference, not a maintained dependency.
Related MCP server: openowl
🧱 Original Design
Three constraints that shaped the project:
Cheapest path first. OS-native OCR, then a local detector. A cloud multimodal model was the last resort — for reasoning, not for finding buttons.
Isolate compute. Inference on the NPU so the GPU stays free for the app the agent is watching. The service requests NPU or CPU only — never any GPU.
Local, period. Screenshots stay in memory and are never written to disk; OCR text is never logged; nothing leaves the machine.
Pipeline: mcp_server.py → core/orchestrator.py →
core/backend_selector.py → selected backend → screen-space remap. Full
detail: docs/ARCHITECTURE.md.
📋 Reference
MCP Tools
Tool | Purpose | Key Arguments |
| Server status | — |
| Available backends | — |
| Extract text from region |
|
| Find UI elements |
|
| Combined OCR + detection |
|
| Analyze an image file |
|
| Batch-analyze images in a directory |
|
analyze_screen fuses detection + OCR into spatially-sorted elements with
text annotations. analyze_image_file and analyze_image_directory reuse the
same pipeline on image files.
CLI
# Single image
uv run npu-vision-fallback-cli analyze-image path/to/image.png --mode all
# Directory batch
uv run npu-vision-fallback-cli analyze-dir path/to/dir --output-dir out/ --recursiveInstallation (reference only — not recommended for new deployments)
pip install "npu-vision-fallback[ocr-win,detect]"
python scripts/download_ui_model.py # one-time model export to OpenVINO IRFurther extras are listed in pyproject.toml.
Supported Backends
Backend | Type | Device | Platform | Status |
| System OCR | CPU/NPU | Windows | ✅ Primary |
| UI Detection | NPU | Win/Linux + Intel NPU | ✅ Primary |
| UI Detection | CPU | Win/Linux/macOS | ✅ Fallback |
| OCR | CPU | All | ✅ Cross-platform |
| OCR | CPU | All | ✅ Last-resort |
| System OCR | ANE | macOS | 🚧 Never implemented |
Measured Performance
Intel Core Ultra 9 275HX, 2560×1600, on battery:
Task | Backend | Latency | Energy | Notes |
OCR | WinOCR | ~1100ms | 2.5J | Native Windows API |
OCR | RapidOCR | ~6300ms | 14.5J | Cross-platform ONNX CPU |
UI Detection | OpenVINO NPU | ~80ms | 0.3J | YOLOv8n on Intel AI Boost |
UI Detection | OpenVINO CPU | ~120ms | — | No-NPU fallback |
Full details: outputs/power_report.md
Examples
Example | Description |
OCR a screen region | |
Find and click UI elements | |
Vision fallback in remote desktop |
uv run python examples/basic_ocr.py --region 0 0 1280 800Docs
📄 License
MIT © npu-vision-fallback contributors
🙏 Acknowledgments
Built with MCP (Anthropic), OpenVINO, Ultralytics YOLO, RapidOCR, Tesseract, and python-mss.
Development assisted by Claude Code (Anthropic).
Available Tools
5 toolsanalyze_screenA
Capture a screen region, run NPU YOLO UI detection and system OCR in parallel, then spatially fuse the results. Returns an ordered list of interactive elements (buttons, fields, headings, …) each annotated with the visible text inside them — ideal for agents that need to understand and act on the current screen. region=[x1,y1,x2,y2] in screen coords; omit for full screen.
Inputs: region, min_confidence.
detect_uiA
Detect objects / UI elements in a screen region using YOLOv8n on OpenVINO (NPU or CPU). Returns bounding boxes with labels and confidence scores. region=[x1,y1,x2,y2] in screen coords; omit for full screen.
Inputs: region, backend.
health_checkA
Check server health
Inputs: no named parameters.
list_backendsA
List available vision backends
Inputs: no named parameters.
ocr_regionB
OCR a screen region. region=[x1,y1,x2,y2] in screen coords; omit for full screen.
Inputs: region, backend.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a distinct purpose: analyze_screen combines detection and OCR, detect_ui does detection only, ocr_region does OCR only, while health_check and list_backends are utility tools. No overlap or ambiguity.
All tool names follow a consistent verb_noun snake_case pattern (analyze_screen, detect_ui, ocr_region, list_backends, health_check), making them predictable and easy to understand.
Five tools is well-scoped for a vision fallback server: core detection, OCR, combined analysis, health check, and backend listing. Each tool earns its place without being overwhelming or insufficient.
The tool surface covers the main vision operations (detection, OCR, combined) plus utility. A minor gap might be adjustable OCR language or detection parameters, but overall the set is functional and avoids dead ends.
Related MCP Connectors
Remote desktop MCP: let AI see, click, type and run terminal commands on your own Windows or Mac.
Remote MCP server to control your Android phone from AI assistants with per-app permissions.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceGUI automation MCP server that enables AI agents to see and control the Windows desktop using a local Vision LLM (Ollama), supporting screenshot analysis, mouse/keyboard actions, and autonomous task execution.5MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that gives any AI assistant eyes and hands on your desktop — screenshots, clicking, typing, OCR, window management, accessibility-tree queries, workflow recording.5Apache 2.0
- AlicenseAqualityDmaintenanceMCP server for vision AI — screenshots to code, OCR, error diagnosis, and image analysis via OpenAI-compatible APIs.82MIT
- AlicenseAqualityDmaintenanceMCP server for vision capabilities, enabling screenshot, camera, and image analysis using Ollama vision models.41MIT