Run sudo commands with a Fernet-encrypted password bound to machine-id + user.
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.
| Tool | Purpose |
|---|---|
store_password | Store sudo password (encrypted, one-time) |
sudo_exec | Run shell command with sudo |
has_password | Check if password is stored |
clear_password | Remove stored password |
machine-id + USER — never stored on disk.~/.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.
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.py
On first use, call store_password once to cache credentials.
Copyright © 2026 likezara™. All rights reserved. Developed by Kamaru (pen name).
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
uvx mcp-sudoMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-kamarusama-mcp-sudo": {
"command": "uvx",
"args": [
"mcp-sudo"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencemcp-sudopypiio.github.KamaruSama/mcp-sudo works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.