mobaxterm-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mobaxterm-mcplist my saved SSH sessions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MobaXterm MCP Server
中文文档 | English
An MCP (Model Context Protocol) Server that enables AI agents to interact with MobaXterm — manage SSH sessions, execute remote commands, transfer files via SFTP, and monitor terminal activity.
Features
Session Management
list_sessions — List all saved sessions from MobaXterm.ini (supports bookmarks, folders, and multiple bookmark sections)
get_session_detail — Get detailed configuration of a specific session (host, port, protocol, username, etc.)
SSH Connection & Command Execution
ssh_connect — Establish SSH connections (password or key-based auth), with optional connection reuse from saved sessions
ssh_exec — Execute commands on connected servers with stdout/stderr/exit code output
ssh_disconnect — Gracefully disconnect SSH sessions
ssh_list_connections — List all active SSH connections
SFTP File Transfer
sftp_list — List remote directory contents with file metadata (size, permissions, owner, modified time)
sftp_upload — Upload local files to remote servers
sftp_download — Download remote files to local machine
sftp_mkdir — Create remote directories (recursive)
sftp_delete — Delete remote files or directories
sftp_stat — Get detailed file information (size, permissions, timestamps)
Terminal Log Monitoring
monitor_start — Start real-time monitoring of a MobaXterm session's terminal output
monitor_stop — Stop monitoring
monitor_get_recent — Retrieve recent terminal activity (with configurable time window)
monitor_list_logs — List all available MobaXterm log files
monitor_search — Search keywords in session logs
Related MCP server: R-Shell
Quick Start
Prerequisites
Node.js v18 or higher
MobaXterm (Portable or Installer edition)
Installation
git clone https://github.com/bobzzgm/mobaxterm-mcp.git
cd mobaxterm-mcp
npm install
npm run buildConfiguration
The MCP server requires the path to your MobaXterm.ini file:
Portable edition:
MobaXterm.iniis in the same directory asMobaXterm.exeInstaller edition: Usually at
C:\Users\<User>\AppData\Roaming\MobaXterm\MobaXterm.ini
Usage with AI Tools
Qoder
Add to your workspace .mcp.json:
{
"mcpServers": {
"mobaxterm": {
"command": "node",
"args": [
"/path/to/mobaxterm-mcp/dist/index.js",
"--iniPath",
"/path/to/MobaXterm.ini"
]
}
}
}Claude Desktop
Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"mobaxterm": {
"command": "node",
"args": [
"/path/to/mobaxterm-mcp/dist/index.js",
"--iniPath",
"/path/to/MobaXterm.ini"
]
}
}
}Cursor
Create .cursor/mcp.json in your project root:
{
"mcpServers": {
"mobaxterm": {
"command": "node",
"args": [
"/path/to/mobaxterm-mcp/dist/index.js",
"--iniPath",
"/path/to/MobaXterm.ini"
]
}
}
}Windsurf
Edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"mobaxterm": {
"command": "node",
"args": [
"/path/to/mobaxterm-mcp/dist/index.js",
"--iniPath",
"/path/to/MobaXterm.ini"
]
}
}
}Command Line Options
Option | Description | Default |
| Path to MobaXterm.ini | Required |
| Path to MobaXterm log directory | Auto-detected from iniPath |
| SSH connection timeout in milliseconds | 60000 |
Architecture
mobaxterm-mcp/
├── src/
│ ├── index.ts # Entry point - MCP Server setup
│ ├── types/
│ │ └── index.ts # TypeScript type definitions
│ ├── services/
│ │ ├── ini-parser.ts # MobaXterm INI parser (GBK/UTF-8)
│ │ ├── ssh-manager.ts # SSH connection pool (ssh2)
│ │ ├── sftp-manager.ts # SFTP operations (ssh2-sftp-client)
│ │ └── log-watcher.ts # Real-time log monitoring (chokidar)
│ └── tools/
│ ├── session-tools.ts # Session management tools
│ ├── ssh-tools.ts # SSH tools
│ ├── sftp-tools.ts # SFTP tools
│ └── monitor-tools.ts # Monitoring tools
├── package.json
├── tsconfig.json
└── README.mdKey Technical Details
INI Parser: Custom parser that handles MobaXterm's special INI format (values prefixed with
#CODE#protocol identifiers,%-delimited fields). Supports GBK (cp936) encoding for Chinese folder/bookmark names viaiconv-lite.Protocol Detection: Parses MobaXterm protocol codes (SSH=109, Telnet=98, WSL=105, Serial=131, RDP=1, VNC=2).
Multi-Bookmark Sections: Supports
[Bookmarks],[Bookmarks_1],[Bookmarks_2], etc.Log File Matching: Auto-discovers MobaXterm log files by session name from the configured log directory.
Development
# Build
npm run build
# Watch mode for development
npm run dev
# Inspect with MCP Inspector
npm run inspectLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for Grok Imagine AI video generation
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server for managing multiple SSH servers via AI assistants, offering tools for remote command execution, file operations, and system monitoring.111MIT
- AlicenseNot gradedqualityAmaintenanceMCP server enabling AI assistants to securely operate remote servers via persistent SSH sessions, with tools for command execution, file transfer, directory listing, and system monitoring.4MIT
- AlicenseAqualityCmaintenanceA high-performance MCP server that manages persistent SSH sessions via a local tmux instance, enabling command execution, file transfer, and session monitoring for AI agents.96MIT
- AlicenseCqualityBmaintenanceAn MCP server that enables AI agents to establish and manage persistent SSH sessions with smart command execution, async support, and file operations.211MIT