Skip to main content

MCP server for fast Android screenshots via scrcpy frame buffer

Project description

device-manager-mcp

MCP server for fast Android device interaction with scrcpy acceleration.

Features

  • Fast operations via scrcpy (~50ms latency)
  • Automatic fallback to adb (~500ms) when scrcpy unavailable
  • Screenshots, taps, swipes, typing - all device interactions
  • Works with Claude Code and any MCP-compatible client

Requirements

  • macOS 12+, Python 3.11+, adb, scrcpy 3.x
  • Android device connected via USB

See docs/requirements.md for detailed setup instructions.

Usage with Claude Code

Add to your .mcp.json:

{
  "mcpServers": {
    "device-manager": {
      "command": "uvx",
      "args": ["device-manager-mcp"]
    }
  }
}

Or add globally:

claude mcp add device-manager -s user -- uvx device-manager-mcp

Available Tools

Tool Description Latency
device_screenshot Capture screen as PNG ~40ms (scrcpy) / ~500ms (adb)
device_tap Tap at coordinates ~50ms (scrcpy) / ~200ms (adb)
device_swipe Swipe gesture ~300ms
device_type Type text ~100ms
device_press_key Press BACK, HOME, ENTER, etc. ~50ms
device_list List connected devices ~100ms
device_screen_size Get screen dimensions ~10ms
device_backend_status Check active backend instant

How It Works

The server automatically selects the best backend:

  1. scrcpy backend (if available): Uses MYScrcpy library to communicate directly with scrcpy server on device. Provides ~50ms latency for screenshots and input.

  2. adb backend (fallback): Uses standard adb commands. Works everywhere but slower (~500ms for screenshots).

Example

# Claude Code will automatically use these tools:

# Take a screenshot
device_screenshot()

# Tap at coordinates
device_tap(x=540, y=1200)

# Swipe down
device_swipe(start_x=540, start_y=800, end_x=540, end_y=1600)

# Type text
device_type(text="Hello World")

# Press back button
device_press_key(key="BACK")

Configuration

Environment Variables

  • DEVICE_MANAGER_LOG_LEVEL: Set logging level (DEBUG, INFO, WARNING, ERROR)

Multiple Devices

Specify device ID for multi-device setups:

device_tap(x=100, y=200, device="RFCW318P7NV")

Development

git clone https://github.com/vladkarpman/device-manager-mcp
cd device-manager-mcp
pip install -e ".[dev]"
pytest

License

MIT License - see LICENSE for details.

Related Projects

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

screen_buffer_mcp-2.0.0.tar.gz (91.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

screen_buffer_mcp-2.0.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file screen_buffer_mcp-2.0.0.tar.gz.

File metadata

  • Download URL: screen_buffer_mcp-2.0.0.tar.gz
  • Upload date:
  • Size: 91.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for screen_buffer_mcp-2.0.0.tar.gz
Algorithm Hash digest
SHA256 8fb575833e7476a6c8a68a9c66623e9064b268fca0bee8d37bb7f4ddcdc50c6d
MD5 19294d82734754b0fee0fcaaf9679528
BLAKE2b-256 e869b45a1f4f19eaaca61d363f7157a77a0a5318f555df97521c5770fef06fb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for screen_buffer_mcp-2.0.0.tar.gz:

Publisher: release.yml on vladkarpman/screen-buffer-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file screen_buffer_mcp-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for screen_buffer_mcp-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0a02351a7cb42bd5eacf0dd91b7e44d8f324f114f12137b8afe5280c87a6517
MD5 98e5ac893555f5e79bed2e6a55d6b80b
BLAKE2b-256 14348c4fe1610b293cc0a8c721bc553744738d67893465714b41764c1b16d75d

See more details on using hashes here.

Provenance

The following attestation bundles were made for screen_buffer_mcp-2.0.0-py3-none-any.whl:

Publisher: release.yml on vladkarpman/screen-buffer-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page