SSH MCP Server
Click on "Install 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., "@SSH MCP Servercheck if the production server is online"
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.
SSH MCP Server
一个基于 Model Context Protocol (MCP) 的 SSH 服务器,提供通过 SSH 连接到远程服务器并执行命令的功能。
功能特性
🔐 支持密码和SSH密钥认证
🌐 支持多个命名SSH连接
🚀 执行远程shell命令
📊 获取命令执行结果(成功/失败状态、退出码)
📝 获取命令输出内容(stdout、stderr)
🔄 支持交互式命令执行
📤 支持文件上传(SFTP)
⚡ 基于环境变量的灵活配置
🛡️ 完善的错误处理和日志记录
♻️ 向后兼容传统单连接配置
Related MCP server: SSH MCP Server
快速开始
方式一:使用 uvx(推荐,无需克隆)
直接在 MCP 客户端配置中使用 uvx,无需手动安装:
Claude Desktop
编辑配置文件(Windows: %APPDATA%\Claude\claude_desktop_config.json,macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"ssh": {
"command": "uvx",
"args": ["mcp-ssh-server"],
"env": {
"SSH_PROD_HOST": "your-server.com",
"SSH_PROD_USERNAME": "admin",
"SSH_PROD_PASSWORD": "your-password"
}
}
}
}VS Code / Cursor
在项目根目录创建 .mcp.json 文件:
{
"mcpServers": {
"ssh": {
"command": "uvx",
"args": ["mcp-ssh-server"],
"env": {
"SSH_PROD_HOST": "your-server.com",
"SSH_PROD_USERNAME": "admin",
"SSH_PROD_PASSWORD": "your-password"
}
}
}
}方式二:从源码安装
# 克隆仓库
git clone https://github.com/liang04/ssh-mcp.git
cd ssh-mcp
# 使用 uv 安装
pip install uv
uv sync
# 或使用 pip 安装
pip install -e .配置 MCP 客户端使用本地安装:
{
"mcpServers": {
"ssh": {
"command": "uv",
"args": ["--directory", "/path/to/ssh-mcp", "run", "mcp-ssh-server"],
"env": {
"SSH_PROD_HOST": "your-server.com",
"SSH_PROD_USERNAME": "admin",
"SSH_PROD_PASSWORD": "your-password"
}
}
}
}提示:将 SSH 连接信息替换为您的实际配置。支持通过环境变量配置多个连接,详见下方配置说明。
配置
多连接配置(推荐)
通过环境变量配置多个命名SSH连接,格式为 SSH_{连接名}_{参数名}:
# 生产环境连接
SSH_PROD_HOST=prod.example.com
SSH_PROD_USERNAME=admin
SSH_PROD_PASSWORD=prod_password
SSH_PROD_PORT=22
# 测试环境连接
SSH_TEST_HOST=test.example.com
SSH_TEST_USERNAME=tester
SSH_TEST_KEY_PATH=/path/to/test_key
SSH_TEST_PORT=2222
# 开发环境连接
SSH_DEV_HOST=dev.example.com
SSH_DEV_USERNAME=developer
SSH_DEV_PASSWORD=dev_password
# 设置默认连接(可选)
SSH_DEFAULT_CONNECTION=prod连接命名规则:
连接名使用大写字母和下划线,如
PROD、TEST、DEV_SERVER在工具调用时使用小写形式,如
connection_name="prod"
支持的参数:
HOST: 目标服务器的IP地址或主机名(必需)USERNAME: SSH登录用户名(必需)PASSWORD: SSH登录密码(与 KEY_PATH 二选一)KEY_PATH: SSH私钥文件路径(与 PASSWORD 二选一)PORT: SSH端口号,默认为22(可选)
单连接配置(向后兼容)
传统的单连接配置方式仍然支持,会被自动注册为 default 连接:
SSH_HOST=your-server-ip-or-hostname
SSH_USERNAME=your-username
SSH_PASSWORD=your-password
# 或使用SSH密钥(推荐)
SSH_KEY_PATH=/path/to/your/private/key
SSH_PORT=22 # 可选,默认为22日志配置(可选)
日志路径默认基于当前工作目录,支持相对路径和绝对路径。
# 命令执行日志
SAVE_EXEC_LOG=true # 是否保存命令执行日志
EXEC_LOG_FILE=logs/exec_log.json # 相对路径(基于 CWD)
# 或使用绝对路径
EXEC_LOG_FILE=/var/log/ssh-mcp/exec_log.json
# 调试日志(可选,默认不写入文件)
SSH_MCP_LOG_FILE=logs/debug.log # 设置后才会写入文件注意:通过
uvx运行时,相对路径基于 MCP 客户端的启动目录。建议使用绝对路径以确保日志位置可预测。
可用工具
1. list_ssh_connections
列出所有可用的SSH连接配置。
返回:
{
"connections": {
"prod": {
"name": "prod",
"host": "prod.example.com",
"port": 22,
"username": "admin",
"auth_method": "password"
},
"test": {
"name": "test",
"host": "test.example.com",
"port": 2222,
"username": "tester",
"auth_method": "key"
}
},
"default_connection": "prod",
"total_count": 2
}2. execute_command
执行shell命令并返回完整结果。
参数:
command(str): 要执行的shell命令timeout(int, 可选): 超时时间,默认30秒connection_name(str, 可选): 连接名称,不指定则使用默认连接
返回:
{
"success": true/false,
"exit_code": 0,
"stdout": "命令输出",
"stderr": "错误输出",
"error": null,
"connection": "prod"
}4. check_ssh_connection
检查SSH连接状态。
参数:
connection_name(str, 可选): 连接名称,不指定则使用默认连接
返回:
{
"connected": true/false,
"connection_name": "prod",
"host": "prod.example.com",
"port": 22,
"username": "admin",
"test_output": "连接测试成功",
"error": null
}5. execute_interactive_command
执行交互式命令(可以发送输入数据)。
参数:
command(str): 要执行的shell命令input_data(str, 可选): 要发送给命令的输入数据timeout(int, 可选): 超时时间,默认30秒connection_name(str, 可选): 连接名称,不指定则使用默认连接
返回:同 execute_command
6. upload_file
使用SFTP协议上传文件到远程服务器。
参数:
local_path(str): 本地文件路径remote_path(str): 远程服务器文件路径timeout(int, 可选): 传输超时时间,默认60秒connection_name(str, 可选): 连接名称,不指定则使用默认连接
返回:
{
"success": true/false,
"local_path": "/path/to/local/file",
"remote_path": "/path/to/remote/file",
"file_size": 1024,
"connection": "prod",
"error": null
}7. download_file
使用SFTP协议从远程服务器下载文件到本地。
参数:
remote_path(str): 远程服务器文件路径(绝对路径)local_path(str): 本地文件保存路径timeout(int, 可选): 传输超时时间,默认60秒connection_name(str, 可选): 连接名称,不指定则使用默认连接
返回:
{
"success": true/false,
"remote_path": "/path/to/remote/file",
"local_path": "/path/to/local/file",
"file_size": 1024,
"connection": "prod",
"error": null
}8. list_directory
获取远程目录的结构化文件列表。
参数:
remote_path(str, 可选): 远程目录路径,默认为当前目录 "."timeout(int, 可选): 操作超时时间,默认30秒connection_name(str, 可选): 连接名称,不指定则使用默认连接
返回:
{
"success": true/false,
"path": "/path/to/directory",
"files": [
{
"name": "example.txt",
"type": "file",
"size": 1024,
"permissions": "rw-r--r--",
"modified_time": 1701234567,
"owner_uid": 1000,
"group_gid": 1000
},
{
"name": "subdir",
"type": "directory",
"size": null,
"permissions": "rwxr-xr-x",
"modified_time": 1701234567,
"owner_uid": 1000,
"group_gid": 1000
}
],
"total_count": 2,
"connection": "prod",
"error": null
}使用示例
列出所有连接
# 查看所有可用连接
connections = list_ssh_connections()
print(f"共有 {connections['total_count']} 个连接")
print(f"默认连接: {connections['default_connection']}")文件下载
# 从生产环境下载文件
result = download_file(
remote_path="/path/to/remote/file.txt",
local_path="/path/to/local/file.txt",
connection_name="prod"
)
if result["success"]:
print(f"文件下载成功: {result['file_size']} 字节")目录列表
# 列出生产环境的目录内容
result = list_directory(
remote_path="/var/log",
connection_name="prod"
)
if result["success"]:
print(f"目录包含 {result['total_count']} 项:")
for file in result["files"]:
file_type = file["type"]
name = file["name"]
if file_type == "file":
size = file["size"]
print(f" [文件] {name} ({size} 字节)")
elif file_type == "directory":
print(f" [目录] {name}/")使用默认连接
# 不指定连接名,使用默认连接
result = execute_command("ls -la")
print(result["stdout"])
使用指定连接
# 在生产环境执行命令
result = execute_command("df -h", connection_name="prod")
print(result["stdout"])
# 在测试环境执行命令
result = execute_command("ps aux", connection_name="test")
print(result["stdout"])检查连接状态
# 检查默认连接
status = check_ssh_connection()
if status["connected"]:
print(f"已连接到 {status['host']}")
# 检查特定连接
status = check_ssh_connection(connection_name="prod")
if status["connected"]:
print(f"生产环境连接正常")交互式命令
# 在指定连接上执行需要输入的命令
result = execute_interactive_command(
command="sudo apt update",
input_data="your-password\n",
connection_name="dev"
)文件上传
# 上传文件到生产环境
result = upload_file(
local_path="/path/to/local/file.txt",
remote_path="/path/to/remote/file.txt",
connection_name="prod"
)
if result["success"]:
print(f"文件上传成功: {result['file_size']} 字节")安全注意事项
密钥认证优于密码认证:推荐使用SSH密钥而不是密码
环境变量安全:不要在代码中硬编码敏感信息,使用
.env文件并加入.gitignore网络安全:确保SSH连接在安全的网络环境中
权限控制:使用具有适当权限的用户账户
连接隔离:为不同环境(生产、测试、开发)配置独立的连接
错误处理
服务器会处理以下常见错误:
SSH认证失败
网络连接问题
命令执行超时
权限不足
连接不存在
所有错误都会记录到日志中,并返回详细的错误信息。
项目结构
ssh-mcp/
├── ssh_server.py # 主服务器文件
├── .env.example # 环境变量配置示例
├── pyproject.toml # 项目配置
├── LICENSE # MIT 许可证
└── README.md # 项目文档更新日志
v2.0.0 - 多连接支持
✨ 新增多个命名SSH连接支持
✨ 新增
list_ssh_connections工具✨ 所有工具函数支持
connection_name参数✨ 自动发现和加载环境变量中的连接配置
♻️ 保持向后兼容传统单连接配置
许可证
MIT License
Available Tools
7 toolscheck_ssh_connectionB
检查SSH连接状态
Args:
connection_name: SSH连接名称,如果不指定则使用默认连接
Returns:
Dict包含连接状态信息:
- connected: 是否能够连接
- connection_name: 连接名称
- host: 目标主机
- port: 目标端口
- username: 用户名
- error: 错误信息(如果有)
| Name | Required | Description | Default |
|---|---|---|---|
| connection_name | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It describes what the tool returns but doesn't mention important behavioral aspects like whether this is a read-only operation, if it requires authentication, potential timeouts, or error handling behavior. The return format documentation is helpful but insufficient for full behavioral transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections for Args and Returns, making it easy to parse. It's appropriately sized - every sentence adds value. The only minor improvement would be front-loading the purpose more prominently, but overall it's efficient and organized.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter diagnostic tool with no output schema, the description provides adequate coverage of what the tool does and what it returns. However, it lacks context about prerequisites (e.g., does it require pre-configured SSH connections?), error scenarios, or performance characteristics that would be helpful for an AI agent to use it effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description provides excellent parameter semantics despite 0% schema description coverage. It clearly explains that 'connection_name' is optional ('如果不指定则使用默认连接' - if not specified, use default connection) and describes what it represents ('SSH连接名称' - SSH connection name). This fully compensates for the lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as '检查SSH连接状态' (check SSH connection status), which is a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'list_ssh_connections' - both involve SSH connections but serve different functions (status check vs. listing available connections).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. While it mentions '如果不指定则使用默认连接' (if not specified, use default connection), this is parameter usage guidance rather than tool selection guidance. There's no mention of when this tool is appropriate versus other SSH-related tools in the sibling list.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
download_fileA
使用SFTP协议从远程服务器下载文件到本地
Args:
remote_path: 远程服务器文件路径(绝对路径)
local_path: 本地文件保存路径
推荐使用绝对路径以避免路径解析问题
如果使用相对路径,将基于MCP服务器的工作目录进行解析
timeout: 传输超时时间(秒),默认60秒
connection_name: SSH连接名称,如果不指定则使用默认连接
Returns:
Dict包含下载结果:
- success: 是否成功下载
- remote_path: 远程文件路径
- local_path: 本地文件路径(转换为绝对路径后)
- file_size: 文件大小(字节)
- connection: 使用的连接名称
- error: 错误信息(如果有)
| Name | Required | Description | Default |
|---|---|---|---|
| remote_path | Yes | ||
| local_path | Yes | ||
| timeout | No | ||
| connection_name | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden and does well by specifying the SFTP protocol, timeout behavior with default, connection selection logic, and return format details. It explains what happens with relative vs absolute paths and describes the comprehensive return dictionary structure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently structured with a clear purpose statement followed by well-organized Args and Returns sections. Every sentence adds value - no wasted words, and the most important information (what the tool does) is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 4-parameter tool with no annotations and no output schema, the description provides excellent coverage of parameters, behavior, and return values. The only minor gap is not explicitly mentioning error conditions or edge cases, but it's otherwise comprehensive for this complexity level.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description fully compensates by explaining all 4 parameters in detail: remote_path as absolute path, local_path with guidance on absolute vs relative paths, timeout with default value, and connection_name with default behavior. It adds significant value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('使用SFTP协议从远程服务器下载文件到本地' - download files from remote server to local using SFTP protocol), identifies the resource (remote files), and distinguishes it from sibling tools like upload_file. It's precise about the protocol and direction of transfer.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context about when to use this tool (SFTP file downloads) and implicitly distinguishes it from upload_file for the opposite operation. However, it doesn't explicitly mention when NOT to use it or alternatives like execute_command for different remote operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_commandA
在远程服务器上执行shell命令
Args:
command: 要执行的shell命令
timeout: 命令执行超时时间(秒),默认30秒
max_output_size: 最大输出大小(字节),默认8192(8KB)。
设置为0表示不限制(注意可能导致内存问题)。
超过限制的输出会被截断。
connection_name: SSH连接名称,如果不指定则使用默认连接
Returns:
Dict包含执行结果:
- success: 是否成功执行
- exit_code: 命令退出码
- stdout: 标准输出
- stderr: 标准错误输出
- truncated: 输出是否被截断
- error: 错误信息(如果有)
- connection: 使用的连接名称
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| timeout | No | ||
| max_output_size | No | ||
| connection_name | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure and does so effectively. It describes timeout behavior, output truncation risks, memory concerns with unlimited output, default connection fallback, and detailed return structure including success status, exit codes, output streams, truncation flags, and error information. This provides comprehensive behavioral context beyond basic functionality.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly structured and front-loaded with the core purpose first, followed by organized parameter explanations and return value documentation. Every sentence earns its place by providing essential information without redundancy. The bilingual format (Chinese purpose with English parameter names) is efficiently handled without wasting space.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of remote command execution with 4 parameters, no annotations, and no output schema, the description provides complete context. It covers the tool's purpose, all parameter meanings with defaults and warnings, detailed return structure, and behavioral characteristics like timeout handling and output truncation. This is comprehensive for an agent to understand and use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description fully compensates by providing detailed semantic information for all 4 parameters. It explains what each parameter controls (command to execute, timeout seconds, output size limit with memory warnings, optional connection name with default behavior), including default values, special cases (0 for unlimited), and practical implications. This adds significant value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('在远程服务器上执行shell命令' - execute shell commands on remote servers) and distinguishes it from siblings like check_ssh_connection (verification), download_file/upload_file (file transfer), list_directory (browsing), and execute_interactive_command (interactive execution). It precisely identifies both the verb (execute) and resource (shell commands on remote servers).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context about when to use this tool (for executing shell commands on remote servers) and implicitly distinguishes it from execute_interactive_command by describing batch execution with timeout and output limits. However, it doesn't explicitly state when NOT to use this tool or provide direct comparison statements with alternatives like 'use execute_interactive_command for interactive sessions'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_interactive_commandA
执行交互式命令(可以发送输入数据)
Args:
command: 要执行的shell命令
input_data: 要发送给命令的输入数据
timeout: 命令执行超时时间(秒),默认30秒
max_output_size: 最大输出大小(字节),默认8192(8KB)。
设置为0表示不限制(注意可能导致内存问题)。
超过限制的输出会被截断。
connection_name: SSH连接名称,如果不指定则使用默认连接
Returns:
Dict包含执行结果(同execute_command)
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| input_data | No | ||
| timeout | No | ||
| max_output_size | No | ||
| connection_name | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden and does well by disclosing key behaviors: it mentions timeout defaults, output size limits with truncation warnings, memory risks for unlimited output, and SSH connection fallback. It also references return format consistency with 'execute_command'. However, it doesn't cover error handling, security implications, or execution environment details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded with the core purpose first. The Args/Returns structure is clear, though slightly verbose in Chinese. Every sentence adds value: purpose statement, parameter explanations with defaults and warnings, and return format reference. Minor improvement possible by tightening the language.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 parameters with 0% schema coverage, no annotations, and no output schema, the description does an excellent job compensating. It explains all parameters thoroughly, mentions behavioral traits like truncation and memory risks, and references the return format. For a complex interactive execution tool, it's nearly complete but could benefit from more on error cases or security notes.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate fully. It successfully adds meaning for all 5 parameters: explains 'command' as shell command, 'input_data' as data to send, 'timeout' as execution timeout in seconds with default, 'max_output_size' as byte limit with default and truncation warning, and 'connection_name' as SSH connection with default fallback. This provides comprehensive semantic context beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool '执行交互式命令(可以发送输入数据)' which translates to 'Execute interactive commands (can send input data)'. This specifies the verb 'execute' and resource 'interactive commands', distinguishing it from the sibling 'execute_command' by emphasizing interactive capability with input data. However, it doesn't explicitly differentiate from all siblings like SSH-related tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for interactive commands that require input data, suggesting when to use this over 'execute_command'. However, it doesn't provide explicit guidance on when NOT to use it or mention alternatives like 'execute_command' for non-interactive scenarios. The context is clear but lacks comprehensive exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_directoryA
获取远程目录的结构化文件列表
Args:
remote_path: 远程目录路径,默认为当前目录 "."
timeout: 操作超时时间(秒),默认30秒
connection_name: SSH连接名称,如果不指定则使用默认连接
Returns:
Dict包含目录列表结果:
- success: 是否成功获取
- path: 目录路径
- files: 文件列表,每个文件包含:
- name: 文件名
- type: 类型 (file/directory/symlink/other)
- size: 文件大小(字节,仅文件类型)
- permissions: 权限字符串(如 "rwxr-xr-x")
- modified_time: 修改时间(Unix时间戳)
- owner_uid: 所有者UID
- group_gid: 组GID
- total_count: 文件总数
- connection: 使用的连接名称
- error: 错误信息(如果有)
| Name | Required | Description | Default |
|---|---|---|---|
| remote_path | No | . | |
| timeout | No | ||
| connection_name | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses that this is a read operation (获取) with timeout control and SSH connection handling, but doesn't mention potential side effects (e.g., whether it caches results), authentication requirements, rate limits, or error handling beyond the return structure. The behavioral disclosure is basic but covers the core operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and well-structured with clear sections for Args and Returns. Every sentence adds value: the purpose statement is direct, parameter explanations are necessary, and return value documentation is comprehensive. Minor improvement could be front-loading more critical behavioral information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 3 parameters with no schema descriptions and no output schema, the description provides complete parameter semantics and detailed return value structure. It covers the essential context for a directory listing tool, though could benefit from mentioning SSH prerequisites or connection state requirements given the sibling tools context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description fully compensates by explaining all 3 parameters: remote_path (path to directory, default '.'), timeout (operation timeout in seconds, default 30), and connection_name (SSH connection name, default uses default connection). It adds crucial meaning beyond the bare schema, specifying defaults and usage context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb '获取' (get/retrieve) and resource '远程目录的结构化文件列表' (structured file list of remote directory), making the purpose specific and actionable. It distinguishes from siblings like download_file, upload_file, or execute_command by focusing solely on directory listing without file transfer or command execution.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for retrieving remote directory contents via SSH, but doesn't explicitly state when to use this vs. alternatives like check_ssh_connection for connection testing or list_ssh_connections for connection management. It provides context through parameter defaults but lacks explicit guidance on tool selection scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_ssh_connectionsB
列出所有可用的SSH连接配置
Returns:
Dict包含连接列表和默认连接:
- connections: 所有连接的详细信息
- default_connection: 默认连接名称
- total_count: 连接总数
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the return structure (Dict with connections, default_connection, total_count) which is valuable behavioral information. However, it doesn't mention whether this is a read-only operation, if it requires authentication, potential rate limits, or error conditions. The description adds some behavioral context but leaves significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately concise with two sentences: one stating the purpose and one describing the return structure. Both sentences earn their place by providing essential information. The structure is front-loaded with the purpose first, followed by return details. Minor improvement could be separating the return description more clearly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless read operation with no output schema, the description provides the purpose and return structure, which covers the basics. However, without annotations, it should ideally mention that this is a read-only operation and any authentication requirements. The sibling context suggests this is part of an SSH toolset, but the description doesn't leverage this context to provide more complete guidance.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters with 100% schema description coverage, so the baseline is 4. The description correctly indicates this is a parameterless operation by not mentioning any inputs, which aligns perfectly with the empty input schema. No additional parameter information is needed or provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: '列出所有可用的SSH连接配置' (List all available SSH connection configurations). This is a specific verb+resource combination that tells what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'check_ssh_connection' which might verify connection status rather than list configurations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, when this tool is appropriate versus other SSH-related tools like 'check_ssh_connection', or any context about typical use cases. The agent must infer usage from the purpose alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
upload_fileA
使用SFTP协议上传文件到远程服务器
Args:
local_path: 本地文件路径
推荐使用绝对路径以避免路径解析问题
如果使用相对路径,将基于MCP服务器的工作目录进行解析
remote_path: 远程服务器文件路径(绝对路径)
timeout: 传输超时时间(秒),默认60秒
connection_name: SSH连接名称,如果不指定则使用默认连接
Returns:
Dict包含上传结果:
- success: 是否成功上传
- local_path: 本地文件路径(转换为绝对路径后)
- remote_path: 远程文件路径
- file_size: 文件大小(字节)
- connection: 使用的连接名称
- error: 错误信息(如果有)
| Name | Required | Description | Default |
|---|---|---|---|
| local_path | Yes | ||
| remote_path | Yes | ||
| timeout | No | ||
| connection_name | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden and does well by disclosing: protocol used (SFTP), path resolution behavior (absolute vs relative paths), default timeout (60 seconds), default connection behavior, and detailed return structure. It doesn't mention error handling beyond the error field or rate limits, but covers core behavioral aspects adequately for a file transfer operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with clear sections (purpose, Args, Returns). Every sentence adds value: first states core purpose, parameter explanations provide essential context, return documentation is comprehensive. Slightly verbose in parameter explanations but all content is functional. Could be more front-loaded with key behavioral notes.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 4-parameter mutation tool with no annotations and no output schema, the description provides excellent coverage: clear purpose, parameter semantics, return structure, and behavioral context. Missing only minor details like authentication requirements or error scenarios beyond the error field. Given the complexity, it's nearly complete and highly usable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description fully compensates by providing rich semantic context for all 4 parameters: explains local_path path resolution rules, clarifies remote_path must be absolute, specifies timeout default and unit, describes connection_name default behavior. Each parameter gets practical usage guidance beyond basic type information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('使用SFTP协议上传文件到远程服务器' - upload file to remote server using SFTP protocol) and resource (file). It distinguishes from siblings like download_file (opposite direction) and list_directory/list_ssh_connections (different operations). The verb+resource combination is precise and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context through parameter explanations (e.g., '如果不指定则使用默认连接' - if not specified, use default connection), but doesn't explicitly state when to use this tool versus alternatives like execute_command for remote operations. It mentions sibling tools indirectly through connection_name parameter context but lacks explicit comparison guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
7 tool updates
v0.1.3- First observed
check_ssh_connection - First observed
download_file - First observed
execute_command - First observed
execute_interactive_command - First observed
list_directory - First observed
list_ssh_connections - First observed
upload_file
TDQS
Every tool has a clearly distinct purpose with no ambiguity. Tools like check_ssh_connection, download_file, execute_command, and upload_file each handle specific SSH/SFTP operations without overlap. Even execute_command and execute_interactive_command are clearly differentiated by their interactive input capability.
All tools follow a consistent verb_noun naming pattern with snake_case throughout. The naming is predictable and readable, with clear action-object pairs like check_ssh_connection, download_file, list_directory, and upload_file.
Seven tools is well-scoped for an SSH server, covering connection management, file operations, and command execution. Each tool earns its place with no redundancy, providing a focused yet complete set of SSH capabilities.
The tool surface provides complete coverage for SSH operations: connection management (check/list), file transfer (upload/download), directory listing, and command execution (both regular and interactive). There are no obvious gaps or dead ends for typical SSH workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Scoped, audited SSH exec, sessions, and SFTP on your saved servers without exposing credentials
Run commands and read/write files on your servers over Termalin's keyless tunnels (hosted MCP).
Secure tunneling, reverse proxy and remote access for local applications.
Remote shell and detached long-running jobs on your own machines — no SSH, open ports or VPN.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables SSH operations including connecting to remote servers, executing commands, and transferring files between local and remote systems. Supports multiple SSH connections with both password and private key authentication methods.18-
- AlicenseAqualityCmaintenanceEnables AI assistants to securely connect to and manage remote servers via SSH, supporting command execution, file transfers via SFTP, and multi-server management with both password and SSH key authentication.9562MIT
- AlicenseAqualityCmaintenanceEnables remote server management through SSH and SFTP, supporting command execution, file transfers, and interactive shell sessions. It allows for multiple concurrent connections using either password or SSH key authentication.11194MIT
- AlicenseBqualityDmaintenanceEnables secure SSH connections to remote servers for executing shell commands and managing active sessions. It supports authentication via passwords or private keys and provides optional host-based access control.4210MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/liang04/ssh-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server