pad-study-mcp
Reads and privacy-checks the live screen of an Android tablet over ADB, including wake/lock state and visible windows, and captures auto-cropped handwritten notes.
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., "@pad-study-mcp is step 3 of my integral right? peek at my tablet notes"
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.
Built for real exam prep alongside Study-OS. Works with Samsung Galaxy Tab, Xiaomi Pad, OnePlus Pad, Boox, and Pixel Tablet running AOSP, OneUI, HyperOS, or OxygenOS. Runs 100% locally over stdio — zero cloud relays, zero background Android agent APKs, and zero desktop cursor hijacking.
Why This Exists
General mobile-automation MCP servers are built for tapping UI buttons, not for letting an AI tutor proactively glance at your handwritten math or accounting work while you study:
Problem with raw screenshots | How |
Privacy leaks — a floating chat bubble, split-screen banking app, autofill overlay, or pulled-down notification shade leaks into the model context. | Fail-closed all-window gate inspects wake/lock state and every visible Android |
Tiny, blurry handwriting — a | Orientation-aware ink auto-crop strips toolbars, ruled lines, dark PDF gutters, and corner nav pills — zooming handwriting ~2.5× larger while cutting payload size by ~84% ( |
Context bloat on follow-ups — re-sending the same full-page image on every "why?" follow-up burns vision tokens and triggers context compaction. | Status-bar-immune ETag diff ( |
Flaky wireless ADB — switching between desk USB-C and campus/couch Tailscale Wi-Fi leaves stale | USB → Wi-Fi / Tailscale auto-reconnect prefers USB-C when plugged in, falls back to your wireless/Tailscale target automatically, and recovers stale |
Related MCP server: mcp-android
Smart Ink Auto-Crop
Two-pass ruled-line suppression removes full-width notebook rules and graph grids without erasing horizontal fraction bars, minus signs, or T-account dividers.
Moat-checked corner pill filtering ignores floating infinite-canvas navigation pills (
← ⌖ →) only when isolated by clean whitespace, so genuine writing in the top-right corner is never clipped.Dark-mode & highlighter aware using
ImageChops+MaxFilter(3)background-delta detection rather than naive luminance thresholding.Zero-token unchanged follow-ups: every
pad_peekresponse includes acanvas_hashcomputed over the cropped ink region (immune to clock ticks and battery changes); pass it back asif_changed_sinceon the next turn to receive{"status": "unchanged"}with0image bytes.
Fail-Closed Multi-Window Privacy Gate
Cross-OEM wake & lock parsing: handles AOSP, Samsung OneUI, Xiaomi HyperOS, and OnePlus OxygenOS
dumpsys power+dumpsys windowformats in a single fast ADB shell pass.Every visible window checked: split-screen study apps (
StarNote+Xodo PDF) are allowed together; a note app alongside a floating chat window or browser is refused (skipped_non_study_app).Non-overridable hard blocks: password managers (
Bitwarden,1Password,KeePass*,Proton Pass), 2FA authenticators, banking/wallets, messaging, email,NotificationShade,BiometricPrompt, andFLAG_SECUREwindows are blocked even if an agent callsallow_any_app=True(unless you explicitly opt in viaPAD_STUDY_ALLOW_BLOCKED=1). SeeSECURITY.md.
Tools & Diagnostics
Tool | Purpose | Key Parameters |
| Privacy-checked, ink-auto-cropped canvas capture with ETag diffing. |
|
| High-detail crop of a specific region in full-screen tablet coordinates (same privacy gate). |
|
| Ultra-fast ( |
|
Built-in CLI diagnostics (pad-study-mcp doctor): verify your ADB binary, USB/Tailscale transport, lock state, battery, visible windows, and privacy decision from the terminal in under a second:
{
"adb": "/usr/local/bin/adb",
"status": "ok",
"device": "100.64.0.10:5555",
"transport": "wireless",
"battery_pct": 84,
"screen_awake": true,
"screen_locked": false,
"visible_apps": ["StarNote"],
"privacy_gate": "allowed"
}How It's Built
Single-file Python 3.10+ MCP server (mcp + Pillow only) running locally over stdio — zero daemon processes, zero Android helper apps, and zero external network calls.
flowchart LR
subgraph Tablet["Android Tablet (OneUI · HyperOS · OxygenOS · AOSP)"]
APP["Study App(s)\nStarNote · Samsung Notes · Goodnotes · Obsidian · Saber"]
WIN["WindowManager & PowerManager\nWake · Lock · All Windows · FLAG_SECURE"]
end
subgraph Transport["Encrypted Local / Mesh Transport"]
USB["USB-C ADB\n(Preferred when plugged in)"]
TS["Wi-Fi / Tailscale WireGuard ADB\n(Auto-reconnect + stale-offline recovery)"]
end
subgraph Server["pad-study-mcp (Local Python Stdio Server)"]
GATE["1. Fail-Closed Privacy Gate\nAllowlist + Hard Blocks + Shade Check"]
CROP["2. Smart Ink Auto-Crop\nToolbar · Ruled Line · Gutter · Pill Removal"]
ETAG["3. High-Precision ETag Hash\nStatus-Bar-Immune Canvas Diff"]
end
subgraph Clients["AI Coding & Study Clients"]
AGY["Antigravity / Codex / Claude Code / Cursor"]
SOS["Optional: Study-OS MCP\n(Exact Exam Task + Rubric Context)"]
end
APP --> USB
APP --> TS
WIN -->|"1. Inspect before capture"| GATE
USB --> GATE
TS --> GATE
GATE -->|"Refuse (0 px) if locked/blocked/unlisted"| AGY
GATE -->|"Allowed → exec-out screencap"| CROP
CROP --> ETAG
ETAG -->|"~24 KB JPEG or 0 KB unchanged"| AGY
SOS -.->|"Parallel task + handwritten check"| AGYQuick Start
Prerequisites: Python 3.10+, adb (Android Platform-Tools), and USB debugging enabled on your Android tablet.
1-Line MCP Install (uvx)
Add pad-study to your MCP client config — works identically in Antigravity, Claude Code, Cursor, and any MCP-compatible client:
{
"mcpServers": {
"pad-study": {
"command": "uvx",
"args": ["--from", "git+https://github.com/shadjosef/pad-study-mcp", "pad-study-mcp"],
"env": {
"PAD_STUDY_DEVICE": "100.64.0.10:5555"
}
}
}
}(Omit PAD_STUDY_DEVICE if you only plug in over USB-C — pad-study-mcp auto-detects the attached tablet.)
codex mcp add pad-study \
--env PAD_STUDY_DEVICE=100.64.0.10:5555 \
-- uvx --from git+https://github.com/shadjosef/pad-study-mcp pad-study-mcpCampus and office Wi-Fi networks typically enable AP client isolation, which blocks direct LAN connections between your laptop and tablet. Tailscale creates an encrypted peer-to-peer WireGuard tunnel between them automatically:
Install Tailscale on both your computer and Android tablet (whitelist Tailscale from battery optimization on Android).
Plug the tablet in via USB-C once after reboot and enable TCP ADB:
adb tcpip 5555 adb connect <tablet-tailscale-ip>:5555Unplug USB-C and set
PAD_STUDY_DEVICE="<tablet-tailscale-ip>:5555"(or save the IP in~/.config/pad-study-mcp/device).On untrusted public Wi-Fi, see the network hygiene notes in
SECURITY.md(close port5555viaadb -s <target> usbwhen done, or use USB-C).
git clone https://github.com/shadjosef/pad-study-mcp.git
cd pad-study-mcp
uv venv .venv
uv pip install --python .venv/bin/python -e ".[dev]"
# Verify ADB, lock state, visible windows, and privacy gate:
.venv/bin/pad-study-mcp doctor
# Run the full 21-test unit suite (privacy gate, auto-crop, ETag, device recovery):
.venv/bin/pytest -vAdd a short instruction to your agent's global rules (GEMINI.md, AGENTS.md, or CLAUDE.md) so you never have to say "check my tablet" manually:
Whenever I ask about math, accounting, finance, economics, statistics, or physics
— or ask "is this right?", "check this", or "next step" — proactively call
`pad_peek()` first (passing `if_changed_since="<last canvas_hash>"` on follow-up turns).
If it returns `screen_off_or_locked`, `blocked_for_privacy`, `skipped_non_study_app`,
or `offline`, silently answer my text question normally.Supported Tablets & Study Apps
Works with any Android tablet supporting ADB (Samsung Galaxy Tab, Xiaomi Pad, OnePlus Pad, Boox, Pixel Tablet, Lenovo Tab).
Category | Built-in Allowlisted Apps |
Handwriting & Infinite Canvas | StarNote, Notein, Samsung Notes, Goodnotes, Notewise, Flexcil, MyScript Notes / Nebo, Boox Notes, Squid, Touchnotes, Jnotes, Mi Canvas, Xiaomi Notes, Saber (FOSS), Butterfly (FOSS), Concepts, Krita |
Knowledge, Flashcards & PDFs | Obsidian, Notion, OneNote, AnkiDroid, KOReader, Boox NeoReader, Xodo PDF, Adobe Acrobat Reader, WPS Office / Lite |
Calculators | Google Calculator, AOSP Calculator, Samsung Popup Calculator, OnePlus Calculator, Xiaomi Calculator |
(Need another app? Pass a comma-separated package list via PAD_STUDY_EXTRA_APPS.)
Configuration
All environment variables are optional:
Variable | Description |
| Explicit path to the |
| Explicit USB serial or wireless |
| File containing a cached wireless/Tailscale IP (defaults to |
| Default ADB TCP port when a bare IP is supplied (default |
| Comma-separated extra Android package names to allowlist as study apps. |
| Comma-separated extra package names or |
| Set to |
License & Security
License: MIT
Privacy & Network Security: See
SECURITY.mdfor the fail-closed multi-window architecture, campus/public Wi-Fi ADB hygiene, and vulnerability reporting.
Available Tools
3 toolspad_peekA
Capture the user's study tablet canvas with privacy guard, ink auto-crop, and ETag diff check.
Args: auto_crop: Crop empty infinite-canvas margins & toolbars around handwritten ink for sharper OCR. max_size: Max output image edge in pixels (clamped to 128-4096, default 1200). if_changed_since: Optional canvas_hash returned by a previous pad_peek call in this chat. If the canvas has not changed, skips sending image bytes (0 image tokens!). allow_any_app: Relaxes the study-app allowlist when the user explicitly asks to view another non-sensitive app. Never bypasses blocked sensitive apps, FLAG_SECURE, or NotificationShade. device: Optional explicit ADB serial or ip:port override.
Inputs: device, max_size, auto_crop, allow_any_app, +1 more. Returns: result
pad_statusB
Fast (~0.2-0.4s) health & privacy check of the Android study tablet (transport, lock state, visible apps, battery).
Inputs: device. Returns: result
pad_zoomB
Capture a zoomed crop of a specific region on the tablet screen (in full screen coordinates).
Inputs: x (required), y (required), width (required), height (required), +3 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a distinct operation: pad_status checks device health/privacy, pad_peek captures the full canvas, and pad_zoom captures a specific region. Their descriptions clearly delineate when to use each, with no overlapping responsibilities.
All tools use a consistent snake_case pad_ prefix followed by a concise action verb/noun (status, peek, zoom). The pattern is predictable and easy to extend.
Three tools are well-scoped for a focused tablet inspection server: health/status, full capture, and regional capture. Each tool has a clear purpose and earns its place without redundancy.
The surface covers status checking, full canvas capture, and zoomed inspection, which are the core lifecycle operations for a study-tablet monitoring MCP. Minor gaps exist around structured text/OCR extraction or explicit app-list retrieval, but these can be worked around via existing capture and status tools.
Maintenance
Related MCP Connectors
Let Claude, ChatGPT and other agents use your Android phone: see the screen, tap, type, open apps.
Cloud Android devices for AI agents: install an APK, read the screen, tap, type, read logcat.
Turns a phone into a camera+Bluetooth remote so AI assistants can see and control any PC.
Let Claude or ChatGPT read your iPad Apple Pencil handwritten notes, math and annotated PDFs.
Related MCP Servers
- AlicenseAqualityDmaintenanceGives PC AI agents real-world senses by connecting to an Android phone's camera, sensors, and files over local Wi-Fi without cloud relay or ADB.727 PyPI2MIT
- FlicenseBqualityBmaintenanceEnables an AI agent to control an Android phone over a private Tailscale network via accessibility UI automation, screenshots, gestures, notifications, clipboard, intents, SAF file access, and optional Termux/Shizuku shells without root or ADB.65-
- AlicenseNot gradedqualityAmaintenanceLets AI agents see and use a real Android phone over Wi-Fi: read the screen, find elements by text or ID, tap, type, swipe, take screenshots and read notifications, without ADB or root.564MIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP-compatible AI assistants to see and control Android devices through screenshots, taps, swipes, typing, app management, UI inspection, file transfer, shell commands, and audio/video streaming. It connects over ADB with optional low-latency acceleration for faster input and near-instant screenshots.801 npmMIT