What are the prerequisites for running A Better Mcp ssh Server?
Go 1.25.0 or later must be installed, along with SSH (tested on macOS). A `~/.ssh/config` file is required to define host entries.
@zhangyc310
A Better Mcp ssh Server.
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"ssh": {
"command": "/your_path_to_mcpssh/mcpssh",
"args": []
}
}
}Initiates a new SSH connection to a specified host using a PTY. Returns a `session_id`.
Sends input to and reads output from an active SSH session. This allows for interactive shell usage (e.g., handling prompts, running scripts).
Terminates an active SSH session and cleans up resources.
A Better Mcp ssh Server is a Go-based MCP server that manages SSH sessions for AI agents. It enables an AI to interact with remote servers via SSH by creating persistent sessions, sending commands, and reading outputs through a pseudo-terminal (PTY) interface. It reads hosts from ~/.ssh/config, so users do not need to list every host in the MCP configuration file.
Build the binary with go build -o mcpssh (requires Go 1.25.0+ and SSH installed). Then configure your MCP client (e.g., Codex or Gemini) to run the binary as a command server without arguments. After setup, the AI can connect to any host defined in ~/.ssh/config by name using the provided tools.
~/.ssh/config automaticallyGo 1.25.0 or later must be installed, along with SSH (tested on macOS). A `~/.ssh/config` file is required to define host entries.
It reads host definitions from `~/.ssh/config`. There is no need to add every host to the MCP configuration file; the AI can reference hosts by their config alias.
Three tools: `start_session` (initiates SSH connection and returns a session ID), `interact_session` (sends input to and reads output from the PTY), and `close_session` (terminates the session and cleans up resources).
The server depends on `github.com/mark3labs/mcp-go` (MCP SDK), `github.com/creack/pty` (PTY management), and `github.com/google/uuid` (session ID generation).
Each `start_session` call creates a persistent PTY-based SSH connection and returns a unique session ID. The AI uses `interact_session` to send commands and read outputs, and `close_session` to terminate the session.

Automated codebase documentation for GitHub: searchable docs, MCP context for AI agents, doc drift detection, and Friday Cleanup PRs.

Windframe MCP gives your AI the design taste needed to create consistent, production-ready UI that feels intentionally designed. Available at https://windframe.dev/mcp

Official Porkbun MCP server, maintained by Porkbun. Check domain availability and pricing, register, renew and transfer domains, and manage DNS records, nameservers, URL forwarding, glue records, DNSSEC and domain contac


Routebase keeps your API's design, docs, contract tests, mocks and monitoring in one living OpenAPI spec so they can't drift apart. Agents work on that same source of truth, under your team's permissions.
评论