semvec/pypi-packages huggingface dataset:
device-manager-mcp 1.0.7
MCP server for fast Android device interaction with scrcpy acceleration
Requires Python: >=3.11
Keywords: android, automation, claude, device, mcp, scrcpy, testing

# device-manager-mcp

MCP server for fast Android device interaction with scrcpy acceleration.

<!-- mcp-name: io.github.vladkarpman/device-manager-mcp -->

## 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](docs/requirements.md) for detailed setup instructions.

## Usage with Claude Code

Add to your `.mcp.json`:

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

Or add globally:

```bash
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

```python
# 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:

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

## Development

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

## License

MIT License - see [LICENSE](LICENSE) for details.

## Related Projects

- [mobile-mcp](https://github.com/anthropics/mobile-mcp) - Official Anthropic mobile MCP
- [MYScrcpy](https://github.com/nicholasrobinson/myscrcpy) - Python scrcpy client
- [Claude Code](https://claude.ai/code) - AI coding assistant
smoldot-light 0.1.0
Python bindings for the smoldot_light Rust crate.
Requires Python: >=3.8

# py-smoldot-light

Python bindings for the `smoldot_light` Rust crate using PyO3. The goal is to run a lightweight
Polkadot client in Python and connect it to `py-polkadot-sdk`.

## Overview
- Rust core: `smoldot_light` provides the light client implementation.
- Python API: `SmoldotClient` exposes JSON-RPC request/response plumbing.
- Build system: `maturin` builds and installs the extension module.

## Quick Start
Build and install into your active virtualenv:

```bash
maturin develop
```

## Example Usage (Python)
```python
from smoldot_light import SmoldotClient

client = SmoldotClient()

# Load a chain spec JSON string (Polkadot, Kusama, or a local chain).
with open("polkadot.json", "r", encoding="utf-8") as f:
    chain_spec = f.read()

relay_chain_id = client.add_chain(chain_spec)

# If you are connecting a parachain, pass the relay chain id(s).
# asset_hub_id = client.add_chain(asset_hub_spec, relay_chain_ids=[relay_chain_id])

# Send a JSON-RPC request.
client.json_rpc_request(relay_chain_id, '{"id":1,"jsonrpc":"2.0","method":"system_name","params":[]}')

# Drain any available responses (non-blocking).
responses = client.drain_responses(relay_chain_id, max=10)
for msg in responses:
    print(msg)
```

## Getting a Substrate Chain Spec
You can fetch a live Substrate chain spec JSON from a running node:

```python
from substrateinterface import SubstrateInterface

substrate = SubstrateInterface(
    url="ws://127.0.0.1:9944"
)

response = substrate.rpc_request(method="sync_state_genSyncSpec", params=[False])
```

## Notes
- JSON-RPC requests are queued; responses are drained via `drain_responses`.
- Chain specs are standard Substrate JSON spec files.