MCP Hub
Back to servers

mcp-remotetouch

An MCP server for remotely controlling touchscreens on Linux devices over SSH using virtual touch input. It enables actions like tapping and swiping without requiring any software installation on the target machine.

glama
Updated
Feb 2, 2026

mcp-remotetouch

An MCP server for remotely controlling a touchscreen on any Linux device over SSH.

Creates a virtual touch device via Linux uinput and injects tap, swipe, long press, and double tap events. No installation required on the remote device — the Python daemon is base64-encoded and sent as an SSH command argument, using only Python's standard library.

Architecture

Dev Machine                              Remote Linux Device
┌──────────────────┐    SSH (persistent)  ┌──────────────────┐
│ MCP Server (TS)  │ ──────────────────> │ Python daemon    │
│ stdio transport   │    JSON-line proto  │ (stdlib only)     │
│                   │ <────────────────── │                  │
│ touch_tap         │                     │ /dev/uinput      │
│ touch_swipe       │                     │   ↓              │
│ touch_long_press  │                     │ Virtual touch    │
│ touch_double_tap  │                     │   ↓              │
│ touch_disconnect  │                     │ Linux Input      │
└──────────────────┘                     └──────────────────┘

Prerequisites

Dev Machine

  • Node.js 18+
  • SSH client

Remote Device

  • Any Linux device with a touchscreen (Raspberry Pi, SBC, embedded system, etc.)
  • Python 3
  • Access to /dev/uinput

Add the user to the input group on the remote device:

sudo usermod -aG input $USER

Re-login for the change to take effect.

Installation

git clone https://github.com/signal-slot/mcp-remotetouch.git
cd mcp-remotetouch
npm install
npm run build

Registering as an MCP Server

Add to Claude Desktop's claude_desktop_config.json:

{
  "mcpServers": {
    "remotetouch": {
      "command": "node",
      "args": ["/path/to/mcp-remotetouch/build/index.js"],
      "env": {
        "REMOTETOUCH_SSH_HOST": "192.168.1.100",
        "REMOTETOUCH_SSH_USER": "pi",
        "REMOTETOUCH_SCREEN_WIDTH": "800",
        "REMOTETOUCH_SCREEN_HEIGHT": "480"
      }
    }
  }
}

Environment Variables

VariableDefaultDescription
REMOTETOUCH_SSH_HOST(required)SSH host of the remote device
REMOTETOUCH_SSH_USERpiSSH username
REMOTETOUCH_SSH_PORT22SSH port
REMOTETOUCH_SSH_KEY(none)Path to SSH private key
REMOTETOUCH_SCREEN_WIDTH800Screen width in pixels
REMOTETOUCH_SCREEN_HEIGHT480Screen height in pixels
REMOTETOUCH_USE_SUDOfalseRun daemon with sudo

Tools

touch_connect

Connect to a remote Linux device via SSH and start the touch daemon. Returns a session ID.

ParameterTypeDescription
hoststring?SSH host
userstring?SSH username
portnumber?SSH port
sshKeystring?Path to SSH private key
screenWidthnumber?Screen width in pixels
screenHeightnumber?Screen height in pixels
useSudoboolean?Run with sudo

touch_tap

Tap at the given coordinates.

ParameterTypeDescription
sessionIdstringSession ID
xnumberX coordinate
ynumberY coordinate
duration_msnumber?Tap duration (default: 50ms)

touch_swipe

Swipe from (x1, y1) to (x2, y2).

ParameterTypeDescription
sessionIdstringSession ID
x1numberStart X coordinate
y1numberStart Y coordinate
x2numberEnd X coordinate
y2numberEnd Y coordinate
duration_msnumber?Swipe duration (default: 300ms)
stepsnumber?Number of interpolation steps

touch_long_press

Long press at the given coordinates.

ParameterTypeDescription
sessionIdstringSession ID
xnumberX coordinate
ynumberY coordinate
duration_msnumber?Press duration (default: 800ms)

touch_double_tap

Double tap at the given coordinates.

ParameterTypeDescription
sessionIdstringSession ID
xnumberX coordinate
ynumberY coordinate

touch_disconnect

Disconnect a session and clean up the remote daemon.

ParameterTypeDescription
sessionIdstringSession ID

touch_list_sessions

List all active sessions. No parameters.

Usage

From Claude Desktop:

  1. touch_connect to connect to the remote device
  2. touch_tap to tap a coordinate on the screen
  3. touch_swipe to scroll or swipe
  4. touch_disconnect to end the session

Troubleshooting

Permission denied accessing /dev/uinput

The user on the remote device is not in the input group:

sudo usermod -aG input $USER
# Re-login for the change to take effect

Alternatively, set REMOTETOUCH_USE_SUDO=true.

SSH connection fails

  • Ensure SSH public key authentication is configured for the remote device (password authentication is not supported since the connection uses BatchMode=yes)
  • Verify the hostname and port are correct

License

MIT

Reviews

No reviews yet

Sign in to write a review