Skip to main content
Glama
Byte-Naut

npu-vision-fallback

by Byte-Naut

🔋 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.

PyPI License: MIT Python 3.11+

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:

  1. Cheapest path first. OS-native OCR, then a local detector. A cloud multimodal model was the last resort — for reasoning, not for finding buttons.

  2. 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.

  3. Local, period. Screenshots stay in memory and are never written to disk; OCR text is never logged; nothing leaves the machine.

Pipeline: mcp_server.pycore/orchestrator.pycore/backend_selector.py → selected backend → screen-space remap. Full detail: docs/ARCHITECTURE.md.


📋 Reference

MCP Tools

Tool

Purpose

Key Arguments

health_check

Server status

list_backends

Available backends

ocr_region

Extract text from region

region=[x1,y1,x2,y2]

detect_ui

Find UI elements

region=[x1,y1,x2,y2]

analyze_screen

Combined OCR + detection

region=[x1,y1,x2,y2]

analyze_image_file

Analyze an image file

path, mode=ocr|ui|all

analyze_image_directory

Batch-analyze images in a directory

input_dir, output_dir, mode, recursive, overwrite, max_workers

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/ --recursive
pip install "npu-vision-fallback[ocr-win,detect]"
python scripts/download_ui_model.py  # one-time model export to OpenVINO IR

Further extras are listed in pyproject.toml.

Supported Backends

Backend

Type

Device

Platform

Status

winocr

System OCR

CPU/NPU

Windows

✅ Primary

openvino_npu

UI Detection

NPU

Win/Linux + Intel NPU

✅ Primary

openvino_cpu

UI Detection

CPU

Win/Linux/macOS

✅ Fallback

rapid_ocr

OCR

CPU

All

✅ Cross-platform

pytesseract

OCR

CPU

All

✅ Last-resort

vision

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

basic_ocr.py

OCR a screen region

agent_ui_navigation.py

Find and click UI elements

desktop_remote_vnc.py

Vision fallback in remote desktop

uv run python examples/basic_ocr.py --region 0 0 1280 800

Docs


📄 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 tools
analyze_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
regionNo[x1, y1, x2, y2]
min_confidenceNoMinimum confidence threshold (default 0.30)

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses parallel execution and fusion, and return format. No annotations provided, so description must cover behavior; it doesn't mention permissions, side effects, or that it's read-only. Adequate but not thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences front-loaded with core action and result, then usage details. No wasted words, though could be slightly more compact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema or annotations, description adequately explains what the tool returns (ordered list of interactive elements with visible text). Missing ordering criteria but sufficient for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers both parameters (100% coverage). Description adds meaning: 'region=[x1,y1,x2,y2] in screen coords; omit for full screen' provides practical nuance beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states specific action: capture screen, run NPU YOLO UI detection and OCR in parallel, fuse results, return ordered list of interactive elements with text. Distinct from siblings like detect_ui or ocr_region.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'ideal for agents that need to understand and act on the current screen' and explains region parameter usage. Lacks direct comparison to siblings but provides enough context for appropriate use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
regionNo[x1, y1, x2, y2]
backendNoForce a specific backend (openvino_npu or openvino_cpu)

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the technology stack (YOLOv8n, OpenVINO, NPU or CPU), the output (bounding boxes, labels, confidence scores), and that region is optional (full screen). It does not mention side effects or permissions, but for a read-only detection tool, these are non-critical. The description is transparent enough for agent reasoning.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise yet informative: two sentences cover purpose, technology, output, and parameter usage. No fluff. The critical information is front-loaded, making it easy for an AI agent to quickly grasp the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description adequately explains return values (bounding boxes, labels, confidence). It mentions region usage and backend options. It could optionally describe how to interpret bounding box coordinates or the label set, but for a UI element detection tool, this is sufficient for most use cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already describes both parameters. The description adds value by explaining the region parameter format with screen coordinates and the 'omit for full screen' usage. It also implies backend choices via 'NPU or CPU'. This goes beyond the schema, earning a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool detects objects/UI elements in a screen region using a specific model (YOLOv8n) and returns bounding boxes with labels and confidence scores. It distinguishes from sibling tools like ocr_region (OCR) and analyze_screen (likely different analysis), making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the region parameter format and that omitting it triggers full-screen detection. However, it does not explicitly contrast with sibling tools (e.g., when to use detect_ui vs ocr_region) or provide negative usage guidance. The 'omit for full screen' is helpful, but a brief note on alternatives would improve it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

health_checkA

Check server health

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Only 'Check server health' is given, which does not disclose behavioral traits like whether it is a ping vs. deep check, or what side effects (if any) occur. It suggests a read operation but lacks details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise single sentence. No unnecessary words, and the purpose is clear. Appropriate for a simple health check tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no output schema, so description should explain return format. But it only says 'Check server health' without clarifying what output the agent can expect (e.g., boolean, status string). This leaves the agent uncertain about the tool's behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has zero parameters and schema description coverage is 100%. According to rules, baseline is 4 when no parameters. Description does not need to add parameter info.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Check server health', which is a specific verb-resource pair. This distinguishes it from sibling tools (analyze_screen, detect_ui, list_backends, ocr_region) which are about UI and screen analysis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use or alternatives. However, the tool name and description imply it is for checking server health, and sibling tools are clearly in different domains, so usage is implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_backendsA

List available vision backends

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits like potential side effects, data returned, or system dependencies. For a listing tool, safety is assumed, but the description lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded, using only three words to convey the purpose. No extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple listing tool with no parameters and no output schema, the description is mostly complete. However, it could hint at the output format or usage context to fully inform the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and the schema coverage is 100%. The description does not need to add parameter details. Baseline 4 applies as the schema is fully covered.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List available vision backends' uses a specific verb ('List') and resource ('vision backends'), clearly indicating the tool's function. It distinguishes from siblings like analyze_screen or detect_ui, which focus on different tasks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives, such as prerequisites or context. The description only states the action, not the rationale or scenarios for calling it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ocr_regionB

OCR a screen region. region=[x1,y1,x2,y2] in screen coords; omit for full screen.

ParametersJSON Schema
NameRequiredDescriptionDefault
regionNo[x1, y1, x2, y2]
backendNo

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It only states the action and parameter format, but omits behavioral traits such as accuracy, performance, supported image formats, or what happens with invalid input.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with no unnecessary words. All information is relevant and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema and no annotations, the description fails to explain return values, error handling, or how to select backends (refer to sibling tool list_backends but no mention). Simple but incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Adds meaning for the 'region' parameter beyond schema (syntax 'region=[x1,y1,x2,y2]' and default behavior when omitted). However, the 'backend' parameter (50% coverage) lacks any description or guidance, so only partial compensation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it performs OCR on a screen region, specifies the region format, and distinguishes from sibling tools by focusing on OCR rather than general analysis or UI detection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage for OCR on a region or full screen, but does not provide explicit guidance on when to use this vs alternatives like analyze_screen or detect_ui. No mention of prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv1.0.0
    • First observedanalyze_screen
    • First observeddetect_ui
    • First observedhealth_check
    • First observedlist_backends
    • First observedocr_region

TDQS

A4/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    GUI 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.
    4
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    An MCP server that gives any AI assistant eyes and hands on your desktop — screenshots, clicking, typing, OCR, window management, accessibility-tree queries, workflow recording.
    5
    Apache 2.0

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/Byte-Naut/npu-vision-fallback'

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