Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

SSH — policy-gated remote access

MCP server by tufantunc Community

Gives LLM agents policy-gated SSH access to Linux and Windows hosts, with command classification, role-based authorization, approvals and audit logging.

  • Score 90
  • 922 stars
  • 16k a week
  • MIT
  • Updated

Install SSH — policy-gated remote access

Built from the published package, never by AI.

claude mcp add ssh-policy-gated-remote-access -- npx -y ssh-mcp

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install SSH — policy-gated remote access in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the ssh-policy-gated-remote-access block.

About

SSH MCP Server is a Model Context Protocol server that gives LLM agents controlled SSH access to remote hosts. It classifies each command before running it, checks it against a role and host-group policy, and asks for human approval on destructive work. Every decision is recorded in an audit log, whether the command runs or not.

The server needs a config.toml file that names hosts, roles and approval policy, and it refuses tool calls until one exists. Linux and macOS configs must be owner-only. The README says the risk is not removed: it recommends never pointing it at a root account. It is for people who want LLM agents to reach remote Linux or Windows hosts with controls in place.

Written from the project's README and checked against it.

Tools it gives your assistant

  • read-commandRuns allowlisted read-only commands such as ls, cat and grep on a remote host.
  • run-commandRuns arbitrary commands, with destructive or privileged ones needing approval unless set to auto.
  • privileged-commandRuns a command with sudo, subject to approval unless the profile uses auto approval.
  • open-sessionCreates a named interactive (stateful) or background session on a host.
  • sftp-listLists a remote directory, bounded in entries and bytes.
  • sftp-upload-fileStreams a local file to the remote host without sending its bytes through model context.
  • sftp-download-fileStreams a remote file to local disk without sending its bytes through model context.
  • signal-processSends INT, TERM or KILL to a remote process ID.
  • list-connectionsLists available hosts and their connection status.
  • reload-configShows the config file status or re-reads and applies it without a restart.

What you need

  • npm to install the ssh-mcp package
  • A config.toml file at the platform config path
  • An SSH key, SSH agent, or SSH_MCP_PASSWORD for password auth
  • Linux, macOS or Windows
SettingNeededWhat it is
SSH_MCP_PASSWORDEnvironment variable, secretOptionalPassword for the configured profile; a per-profile SSH_MCP_<PROFILE>_PASSWORD takes precedence. Credentials are never accepted as CLI arguments.
SSH_MCP_KEYEnvironment variableOptionalPath to the private key file to authenticate with — the path, not the key material. A per-profile SSH_MCP_<PROFILE>_KEY takes precedence.
SSH_MCP_PASSPHRASEEnvironment variable, secretOptionalPassphrase for an encrypted private key.
SSH_MCP_SUDO_PASSWORDEnvironment variable, secretOptionalPassword the sudo tool escalates with, when the policy in force allows the privileged class.

From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.

Try asking

  • Run uptime on the dev host and tell me the load average
  • Show the status of the nginx service on the staging server
  • Download the latest app log from the server into my transfer folder

Good to know

  • Refuses every tool call until a config file is present, except reload-config.
  • The SFTP transfer tools stay off until defaults.transferRoot is set.
  • The SFTP transfer tools are not available on Windows.
  • Policy narrows the blast radius of prompt injection but does not remove the risk.

Security check

C
  • Downloads a script from the internet and runs itIn README.md: curl|sh
  • Asks for administrator rights (sudo)In README.md: sudo

Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to SSH — policy-gated remote access

All alternatives →
Agentmesh MCP Proxy microsoft
94

Agentmesh MCP Proxy is a security proxy for MCP servers, described by its publisher as a firewall for the Model Context Protocol. It is aimed at teams that run AI agents which call tools and other agents.

AAA Local 6.6k
Bla qybaihe
94

Hardens client-side artifacts such as binaries, Electron apps, JS bundles, Python and WebAssembly against AI reverse-engineering agents. Built for developers who ship proprietary logic to user-controlled devices.

AAA Local 7.3k
Bla Agents qybaihe
94

Bla Agents is an MCP server and CLI that adds seeded, format-specific decoys to shipped binaries, JavaScript, WebAssembly and other artifacts. It is for developers who ship proprietary logic to user-controlled devices and want to make AI reverse-engineering slower.

AAA Local 11k/wk
MCP Auth zgeoff
94

A shared OAuth server for the MCP route of an app, built on better-auth, with passkey sign-in for the owner

AAC Local 44k/wk
Agentos MCP Server microsoft
94

Agent Governance Toolkit adds policy enforcement, identity, sandboxing and audit logging to autonomous AI agents. It is aimed at teams shipping agents to production. The source does not confirm the Claude Desktop MCP server named in the listing.

AAA Local 6.6k
Convex MCP Gateway tfohlmeister
93

Convex MCP Gateway is a Convex component that exposes selected Convex functions as MCP tools. It checks each call with your own authorize callback and writes an audit log. It is for developers who run Convex apps and want AI assistants to call parts of them.

AAC Local 37k/wk

Compare with Agentmesh MCP Proxy, Bla or Bla Agents

SSH — policy-gated remote access: common questions

Does it stop prompt injection?

No. The README says prompt injection has no general fix, so the server classifies, authorizes and gates commands to narrow the blast radius, and it records each decision.

How does it check the config file permissions?

On Linux and macOS the server refuses to start if the file or its directory is not owner-only. On Windows it reads the ACL and refuses writes by other accounts.

Can it move large files without filling the model context?

Yes. sftp-upload-file and sftp-download-file stream between the remote host and local disk, and the response is only a byte count and two paths.

How do I install SSH — policy-gated remote access?

In Claude Code run claude mcp add ssh-policy-gated-remote-access -- npx -y ssh-mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is SSH — policy-gated remote access the official server?

SSH — policy-gated remote access is a community project by tufantunc, not verified by a company domain.

Is SSH — policy-gated remote access free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is SSH — policy-gated remote access safe to use?

It scores 90 of 100. Grades: maintenance A, licence A, quality A. Security check: grade C (downloads a script from the internet and runs it). Review the code before you install. How grades work.

What are alternatives to SSH — policy-gated remote access?

Similar MCP servers: Agentmesh MCP Proxy, Bla, Bla Agents, MCP Auth.

Does SSH — policy-gated remote access work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

SSH — policy-gated remote access Install

Add to stack

Loading.