MCP server providing SSH remote access and execution

MCP server providing SSH remote access and execution

ssh-mcp-server-kinothe-kafkaesque•bykinothe-kafkaesque

An MCP server that exposes SSH-based tools for running remote commands, copying files, managing interactive sessions, and creating port-forwarding tunnels, with credentials stored in a SQLite database.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Stores named SSH credentials and verifies host keys by pinning fingerprints, refusing connections when a host key mismatches.
  • •Runs shell commands or argv-style command arrays over SSH with a configurable timeout.
  • •Copies files over SFTP and directories or larger trees with rsync.
  • •Manages interactive SSH sessions and local or remote port-forwarding tunnels.

BEST FOR

  • •Running remote administrative commands such as checking uptime on a production host through an MCP client.
  • •Searching remote log files using multi-pattern grep through an argv-style command.
  • •Forwarding ports to access remote services through local tunnels.

ABOUT SSH-MCP-SERVER-KINOTHE-KAFKAESQUE

MCP server providing SSH remote access and execution is cataloged as an MCP server attributed to kinothe-kafkaesque. An MCP server that exposes SSH-based tools for running remote commands, copying files, managing interactive sessions, and creating port-forwarding tunnels, with credentials stored in a SQLite database. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server providing SSH remote access and execution are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does the server protect against host key changes?

It pins the host key fingerprint on first connection and refuses later connections presenting a different key with HOST_KEY_MISMATCH. After a legitimate key change, the credential must be removed and added again.

What does the CLI share with the MCP server?

The CLI shares the MCP server's SQLite credential store and uses an OpenSSH multiplexed connection so separate invocations for the same host, username, and key reuse one authenticated transport.

上游原版 README

在 GitHub 查看同一版本原文

README.md · a0c44bc091b0 · 采集于 2026-11-13 10:11:57 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

SSH MCP Server

smithery badge

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 18 or higher
  • 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 stores named credentials, then every remote action refers to a credentialName. privateKeyPath must point to an existing private key (~/ expands to your home directory).

Host keys are verified: the first time a credential connects, the server's host key fingerprint is pinned in ~/ssh.db. Later connections that present a different key are refused with HOST_KEY_MISMATCH. To pin a known key up front, pass hostKeyFingerprint (the SHA256:... value printed by ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub on the server). After a legitimate key change, remove the credential and add it again.

  • add_credential: save { "name", "host", "username", "privateKeyPath", "hostKeyFingerprint"? }.
  • list_credentials: list stored credential records.
  • remove_credential: delete { "name" }.
  • ssh_exec: run a shell command with { "credentialName", "command", "timeout" }.
  • ssh_exec_raw: run an argv-style command array, for example { "credentialName": "prod", "command": ["grep", "-E", "foo|bar", "/var/log/app.log"] }.
  • scp_copy: copy one file over SFTP with { "credentialName", "localPath", "remotePath", "direction" }.
  • rsync_copy: copy directories or larger trees with rsync and the same transfer shape.
  • ssh_session_start, ssh_session_send, ssh_session_read, ssh_session_end, ssh_session_list: manage interactive SSH sessions.
  • ssh_tunnel_start, ssh_tunnel_list, ssh_tunnel_stop: manage local or remote port-forwarding tunnels.

Example:

{
  "tool_name": "ssh_exec",
  "arguments": {
    "credentialName": "prod",
    "command": "uptime",
    "timeout": 120000
  }
}

Starting the server

npm start

The server will start running on the configured port (default settings can be modified in the source code).

CLI Usage

The CLI shares the MCP server's ~/ssh.db credential store. For remote work it uses an OpenSSH multiplexed connection, so separate CLI invocations for the same host, username, and key reuse one authenticated transport. Build first, then run with npm run cli -- or via the sshcli bin after npm link:

npm run build && npm run cli -- <command>
# or, after linking:
npx sshcli <command>

Commands:

sshcli creds add prod --host 1.2.3.4 --user ubuntu --key ~/.ssh/id_rsa
sshcli creds list
sshcli creds rm prod
sshcli exec prod uptime
sshcli exec prod --timeout 30000 -- df -h /
sshcli exec --raw prod grep -E 'foo|bar' /var/log/app.log
sshcli scp prod ./file.txt /tmp/file.txt toRemote
sshcli rsync prod ./dir/ /tmp/dir/ fromRemote
sshcli session prod   # live interactive shell; Ctrl+D or exit to close
sshcli tunnel prod --type local --local-port 8080 --remote-host localhost --remote-port 80
sshcli cache status prod
sshcli cache close prod

Notes:

  • For exec, the variadic <command...> is greedy, so put options like --timeout and --raw before the command tokens.
  • exec, scp, rsync, session, and tunnel all reuse the same connection. Idle connections remain cached for 30 minutes by default.
  • The first connection attempt for an endpoint is serialized across CLI processes. A failed attempt creates a 15-second exponential reconnect backoff (up to 5 minutes), preventing repeated calls from hammering a rate-limited host.
  • session and tunnel are foreground commands that block until the shell closes or you press Ctrl+C, respectively; exiting them does not close the shared transport.
  • The CLI intentionally omits session send/read/end/list and tunnel list/stop commands: their in-memory state does not persist across one-shot CLI invocations. Use the foreground session and tunnel commands instead.
  • The cache lives under $XDG_RUNTIME_DIR/sshcli/connections (or a private per-user temporary directory). Tune it with SSHCLI_CONTROL_PERSIST_SECONDS, SSHCLI_RECONNECT_BACKOFF_MS, SSHCLI_RECONNECT_BACKOFF_MAX_MS, or SSHCLI_CACHE_DIR.
  • OpenSSH, scp, and rsync must be available in PATH for their corresponding CLI commands.

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

MIT

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

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server providing SSH remote access and execution from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/ssh-mcp-server-kinothe-kafkaesque)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools