8 Commits

Author SHA1 Message Date
fb297f7937 Add pytest suite (216 tests) and fix UI/notification parser bugs
Test infrastructure with conftest fixtures mocking run_shell_args/run_adb
for device-free testing across all 8 mixins.

Fixed: UI parser regex couldn't match hyphenated XML attributes
(content-desc, resource-id). Notification parser captured trailing
parenthesis in package names.
2026-02-11 03:38:37 -07:00
e0c05dc72a Add connectivity and settings mixins (50 → 65 tools)
New mixins:
- connectivity.py: adb_connect, adb_disconnect, adb_tcpip, adb_pair,
  device_properties (batch getprop)
- settings.py: settings_get/put, wifi/bluetooth/airplane toggles,
  screen_brightness, screen_timeout, notification_list, clipboard_get,
  media_control

Also fixes clipboard_set false-positive on devices where
cmd clipboard returns exit 0 but has no implementation.
2026-02-11 03:05:27 -07:00
a55ad3f551 Rename project to mcadb
Package name, script entry point, FastMCP server name, Docker
service, and all documentation updated from android-mcp-server
to mcadb. Project URLs now point to git.supported.systems.
Also removed deprecated docker-compose version attribute.
2026-02-10 19:37:16 -07:00
7c414f8015 Refactor to MCPMixin architecture with injection-safe shell execution
Replaces single-file server with modular mixin architecture:
- 6 domain mixins (devices, input, apps, screenshot, ui, files)
- Injection-safe run_shell_args() using shlex.quote() for all tools
- Persistent developer mode config (~/.config/adb-mcp/config.json)
- Pydantic models for typed responses
- MCP elicitation for destructive operations
- Dynamic screen dimensions for scroll gestures
- Intent flag name resolution for activity_start
- 50 tools, 5 resources, tested on real hardware
2026-02-10 18:30:34 -07:00
da7cde1fc3 Enhanced adb_shell_command documentation for input actions
- Added comprehensive examples for tap, swipe, key, and text input
- Made it clear that shell command is the most reliable way for coordinates
- Updated README to highlight adb_shell_command as recommended for tap/swipe
- Added practical examples like scrolling and common shell commands
- Improved parameter descriptions with real usage examples

This provides a clear workaround for the MCP coordinate validation issues
while making the tool much more usable for Android automation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 08:29:08 -06:00
89ff9609fb Simplify adb_input with string coordinates to fix MCP validation
- Changed all coordinate parameters to string type with empty defaults
- Simplified parameter validation using string checks
- Updated documentation to show string coordinates
- Removed complex optional parameter combinations causing MCP issues

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 08:27:12 -06:00
9b1ba05695 Enhance tool descriptions and parameter annotations
- Added comprehensive docstrings for all MCP tools
- Enhanced Pydantic Field descriptions with examples
- Added detailed parameter validation and constraints
- Improved type hints for better IDE support
- Added usage examples in parameter descriptions

Tools improved:
- adb_devices: Better device status documentation
- adb_screenshot: Clear file handling explanation
- adb_input: Detailed action type documentation with examples
- adb_launch_app: Package name examples and usage
- adb_launch_url: URL scheme support documentation
- adb_list_packages: Filtering capabilities explained
- adb_shell_command: Security warnings and examples

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 12:20:38 -06:00
db6998510c Initial commit: Android ADB MCP Server
- FastMCP server with STDIO interface
- Comprehensive ADB tools for device automation
- Docker support with USB device access
- Console script entry point for uvx compatibility
- Type-safe Pydantic models for all parameters

Tools included:
- adb_devices: List connected Android devices
- adb_screenshot: Capture and retrieve screenshots
- adb_input: Send taps, swipes, key events, text
- adb_launch_app: Launch apps by package name
- adb_launch_url: Open URLs in browser
- adb_list_packages: List installed packages
- adb_shell_command: Execute shell commands

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 11:56:14 -06:00