
Mcp Sudo
io.github.KamaruSama由 GitHub 帳號 KamaruSama 發布v1.0.1更新於 Oct 24, 2026
Run sudo commands with a Fernet-encrypted password bound to machine-id + user.
概覽
讓助理在本機保存 sudo 密碼,並在不必重複輸入認證的情況下執行特權 shell 指令。
- 可以做什麼
- 提供四個工具:store_password 一次性快取 sudo 密碼,sudo_exec 以 sudo 執行 shell 指令,has_password 檢查是否已儲存密碼,clear_password 移除已儲存的密碼。密碼以 Fernet 加密,金鑰由 machine-id 與 USER 衍生,加密檔案存放在設定路徑下並設為 chmod 600。此伺服器鎖定單一使用者的 Linux 工作站。
- 適用情境
- 適用於單一使用者的 Linux 工作站,希望助理反覆執行特權指令而不必每次輸入 sudo 密碼的情境。它不是密鑰管理器,因此不適合共用機器或多使用者系統。
- 執行需求
- 需要本機 Python 執行環境(從 PyPI 安裝,README 中顯示 Python 3.12 以及 mcp 和 cryptography 套件),以及具備 machine-id 與 USER 值的 Linux 機器。它以本機 stdio 程序執行,僅限桌面端;未宣告需要 API 金鑰或遠端帳號。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mcp Sudo,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
mcp-sudo
MCP server for running sudo commands with encrypted password storage.
Exposes 4 tools to persist a sudo password (encrypted with a machine-bound key) and invoke privileged commands without re-entering credentials. Designed for single-user Linux workstations.
Tools
Security model
- Password is encrypted with Fernet (AES-128-CBC + HMAC-SHA256).
- Encryption key is derived from
machine-id+USER— never stored on disk. - Decryption only succeeds on the same machine with the same user.
- Encrypted blob lives at
~/.config/claude-sudo-mcp/credential.enc(chmod 600).
This is not a secrets manager. Treat this as "remember my sudo password for this session on this box." If your machine-id is copied to another box or another user reads the MCP process, the password can be recovered.
Install
On first use, call store_password once to cache credentials.
Support the project ❤
- Ko-fi: https://ko-fi.com/kamaru
Contact
- Portfolio / general: [email protected]
- Commercial / licensing: [email protected]
Copyright © 2026 likezara™. All rights reserved. Developed by Kamaru (pen name).
來源:README.md,提交 788e63b
工具
0版本歷史
1- v1.0.1最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。