ssh-mcp-server
Provides tools for monitoring NVIDIA GPU metrics and status on remote hosts via SSH.
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-serverrun nvidia-smi on gpu-01"
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
English | 简体中文
A structured SSH management service for Codex and other MCP clients. It exposes command execution, file transfer, background jobs, GPU monitoring, systemd operations, and port forwarding as MCP tools with explicit input schemas, structured outputs, and accurate safety annotations.
Features
Connects only to explicit
Hostaliases declared in~/.ssh/config.Strictly verifies
known_hostsby default and rejects unknown or changed host keys.Reuses AsyncSSH connections and rebuilds stale connections automatically.
Transfers files and directories over SFTP without invoking an external
scpcommand.Runs background jobs in isolated process groups with persistent identity, logs, exit status, status discovery, safe cancellation, and cleanup.
Calculates remote file growth rate, progress, and estimated completion time.
Reports NVIDIA GPU metrics, system resources, systemd service state, and journal logs.
Binds SSH tunnels only to the local loopback address,
127.0.0.1.Applies MCP safety annotations to arbitrary commands, file overwrites, and service control.
Related MCP server: portal-mcp-server
Quick Start
Requirements
Python 3.11 or later
An OpenSSH
configfile and a verifiedknown_hostsfile
Install and Run
git clone https://github.com/yuyi-clip/ssh-mcp-server.git
Set-Location ssh-mcp-server
uv sync --locked
uv run ssh-mcp-serverConfigure an SSH Host
The server accepts explicit aliases, not arbitrary IP addresses or hostnames:
# description: GPU inference server
# environment: development
# tags: gpu,video
Host gpu-01
HostName 192.0.2.10
User operator
IdentityFile ~/.ssh/id_ed25519
Port 22192.0.2.10 is a documentation-only address. Replace it with your server address, verify the
host fingerprint through a trusted channel, and add it to ~/.ssh/known_hosts before connecting.
Connect from Codex
Register the stdio MCP server with the Codex CLI:
codex mcp add ssh -- uv --directory "D:\path\to\ssh-mcp-server" run ssh-mcp-serverAlternatively, add it to ~/.codex/config.toml manually:
[mcp_servers.ssh]
command = "uv"
args = [
"--directory",
"D:\\path\\to\\ssh-mcp-server",
"run",
"ssh-mcp-server",
]
startup_timeout_sec = 20
tool_timeout_sec = 120
default_tools_approval_mode = "writes"Restart Codex after editing the configuration and use /mcp to verify the server status.
Tool Overview
Category | Tools |
Hosts and commands |
|
File transfer |
|
Background jobs |
|
Download monitoring |
|
Host monitoring |
|
systemd and journal |
|
Tunnels |
|
See the tool reference for parameters, safety properties, and usage guidance.
Optional Environment Variables
Variable | Purpose |
| Use a custom OpenSSH config path |
| Use a custom |
| Temporarily allow unknown hosts; not recommended |
| Supply a temporary password for one alias |
Non-alphanumeric characters in an alias are converted to underscores and the result is
uppercased. For example, gpu-01 maps to SSH_MCP_PASSWORD_GPU_01. Prefer key authentication
and avoid long-lived password environment variables.
Documentation
The detailed documents are currently maintained in Chinese. English documentation can be added incrementally without changing the tool interfaces described here.
Development and Verification
uv sync --locked
uv run ruff format --check .
uv run ruff check .
uv run pytest -qThe test suite covers configuration parsing, input validation, tool registration, connection behavior, background job lifecycle, and a real MCP stdio initialization handshake. Linux CI also executes the real process-group lifecycle test.
Current Limitations
Remote shell and systemd workflows target Unix-like hosts, with full background-job support requiring Linux.
SFTP transfers do not yet support resume or progress events.
Background jobs require Linux
/proc,sh,setsid,nohup,tail, and common Coreutils.Jobs created by older versions can still be inspected, but cannot be safely cancelled because they lack process identity files.
Tunnel state exists only in the current MCP process and is closed when the process exits.
Direct server-to-server transfer and batch cluster execution are not implemented.
License
This repository does not currently declare an open-source license. Public visibility does not grant permission to copy, modify, or distribute the code; contact the maintainer before reuse.
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 Servers
- Alicense-qualityDmaintenanceAn MCP server that gives AI assistants full SSH/SFTP remote operations — session management, command execution, interactive shells, file transfers, port forwarding, and system diagnostics.2MIT
- AlicenseAqualityBmaintenanceSSH orchestration MCP server for coding agents, enabling persistent bash sessions, hash-protected remote file editing, SFTP transfers, SSH tunnels, and multi-host orchestration with connection reuse across tools.143Apache 2.0
- Alicense-qualityCmaintenanceA lightweight, zero-agent SSH operations tool that enables remote command execution, file transfer, and audit logging. It integrates as an MCP server for AI-driven infrastructure management.7MIT
- Alicense-qualityCmaintenanceAI-native SSH orchestration server enabling Claude or any MCP agent to execute commands, manage files, tunnels, and fleet operations across multiple hosts with security policies and audit logs.2Apache 2.0
Related MCP Connectors
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
Massed Compute MCP — GPU inventory, VM lifecycle, billing, SSH keys, and setup recipes.
MCP server for interacting with the Supabase platform
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/yuyi-clip/ssh-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server