ssh-mcp-server
Health Warn
- No license — Repository has no license file
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 9 GitHub stars
Code Fail
- rimraf — Recursive directory removal in package-lock.json
- exec() — Shell command execution in src/index.ts
- os.homedir — User home directory access in src/index.ts
- crypto private key — Private key handling in src/index.ts
Permissions Pass
- Permissions — No dangerous permissions requested
This MCP server provides tools that allow an AI agent to execute arbitrary commands on remote servers via SSH. It also stores SSH credentials in a local SQLite database for reuse.
Security Assessment
This tool carries High inherent risk due to its core functionality. It is explicitly designed to execute remote shell commands (`ssh_exec`) and directly handles sensitive cryptographic private keys for authentication. The server also accesses the user's home directory (likely to locate SSH keys) and uses a recursive directory removal function in its dependencies. While the README mentions "secure" access, developers must be aware that any AI agent using this tool will have the exact level of access as the provided SSH credentials. Giving an autonomous agent the ability to run arbitrary commands on production infrastructure requires extreme caution. No hardcoded secrets were detected.
Quality Assessment
The project is recently active, with its last push occurring today. However, community trust and visibility are currently very low, evidenced by only 9 GitHub stars. Furthermore, the repository completely lacks a license file. This is a significant drawback for open-source software, as it legally restricts how the code can be used, modified, or distributed and implies a lack of long-term maintenance planning.
Verdict
Use with caution—only in isolated environments and with strict oversight, as granting autonomous agents remote shell execution capabilities and private key access poses severe security risks.
this is a collection of tools that allows your agent to execute commands on your remote servers
SSH MCP Server
A Model Context Protocol (MCP) server implementation that provides SSH
capabilities. This server allows for secure remote access and execution through
the MCP protocol.
Features
- SSH server implementation using MCP protocol
- SQLite database integration for data persistence
- TypeScript implementation for type safety and better development experience
Prerequisites
- Node.js (v16 or higher recommended)
- npm or yarn package manager
- TypeScript knowledge for development
Installation
Installing via Smithery
To install SSH Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @KinoThe-Kafkaesque/ssh-mcp-server --client claude
Manual Installation
- Clone the repository:
git clone <repository-url>
cd ssh-server
- Install dependencies:
npm install
- Build the project:
npm run build
Usage
Configuration
The server uses a SQLite database (ssh.db) to store SSH credentials. The
database file will be created automatically when the server starts.
Tools
The server provides the following tools:
ssh_exec
Execute a command over SSH.
Input Parameters:
host: The host to connect to. (required)command: The command to execute. (required)username: The username to use for the SSH connection. (required)privateKeyPath: The path to the private key file. (required)
Example Usage:
{
"tool_name": "ssh_exec",
"arguments": {
"host": "example.com",
"command": "ls -l",
"username": "user",
"privateKeyPath": "/path/to/private/key"
}
}
Note: The privateKeyPath must be a valid path to a private key file.
add_credential
Add a new SSH credential.
Input Parameters:
name: The name of the credential. (required)host: The host to connect to. (required)username: The username to use for the SSH connection. (required)privateKeyPath: The path to the private key file. (required)
Example Usage:
{
"tool_name": "add_credential",
"arguments": {
"name": "my_credential",
"host": "example.com",
"username": "user",
"privateKeyPath": "/path/to/private/key"
}
}
Note: The privateKeyPath must be a valid path to a private key file.
list_credentials
List all stored SSH credentials.
Input Parameters:
- None
Example Usage:
{
"tool_name": "list_credentials",
"arguments": {}
}
remove_credential
Remove a stored SSH credential.
Input Parameters:
name: The name of the credential to remove. (required)
Example Usage:
{
"tool_name": "remove_credential",
"arguments": {
"name": "my_credential"
}
}
Starting the server
npm start
The server will start running on the configured port (default settings can be
modified in the source code).
Project Structure
src/- Source code directorybuild/- Compiled JavaScript outputnode_modules/- Project dependencies
Dependencies
@modelcontextprotocol/sdk: MCP protocol implementationsqlite3: SQLite database drivertypescript: Development dependency for TypeScript support
Development
To make changes to the project:
- Make your changes in the
src/directory - Rebuild the project:
npm run build
- Start the server to test your changes:
npm start
License
ISC
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found