SSH MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SSH_MCP_DATA_DIR | No | Data directory | ~/.ssh-mcp |
| SSH_MCP_LOG_FILE | No | Log file path | stderr |
| SSH_MCP_LOG_LEVEL | No | Log level (debug/info/warn/error) | info |
| SSH_MCP_CMD_TIMEOUT | No | Command timeout (ms) | 60000 |
| SSH_MCP_CONN_TIMEOUT | No | Connection timeout (ms) | 30000 |
| SSH_MCP_IDLE_TIMEOUT | No | Idle connection timeout (ms) | 300000 |
| SSH_MCP_MASTER_PASSWORD | No | Master password for file storage | |
| SSH_MCP_MAX_CONNECTIONS | No | Maximum connections | 10 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| connectA | 建立 SSH 连接。两种方式二选一:(1) 通过 alias 连接已保存的服务器;(2) 通过 host + username + password/privateKey 直接连接。使用 alias 时可额外传 password/privateKey 覆盖已存储的凭证。 |
| disconnectC | 断开 SSH 连接 |
| list_serversA | 列出已保存的服务器配置 |
| save_serverA | 保存服务器配置和凭证。覆盖现有配置时需要先获取 confirmationToken。强烈建议设置 environment 字段以防止误操作生产服务器。 |
| remove_serverA | 删除已保存的服务器配置。删除任何服务器都需要先获取 confirmationToken,生产环境服务器会有特别警告。 |
| execA | 在远程服务器执行命令。必须指定目标服务器:使用 alias(推荐,需先 save_server)或使用已连接的 host。只有一个活跃连接时可省略目标。多服务器场景下切换目标时会要求确认。危险命令需要 confirmationToken。 |
| exec_sudoA | 以 sudo 权限执行命令。必须指定目标服务器:使用 alias(推荐)或 host。只有一个活跃连接时可省略目标。多服务器场景下切换目标时需确认。危险命令需要 confirmationToken。 |
| exec_batchA | 在多台服务器批量执行命令。批量操作风险极高!包含生产环境服务器时会有特别警告。危险命令需要 confirmationToken。 |
| exec_shellA | 通过交互式 shell 模式执行命令(用于堡垒机穿透等不支持 exec 的场景)。必须指定目标服务器:使用 alias(推荐)或 host。只有一个活跃连接时可省略目标。 |
| shell_sendA | 发送输入到持久化 shell 会话(用于多轮交互,如堡垒机穿透登录流程)。必须指定目标服务器:使用 alias(推荐)或 host。只有一个活跃连接时可省略目标。 |
| shell_readA | 读取持久化 shell 会话的输出缓冲区。使用 alias(推荐)或 host 指定目标服务器,单连接时可省略。 |
| shell_closeA | 关闭持久化 shell 会话。使用 alias(推荐)或 host 指定目标服务器,单连接时可省略。 |
| sftp_lsA | 列出远程目录内容。使用 alias(推荐)或 host 指定目标服务器,单连接时可省略。 |
| sftp_uploadA | 上传本地文件到远程服务器。使用 alias(推荐)或 host 指定目标服务器,单连接时可省略。 |
| sftp_downloadA | 从远程服务器下载文件到本地。使用 alias(推荐)或 host 指定目标服务器,单连接时可省略。 |
| sftp_mkdirA | 在远程服务器创建目录。使用 alias(推荐)或 host 指定目标服务器,单连接时可省略。 |
| sftp_rmB | 删除远程文件或目录。使用 alias(推荐)或 host 指定目标服务器,单连接时可省略。 |
| health_checkB | 检查 SSH 连接健康状态 |
| get_logsC | 获取操作审计日志 |
| list_active_connectionsA | 列出当前所有活跃的 SSH 连接,包含服务器环境标签(production/staging/test/development)和别名信息,帮助 AI 识别当前连接的是哪些服务器 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 20 tools
Each tool has a distinct purpose: exec variants (single, batch, shell, sudo), SFTP operations (upload, download, list, etc.), session management (shell_*), and server configuration. Even similar-sounding tools like exec and exec_shell are clearly differentiated by interactive vs sudo mode.
All tool names follow a consistent verb_noun pattern: exec_*, sftp_*, shell_*, list_*, etc. No mixing of styles (all lowercase with underscores). Even standalone verbs like 'connect' and 'disconnect' fit the pattern.
Twenty tools is appropriate for an SSH management server. It covers connection, command execution, file transfer, session control, server configuration, and audit, without excessive redundancy.
The tool surface covers the full lifecycle of SSH operations: connect/disconnect, various execution modes, SFTP file management, persistent shell sessions, server config storage, health checks, and logs. Missing features like port forwarding are not core to typical SSH workflows.