mcp-sudo
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-sudo update all system packages"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Tool | Purpose |
Store sudo password (encrypted, one-time) | |
Run shell command with sudo | |
Check if password is stored | |
Remove stored password |
Related MCP server: cursor_admin_mcp
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
cd /path/to/mcp-sudo
uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python mcp cryptography
claude mcp add sudo -s user -- \
/path/to/mcp-sudo/.venv/bin/python /path/to/mcp-sudo/server.pyOn first use, call store_password once to cache credentials.
Support the project ❤
Ko-fi: https://ko-fi.com/kamaru
Contact
Portfolio / general: k.kamarux@gmail.com
Commercial / licensing: contact@likezara.com
Copyright © 2026 likezara™. All rights reserved. Developed by Kamaru (pen name).
Available Tools
4 toolsclear_passwordB
Remove the stored sudo password.
Inputs: no named parameters. Returns: result
has_passwordA
Check if a sudo password is already stored.
Inputs: no named parameters. Returns: result
store_passwordC
Store sudo password encrypted. Only needs to be done once.
Inputs: password (required). Returns: result
sudo_execA
Execute a command with sudo using the stored password.
Args: command: The shell command to run with sudo. timeout: Timeout in seconds (default 120).
Inputs: command (required), timeout. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clear, distinct purpose: storing, checking, clearing password, and executing commands. No overlap or ambiguity between tools.
All tool names follow a consistent verb_noun pattern (store_password, has_password, clear_password, sudo_exec) with snake_case. The naming is predictable and clear.
With 4 tools covering password management and sudo execution, the number is perfectly scoped for the domain. Each tool serves a necessary function without redundancy.
The tool set covers the essential password lifecycle and command execution. A minor gap is the lack of an explicit update tool, but store_password likely allows overwriting.
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Hosted remote MCP for protected account access, permissions, activity history and supported undo.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that enables secure execution of shell commands across Windows, macOS, and Linux with built-in whitelisting and approval mechanisms for enhanced security.9114 npm23MIT
- AlicenseAqualityCmaintenanceA cross-platform MCP server providing secure, user-approved privilege escalation for Cursor agents, with tools for running commands as admin on Windows and root on Linux.2MIT
- FlicenseAqualityBmaintenanceCross-platform MCP server for policy-controlled command execution on Linux and Windows, with no SSH dependency.3-
- AlicenseAqualityDmaintenanceAn MCP server for SSH/SCP operations with passwordless authentication, enabling remote command execution, file transfer, and session management.1926 npm1MIT