rustdesk-mcp
MCP server that enables AI agents to control remote machines via RustDesk, supporting device management, remote shell commands, file operations, power controls, and screen interaction.
README
RustDesk MCP Server
MCP (Model Context Protocol) server that lets AI agents control remote machines via RustDesk.
Architecture
┌────────────┐ MCP stdio ┌──────────────┐ REST API ┌─────────────────┐
│ AI Agent │ ◄─────────────► │ rustdesk-mcp │ ────────────────► │ rustdesk-api │
│ (Claude/ │ │ Server │ │ (lejianwen) │
│ Cursor) │ └──────────────┘ └─────────────────┘
└────────────┘ │
▼
┌──────────┐
│ RustDesk │
│ Devices │
└──────────┘
Components and Where They Run
| Component | Where | Description |
|---|---|---|
| rustdesk-mcp (this project) | NAS/server | MCP server that translates AI requests to rustdesk-api calls |
| rustdesk-api-server | NAS/server | Third-party RustDesk API server (by lejianwen, Go) — device management, shell, file ops |
| RustDesk client | Each target machine | Normal RustDesk client, registers with api-server |
| MCP client | Control machine | Cursor/Claude/etc. — where the AI agent runs |
Features
Device Management
| Tool | Description |
|---|---|
rd_device_list |
List all registered devices |
rd_device_info |
Get device details (OS, version, status) |
rd_device_online |
Check if device is currently online |
Remote Commands
| Tool | Description |
|---|---|
rd_device_shell |
Execute shell command on remote device |
rd_device_screenshot |
Take screenshot (returns base64 image) |
File Operations
| Tool | Description |
|---|---|
rd_device_file_list |
List files on remote device |
rd_device_file_upload |
Upload local file to remote device |
rd_device_file_download |
Download file from remote device |
rd_device_file_delete |
Delete file on remote device |
Power Operations
| Tool | Description |
|---|---|
rd_device_restart |
Restart remote device |
rd_device_shutdown |
Shutdown remote device |
rd_device_lock |
Lock remote device screen |
Screen Control (via xdotool on target)
| Tool | Description |
|---|---|
rd_device_keypress |
Send keystrokes |
rd_device_mouse_move |
Move mouse to coordinates |
rd_device_mouse_click |
Click mouse at coordinates |
Prerequisites
- RustDesk client installed on target devices
- rustdesk-api-server running (default:
http://127.0.0.1:21114)
Installation
cd /vol3/1000/app/rustdesk-mcp
pip install -r requirements.txt
# or: pip install -e .
Configuration
Edit .env with your rustdesk-api credentials:
| Variable | Default | Description |
|---|---|---|
RUSTDESK_API_BASE_URL |
http://127.0.0.1:21114 |
rustdesk-api server URL |
RUSTDESK_API_USERNAME |
default |
API login username |
RUSTDESK_API_PASSWORD |
default |
API login password |
RUSTDESK_TIMEOUT |
30 |
Request timeout (seconds) |
Usage
python -m rustdesk_mcp
Or add to MCP client config:
{
"mcpServers": {
"rustdesk": {
"command": "python",
"args": ["-m", "rustdesk_mcp"],
"env": {
"RUSTDESK_API_BASE_URL": "http://127.0.0.1:21114",
"RUSTDESK_API_USERNAME": "default",
"RUSTDESK_API_PASSWORD": "default"
}
}
}
}
Project Structure
rustdesk-mcp/
├── README.md
├── LICENSE
├── .gitignore
├── pyproject.toml
├── requirements.txt
└── rustdesk_mcp/
├── __init__.py
├── __main__.py
└── server.py
Roadmap
- [ ] Native RustDesk protocol screen control (not via shell)
- [ ] Session management
- [ ] Multi-user device filtering
- [ ] File search on remote devices
- [ ] Docker deployment
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.