Android prototype that:
- shows a draggable floating window containing a
VirtualDisplaysurface - lets you pick an installed launchable app and request launching it on that display
- runs a local MCP-style HTTP bridge (
127.0.0.1:8765) that forwards actions to an Accessibility Service
- App picker in
MainActivity - Floating virtual screen service:
FloatingVirtualDisplayService - Local MCP server service:
McpServerService - Modular MCP Plugin System:
- Accessibility: UI automation (clicks, scrolls, snapshots, gestures).
- Contacts: List device contacts.
- Calendar: List calendar events.
- Media: List photos, videos, and audio files.
- SMS: List and search text messages.
- Settings: Device info and battery status.
- UI Management: Toggle plugins and set per-tool permissions (Allow, Ask, Block).
- Support for MCP Resources:
screenshot://current.
Launching third-party apps into a custom virtual display is restricted on many Android builds (OEM and Android version dependent). This project implements the API flow, but behavior can vary by device policy.
- Build and install app.
- Open app and grant overlay permission.
- Enable
MCP-boxaccessibility service in system settings. - Tap Start Floating Screen, then Start MCP Server.
- Pick an app and tap Launch On Virtual Screen.
Base URL: http://127.0.0.1:8765
GET /(MCP manifest/discovery JSON)GET /mcp(same MCP manifest/discovery JSON)GET /.well-known/mcp(same MCP manifest/discovery JSON)POST /mcp(JSON-RPC 2.0 endpoint)GET /healthGET /appsPOST /overlay/showPOST /overlay/hidePOST /launchwith JSON body:{"packageName":"com.example.app"}POST /action(Legacy REST actions for accessibility)
Tools are dynamically registered from enabled plugins and follow the pluginId/toolName naming convention.
screenshot://current: Real-time PNG screenshot (Android 11+).
- accessibility/:
health,global_action,click_text,click_view_id,set_text,scroll,ui_snapshot,find_nodes,tap,swipe,hardware_button - contacts/:
list - calendar/:
list_events - media/:
list_images,list_videos,list_audio - sms/:
list_messages,search_messages - settings/:
get_device_info,get_battery_status - server/:
keep_screen_on
JSON-RPC notes:
initializereturnsprotocolVersion,serverInfo, andcapabilities.tools.listChangednotifications/initialized(withoutid) returns HTTP204 No Contentpingis supported and returns an empty JSON object
adb shell "toybox nc 127.0.0.1 8765 <<'EOF'
GET /health HTTP/1.1
Host: 127.0.0.1
EOF"If your shell/device lacks nc, use any Android HTTP client app or run requests from code inside the app process.