High-performance SSH & SFTP MCP Server for Linux
Project description
SSH & SFTP MCP Server (ssh-mcp-vn)
Một MCP (Model Context Protocol) Server mạnh mẽ dùng để thực thi lệnh (SSH) và truyền tải file (SFTP) trên nhiều máy chủ Linux từ xa (multi-host) cùng lúc.
Hướng dẫn cài đặt
Chạy qua UVX (Được khuyến nghị)
Bạn có thể chạy trực tiếp server này qua uvx mà không cần phải tải hay cài đặt thủ công:
uvx ssh-mcp-vn
Các tính năng chính
- Hỗ trợ Multi-host: Có thể tương tác với nhiều máy chủ Linux mà không cần chạy nhiều instance.
- Thực thi qua SSH: Chạy lệnh bash/shell tùy ý trên máy chủ từ xa.
- Quản lý thư mục: Dễ dàng tạo cấu trúc thư mục từ xa (hoạt động giống lệnh
mkdir -p). - Tải lên qua SFTP: Đẩy file từ máy tính cá nhân lên máy chủ từ xa.
- Tải về qua SFTP: Tải file từ máy chủ từ xa về máy tính.
- Liệt kê file bằng SFTP: Xem danh sách các file trong một thư mục bất kỳ trên máy chủ.
Cấu hình (Khuyên dùng qua File JSON)
Vì mảng cấu hình có thể khá dài và việc viết chuỗi JSON dính liền với các dấu \ (escape) trong cấu hình môi trường sẽ phức tạp, bạn nên tách cấu hình ra một file JSON riêng biệt.
Bước 1: Tạo một file có tên ssh_servers.json ở bất kỳ đâu trên máy của bạn (ví dụ C:\Users\NamHT\ssh_servers.json) và điền danh sách các server dạng mảng thuần túy:
[
{
"name": "production_server",
"host": "192.168.1.100",
"user": "root",
"password": "mat_khau_1",
"port": 22
},
{
"name": "staging_server",
"host": "192.168.1.101",
"user": "ubuntu",
"key_path": "/path/to/key.pem"
}
]
Bước 2: Cập nhật mcp_config.json của ArcticFactory chỉ truyền vào biến SSH_CONFIG_FILE trỏ đến file đó:
{
"mcpServers": {
"ssh-server": {
"command": "uvx",
"args": [
"ssh-mcp-vn"
],
"env": {
"SSH_CONFIG_FILE": "C:\\Users\\NamHT\\ssh_servers.json"
}
}
}
}
Các trường trong từng block JSON cấu hình
Mỗi object của một server hỗ trợ các trường sau:
name(bắt buộc): Tên gọi riêng cho server này (VD: "production", "staging") để giúp công cụ AI nhận biết server muốn thao tác.host(bắt buộc): Địa chỉ IP hoặc Hostname của máy chủ SSH.user(bắt buộc): Tên đăng nhập (username).port(tùy chọn): Cổng SSH, mặc định là 22.password(tùy chọn): Mật khẩu đăng nhập.key_path(tùy chọn): Đường dẫn tuyệt đối đến file khóa bí mật (private key) nếu dùng key để đăng nhập.
Danh sách công cụ (Tools)
(Tất cả các công cụ đều yêu cầu tham số server_name để hệ thống biết sẽ thao tác trên máy chủ nào).
ssh_execute_command: Chạy một lệnh shell trên máy Linux từ xa.ssh_create_folder: Tạo thư mục từ xa.sftp_upload_file: Chuyển một file từ local lên máy chủ.sftp_download_file: Lấy một file từ máy chủ về local.sftp_list_directory: Liệt kê tất cả file trong một thư mục từ xa.
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ssh_mcp_vn-0.1.1.tar.gz.
File metadata
- Download URL: ssh_mcp_vn-0.1.1.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3e517a15c673b7678e6c1af98869f65a9ace5d4fbf2e39fb98559485381c862
|
|
| MD5 |
929145223feb6cb2346a1aef5472e7bf
|
|
| BLAKE2b-256 |
6f125197a93c15bce481450d308ae47e02e0990e9fee373852498d9c558440ad
|
File details
Details for the file ssh_mcp_vn-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ssh_mcp_vn-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd6a643dcddc372143e21036268dcf9d9dadc299f47b0748f8b95491c1f02838
|
|
| MD5 |
ec1ff16ecdee7c2ca5b686ab837ae9d7
|
|
| BLAKE2b-256 |
99da0f681420ecaaae6ffe5cbc29af3f1229a5b80dfa071155f13886e4ea5c43
|