# 2native SSH MCP Server [Health: Active]

**Category:** 🖥️ Command Line  
**Repository:** https://github.com/daidaiJ/2native-ssh-mcp  
**GitHub Stars:** 0  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/2native-ssh-mcp-server

## Description
SSH-based MCP server for remote command execution and file transfer. Credentials stay local.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/daidaiJ/2native-ssh-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
go build -o 2native-ssh-mcp.exe .
```

2. Start the server:

```sh
2native-ssh-mcp.exe --config-file config.json
```

3. Start the server:

```sh
2native-ssh-mcp.exe start --config-file config.json --http-addr 127.0.0.1:8338
```

## Documentation

## What 2native SSH MCP Server does

2native SSH MCP Server gives an MCP-compatible AI client access to remote machines through SSH. The local process handles the connection, authentication, command execution, and file operations; the model interacts with MCP tools rather than receiving the underlying SSH credentials.

Four tools are exposed:

- `list-servers` discovers configured SSH server entries.
- `execute-command` runs commands remotely, with a background mode for long-running work.
- `session` provides session-oriented SSH access.
- `file-transfer` handles file operations between the local and remote systems.

Command output containing ANSI control sequences is cleaned up. Large output can be written to a local `.ssh-mcp-out/` directory so an agent can inspect it without rerunning the command.

## How it works

The server can run as a local stdio process launched by an MCP client or as a persistent streamable HTTP daemon. In either mode, the process creates SSH connections to configured hosts and keeps authentication material local. Connections support lazy establishment and keepalive behavior.

Remote commands can run without allocating a PTY by default. A timeout can terminate the remote process group, while background jobs can survive a disconnected client and be attached again later. File transfers support recursive directories, atomic writes, deduplication, resume behavior, SHA-256 verification, and progress notifications.

For network layouts that require an intermediary, the `via` setting supports OpenSSH ProxyJump-style access through a bastion. Each hop can authenticate independently, and agent forwarding is not used.

## Setup and configuration

Build the Go binary with:

```bash
go build -o 2native-ssh-mcp.exe .
```

Start it in stdio mode by supplying a configuration file:

```bash
2native-ssh-mcp.exe --config-file config.json
```

For a persistent HTTP service, use the `start` command and bind an address:

```bash
2native-ssh-mcp.exe start --config-file config.json --http-addr 127.0.0.1:8338
```

SSH credentials can be configured through the configuration file or environment variables. Supported authentication methods include passwords, private keys, ssh-agent, Pageant, and keyboard-interactive two-factor authentication. Environment variables can provide a fallback for unattended two-factor prompts.

## Tools and capabilities

Security controls include command allowlists and blocklists, path allowlists, configuration-permission checks, and optional approval prompts for destructive commands. The `ask-destructive` approval mode uses MCP elicitation when the client supports it; clients without that capability use the server's stated fallback behavior.

Every command can be recorded in a JSONL audit log. Entries form a SHA-256 hash chain, and the `audit-verify` function can identify later changes to the chain. Logging can use batched or write-through persistence.

The server also negotiates SSH algorithms for compatibility with older hosts and supports proxy connections. Its transfer handling includes checksums and progress reporting, while command handling includes output capture and background execution.

## Limitations and notes

The server exposes SSH access to whatever hosts and permissions are configured, so command and path restrictions should be selected for the deployment. Destructive-command approval is optional rather than universally enforced. MCP elicitation is required for interactive approval prompts; clients that cannot provide it follow the server's fallback behavior. The HTTP example binds to loopback, which limits access to the local machine unless deployment settings are changed.

_Full upstream README: https://allmcps.com/mcp/2native-ssh-mcp-server/readme_

