rterm-mcp
v1.1.1
Published
MCP server for rterm — Manage Linux & Windows servers from AI tools (Claude, Cursor, Windsurf, VS Code, Cline). Requires rterm installed on your server first. Install from https://www.rterm.com.tr — then connect your AI tool via this package.
Maintainers
Readme
rterm-mcp
MCP server for rterm — Manage your Linux & Windows servers from AI tools.
Connect Claude, Cursor, Windsurf, VS Code Copilot, Cline, or any MCP-compatible AI tool directly to your servers. Run commands, manage sessions, and automate server administration through natural language.
"Install Nginx on my server" — your AI tool runs it via rterm.
Prerequisites: You need rterm installed on your target server before using this package. rterm is a lightweight web terminal that runs on Linux and Windows. Visit www.rterm.com.tr for installation instructions and one-line install scripts.
What is this?
rterm is a lightweight web terminal and server management platform that runs on Linux and Windows servers. It provides browser-based terminal access with PAM/Windows authentication.
rterm-mcp is the bridge between rterm and AI coding tools. It implements the Model Context Protocol (MCP) so your AI assistant can execute commands on remote servers in real-time.
┌──────────────────────┐ ┌──────────────────────┐
│ Your AI Tool │ │ Your Server │
│ │ │ │
│ Claude / Cursor / │◄───────►│ rterm (:5788) │
│ Windsurf / VS Code │ HTTP │ Linux or Windows │
│ ↕ │ │ │
│ rterm-mcp │ │ PowerShell / Bash │
└──────────────────────┘ └──────────────────────┘Why?
- Windows Server Management — RDP is slow and clunky. With rterm-mcp, your AI tool runs PowerShell commands directly on your Windows servers. Check services, manage IIS, deploy apps — all through natural conversation.
- Linux Server Management — No need to SSH manually. Let your AI handle package installs, log analysis, service management, and deployment tasks.
- Multi-Server Automation — Add multiple rterm instances for different servers. Your AI can manage your entire infrastructure.
- Real-Time Streaming — Command output streams live via NDJSON. Long-running commands show progress as they execute.
Quick Start
1. Install rterm on your server
Linux (30 seconds):
curl -fsSL https://www.rterm.com.tr/dl/install.sh | sudo bashWindows (PowerShell as Administrator):
irm https://www.rterm.com.tr/dl/install.ps1 | iex2. Connect your AI tool
Claude Code:
claude mcp add rterm -- npx rterm-mcp \
--url http://YOUR_SERVER:5788 \
--user administrator \
--pass YOUR_PASSWORDCursor (.cursor/mcp.json):
{
"mcpServers": {
"rterm": {
"command": "npx",
"args": ["rterm-mcp", "--url", "http://YOUR_SERVER:5788", "--user", "administrator", "--pass", "YOUR_PASSWORD"]
}
}
}Windsurf (~/.windsurf/mcp.json):
{
"mcpServers": {
"rterm": {
"command": "npx",
"args": ["rterm-mcp", "--url", "http://YOUR_SERVER:5788", "--user", "administrator", "--pass", "YOUR_PASSWORD"]
}
}
}VS Code / GitHub Copilot (.vscode/mcp.json):
{
"mcpServers": {
"rterm": {
"command": "npx",
"args": ["rterm-mcp", "--url", "http://YOUR_SERVER:5788", "--user", "administrator", "--pass", "YOUR_PASSWORD"]
}
}
}Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"rterm": {
"command": "npx",
"args": ["rterm-mcp", "--url", "http://YOUR_SERVER:5788", "--user", "administrator", "--pass", "YOUR_PASSWORD"]
}
}
}3. Start talking to your server
"Check disk space on the server"
"List all running services on Windows"
"Install Node.js 22 and PM2"
"Show me the last 50 lines of the nginx error log"
"Create a new IIS site for myapp.com"
Available Tools
| Tool | Description |
|---|---|
| rterm_exec | Execute a command and return output (one-shot, streaming) |
| rterm_session_create | Create an interactive terminal session |
| rterm_session_input | Send input to a session (with auto-read) |
| rterm_session_read | Read current output buffer |
| rterm_session_list | List active sessions |
| rterm_session_destroy | Close a session |
rterm_exec — Most Common
Your AI tool will primarily use this. It executes a command, streams the output, and returns the result:
You: "What's the server hostname and OS?"
AI calls: rterm_exec({ command: "hostname; Get-ComputerInfo | Select OsName, OsVersion" })
AI responds: "Your server is WIN-SERVER01 running Windows Server 2019 Standard (10.0.17763)"Interactive Sessions
For complex multi-step operations, the AI can open a persistent session:
You: "Set up a new MySQL database for my project"
AI calls: rterm_session_create()
AI calls: rterm_session_input({ data: "apt install mysql-server -y\r\n" })
AI calls: rterm_session_input({ data: "mysql -u root -e 'CREATE DATABASE myproject;'\r\n" })
AI calls: rterm_session_destroy()
AI responds: "Done! MySQL is installed and 'myproject' database is created."Use Cases
Windows Server Administration
- Manage IIS websites and application pools
- Monitor Windows services and processes
- Configure Windows Firewall rules
- Run PowerShell scripts for system maintenance
- Deploy .NET applications
- Manage Active Directory (on domain controllers)
Linux Server Administration
- Install and configure web servers (Nginx, Apache)
- Manage Docker containers and services
- Monitor system resources and logs
- Set up SSL certificates (Let's Encrypt)
- Deploy applications and manage PM2 processes
- Configure firewalls (ufw, firewalld, iptables)
DevOps & Automation
- CI/CD pipeline debugging
- Multi-server health checks
- Automated deployments via AI conversation
- Log analysis and troubleshooting
Configuration
Arguments
| Argument | Environment Variable | Description |
|---|---|---|
| --url | RTERM_URL | rterm server address (e.g., http://1.2.3.4:5788) |
| --user | RTERM_USER | System username |
| --pass | RTERM_PASS | System password |
Multiple Servers
Add multiple rterm instances with different names:
claude mcp add production -- npx rterm-mcp --url http://prod-server:5788 --user admin --pass xxx
claude mcp add staging -- npx rterm-mcp --url http://staging:5788 --user admin --pass yyy
claude mcp add windows-dc -- npx rterm-mcp --url http://dc01:5788 --user administrator --pass zzzThen: "Check disk space on production" or "Restart IIS on windows-dc"
Requirements
- Node.js 18+ on your local machine (for running the MCP server)
- rterm v1.1.0+ on the target server (includes API support)
Security Notes
- Credentials are passed as CLI arguments or environment variables — they are NOT stored by the MCP server
- All communication uses JWT tokens with 8-hour expiry
- rterm enforces rate limiting (30 exec/min, 5 login attempts/min)
- Use HTTPS (reverse proxy) for production environments
- rterm authenticates against the system's own user accounts (PAM on Linux, DirectoryServices on Windows)
Links
- Website: rterm.com.tr
- rterm Server Install: Linux | Windows
License
MIT
