Skip to main content
Glama
Remote Desktop MCP

Remote Desktop MCP

by lufecito

Remote Desktop MCP

A Model Context Protocol (MCP) server for remote desktop control (Local, RDP, VNC, ADB). This allows AI models like Claude to see and interact with your desktop.

Linux fork of WangYihang/remote-desktop-mcp, adding a native Wayland backend for local desktop sessions (see Wayland support).

Features

  • Screenshots: Let the AI "see" your screen.

  • Interactions: Mouse clicks, movement, scrolling, and keyboard typing.

  • Protocols: Native support for Local Desktop, RDP, VNC, and Android Devices via ADB.

  • Recording: Capture desktop sessions as video for demos, debugging, and trace replay.

Related MCP server: astra-linux-agent

Wayland support

On Wayland sessions (mcp local) the server uses the xdg-desktop-portal RemoteDesktop API instead of mss/pyautogui, because X11 input injection and root-window capture never reach Wayland-native windows.

  • The first run shows the desktop's remote-control permission dialog. The grant is remembered through a single-use restore token stored in $XDG_STATE_HOME/remote-desktop-mcp/portal-restore-token.

  • Screenshots prefer spectacle (KDE), then grim, then the Screenshot portal.

  • Coordinates are given in screenshot pixels, exactly like the X11 backend.

  • The bridge needs PyGObject (gi) in a system interpreter; the server finds one automatically. If no interpreter or portal is available, the session falls back to the X11 implementation.

Force a backend with REMOTE_DESKTOP_BACKEND=wayland|x11|auto (default auto).

Install

This fork is not on PyPI — uvx remote-desktop-mcp would install the upstream package without the Wayland backend. Install from this repository instead:

uv tool install --from git+https://github.com/lufecito/mcp-remote-desktop-linux remote-desktop-mcp

The remote-desktop-mcp executable then lands in ~/.local/bin.

Quick Start

Register the server with your MCP client.

# OpenCode (global)
opencode mcp add remote-desktop --global -- remote-desktop-mcp mcp local

# Claude Code
claude mcp add remote-desktop -- remote-desktop-mcp mcp local

# Gemini CLI
gemini mcp add remote-desktop uvx --from git+https://github.com/lufecito/mcp-remote-desktop-linux remote-desktop-mcp mcp local

Other protocols work the same way — swap local for rdp, vnc, adb or playwright, and pass the connection settings as environment variables:

# RDP (needs Xvfb and FreeRDP: pacman -S xorg-server-xvfb freerdp,
#      or apt install xvfb freerdp3-x11)
remote-desktop-mcp mcp rdp \
  --host 10.0.0.10 --user ubuntu --password ubuntu

# VNC
REMOTE_DESKTOP_VNC_HOST=127.0.0.1:5900 \
REMOTE_DESKTOP_VNC_PASSWORD=password \
  remote-desktop-mcp mcp vnc

# Android over ADB
remote-desktop-mcp mcp adb --serial emulator-5554

Add --record to any of them to capture the session as video; files land in .logs/sessions/<timestamp>_<protocol>/ next to where the server runs.

First start on Wayland

The desktop asks for remote-control permission the first time. That dialog blocks the server's startup, so give your client a startup timeout well above 30 seconds — for OpenCode:

{
  "mcp": {
    "servers": {
      "remote-desktop": {
        "type": "local",
        "command": ["remote-desktop-mcp", "mcp", "local"],
        "timeout": { "startup": 600000 }
      }
    }
  }
}

After the grant is stored in $XDG_STATE_HOME/remote-desktop-mcp/portal-restore-token, later starts are immediate.

Development

uv sync
uv run pytest          # unit tests for the coordinate, keysym and PNG helpers

Credits

Fork of WangYihang/remote-desktop-mcp (MIT). The original code, examples and recordings belong to its authors; this fork adds the Wayland backend described above.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to automate Wayland desktop environments through screenshot analysis, mouse control, and keyboard input simulation. It supports visual context via VLM providers like Gemini and OpenRouter to perform complex, multi-step desktop actions.
      10
      29 PyPI
      17
      GPL 3.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables an AI agent to see and control a Linux desktop via Wayland/Hyprland, providing screenshots, structured desktop state, pointer/keyboard input, semantic window/workspace tools, and a policy engine for safe execution.
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to control remote desktops through screen capture, mouse movement, and keyboard input.
      MIT