SSH MCP Server

Integrations

  • Manages SSH credentials storage through a SQLite database, enabling persistence of connection details for remote command execution.

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

  1. Clone the repository:
git clone <repository-url> cd ssh-server
  1. Install dependencies:
npm install
  1. 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 directory
  • build/ - Compiled JavaScript output
  • node_modules/ - Project dependencies

Dependencies

  • @modelcontextprotocol/sdk: MCP protocol implementation
  • sqlite3: SQLite database driver
  • typescript: Development dependency for TypeScript support

Development

To make changes to the project:

  1. Make your changes in the src/ directory
  2. Rebuild the project:
npm run build
  1. Start the server to test your changes:
npm start

License

ISC

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

A Model Context Protocol server implementation that enables secure remote command execution via SSH, with features for managing and using SSH credentials.

  1. Features
    1. Prerequisites
      1. Installation
        1. Installing via Smithery
        2. Manual Installation
      2. Usage
        1. Configuration
        2. Tools
        3. Starting the server
      3. Project Structure
        1. Dependencies
          1. Development
            1. License
              1. Contributing

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  A secure terminal execution server that enables controlled command execution with security features and resource limits via the Model Context Protocol (MCP).
                  Last updated -
                  1
                  12
                  1
                  JavaScript
                  MIT License
                  • Apple
                • -
                  security
                  F
                  license
                  -
                  quality
                  A secure SSH server implementation for Model Context Protocol that enables remote command execution and file operations, supporting both password and key-based authentication.
                  Last updated -
                  8
                  TypeScript
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that enables seamless execution of commands, Python code, web content fetching, and reusable task management with secure credentials handling.
                  Last updated -
                  2
                  Python
                  MIT License
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that enables remote execution of shell commands across different operating systems, automatically handling platform-specific differences between Windows and Unix-like systems.
                  Last updated -
                  JavaScript
                  MIT License
                  • Linux

                View all related MCP servers

                ID: miatd78x95