- Home
- MCP servers
- Screen Buffer
Screen Buffer
- python
0
GitHub Stars
python
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"vladkarpman-screen-buffer-mcp": {
"command": "uvx",
"args": [
"screen-buffer-mcp"
],
"env": {
"SCREEN_BUFFER_LOG_LEVEL": "INFO"
}
}
}
}This MCP server delivers fast Android screenshots by leveraging the scrcpy frame buffer, providing near-instant access to recent frames with a 10-frame circular buffer and optional historical frame access for debugging or recording. It automatically falls back to adb when scrcpy is unavailable and works with Claude Code and any MCP-compatible client.
How to use
You integrate this MCP server with your MCP client to start capturing and retrieving screenshots from your connected Android device. The server keeps frames in a short circular buffer so you can grab the latest screenshot instantly. For debugging or recording, you can access frames from the past using the frame offset. If scrcpy is not available, the server automatically uses adb to generate screenshots, though this method is slower.
How to install
Prerequisites You need macOS 12+ or Linux, Python 3.11 or newer, adb, scrcpy 3.x, and a device connected via USB.
# 1) Install system dependencies (examples; adapt to your platform)
# - adb and scrcpy should be available on your PATH
# - ensure Python 3.11+ is installed
# 2) Clone the MCP server repository
git clone https://github.com/vladkarpman/screen-buffer-mcp
cd screen-buffer-mcp
# 3) Install Python package in editable mode with dev dependencies
pip install -e ".[dev]"
# 4) Ensure a device is connected via USB and recognized
adb devices
# 5) Run the MCP server locally (stdio-based, using uvx as the launcher)
# You can use the configuration shown for Claude Code integration
uvx screen-buffer-mcp
Additional configuration and usage notes
Environment variables You can control logging with SCREEN_BUFFER_LOG_LEVEL, using typical levels like DEBUG, INFO, WARNING, or ERROR.
# Example usage patterns
# Get the latest screenshot
device_screenshot()
# Retrieve a frame from 100 milliseconds ago (offset depends on framerate)
device_get_frame(offset=6)
# If you have multiple devices connected, specify the target device by ID
device_screenshot(device="RFCW318P7NV")
Security and compatibility notes
The server relies on scrcpy for fast frame access when available. If scrcpy cannot connect, it gracefully falls back to adb to ensure you still receive screenshots, albeit with higher latency.
Example configurations for Claude Code
To enable Claude Code to access this MCP server, add the following configuration to your MCP setup.
{
"mcpServers": {
"screen_buffer": {
"command": "uvx",
"args": ["screen-buffer-mcp"]
}
}
}
Using with multiple devices
If you have multiple Android devices connected, you can target a specific device when capturing screenshots.
# Specify device ID to capture from a particular device
device_screenshot(device="RFCW318P7NV")
Available tools
device_screenshot
Capture the latest frame from the in-memory frame buffer for a fast screenshot.
device_get_frame
Retrieve a historical frame from the buffer by offset for debugging or recording.
device_list
List connected devices to confirm your Android device is accessible.
device_screen_size
Return the current screen dimensions of the connected device.
device_backend_status
Check which backend (scrcpy or adb) is active for taking screenshots.