Skip to main content

A secure and scoped SSH MCP server for executing safe read-only diagnostic commands over SSH

Project description

Safe SSH MCP Server

A secure and scoped SSH MCP server for executing read-only diagnostic commands over SSH.
In this project, "safe" refers specifically to host safety: the server is designed to prevent modifications to the remote system and reduce the risk of operational harm. It does NOT attempt to guarantee that command output cannot be misused by external agents.

Badges

Snyk Vulnerability Database report - security check
PyPI Downloads

Overview

The core philosophy behind this MCP server is safety first. Instead of providing an AI agent with an unrestricted bash shell, this server exposes only carefully curated, read-only commands for system diagnostics and monitoring.

Available Tools (Partial List)

  1. get_disk_free : df -h
  2. get_disk_usage : find <path> -mindepth 1 -maxdepth 1 -exec du -sh -- {} + 2>/dev/null | sort -rh | head -n 20
  3. get_dmesg : dmesg
  4. get_uptime : uptime
  5. get_current_datetime : date
  6. get_distroname_version : cat /etc/os-release
  7. get_systemd_list_all : systemctl list-units --all --no-pager
  8. get_systemd_list_failed : systemctl list-units --state=failed --no-pager
  9. get_systemd_list_timers : systemctl list-timers --no-pager
  10. get_crontab_tasks: crontab -l
  11. get_systemd_status : systemctl status {daemon}
  12. get_top : top -b -n 1 -c

Example of invocation

okay, could u check disk usage on /root/ path with help of safe-ssh-mcp server on a remote myserver.mydomain.pro using root and /Users/myUser/.ssh/id_rsa to login?

Project Contents

  1. mcp_ssh.py - the SSH MCP server
  2. mcp_config.ini - the server's config
  3. check_health_sse.py - check the server's tools and either it's up (sse transport)
  4. check_health_stdio.py - check the server's tools and either it's up (stdio transport)

Compatibility

Tested manually on Python3.11 running on MacOS against remote Ubuntu server
Autotested with Python 3.11 3.12 3.13 3.14

The MCP Registry

mcp-name: io.github.Areso/safe-ssh-mcp

The License

This project is licensed under the GNU AGPLv3 License.

Why AGPL?

This server acts as core infrastructure and contains no business logic. By using the AGPL license, we ensure that any security improvements, bug fixes, or new diagnostic tools added to the server are shared back with the open-source community.

Note for Client Developers

Because MCP clients communicate with this server via standard Inter-Process Communication (IPC) or network protocols (like HTTP/SSE), the AGPL license does not "infect" or restrict the client applications connecting to it.
You can safely connect proprietary, closed-source, or permissively licensed (e.g., MIT, Apache 2.0) AI agents to this server without violating the license terms.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safe_ssh_mcp-0.1.13.tar.gz (51.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

safe_ssh_mcp-0.1.13-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

Details for the file safe_ssh_mcp-0.1.13.tar.gz.

File metadata

  • Download URL: safe_ssh_mcp-0.1.13.tar.gz
  • Upload date:
  • Size: 51.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for safe_ssh_mcp-0.1.13.tar.gz
Algorithm Hash digest
SHA256 ed460eb5159c26352f24668ba1df3815890cf9683e2604416edb02607fcbd906
MD5 8508f1e716db19f83d6bf89e5a0fa606
BLAKE2b-256 db689267ae4ce7ebd59b78882f013a38b6a33fa539def8cc5384a26c0ccbbaf0

See more details on using hashes here.

Provenance

The following attestation bundles were made for safe_ssh_mcp-0.1.13.tar.gz:

Publisher: publish.yml on Areso/safe-ssh-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file safe_ssh_mcp-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: safe_ssh_mcp-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for safe_ssh_mcp-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 1c1fe3c8e0b927fa10fd57ec511cdc1ff63cb8b20c19fcd3929339dd5259f8b7
MD5 8f00c960a4251e6bfe6400caa0e3d4bd
BLAKE2b-256 2bfa61e903d5fedff47192879c178d1663541dfd1b317bfc57fdad3d02ac28c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for safe_ssh_mcp-0.1.13-py3-none-any.whl:

Publisher: publish.yml on Areso/safe-ssh-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page