MCP server for running sudo commands with encrypted password storage. Part of likezara™ MCP suite.
Project description
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_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 |
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.py
On 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).
Project details
Release history Release notifications | RSS feed
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 mcp_sudo-1.0.0.tar.gz.
File metadata
- Download URL: mcp_sudo-1.0.0.tar.gz
- Upload date:
- Size: 4.8 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":{"name":"Arch Linux","version":null,"id":null,"libc":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 |
6a43003a79f732fe112fd1f68d0e76690f9747b0c0830baf9af0a23f69525962
|
|
| MD5 |
8732f3339f36c2c6e2eb867ad0c5febc
|
|
| BLAKE2b-256 |
c9dd7fdf92f8bb7b3203d4ba11c435f65460c8b11aff8771c2f95c06446aa09e
|
File details
Details for the file mcp_sudo-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mcp_sudo-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.2 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":{"name":"Arch Linux","version":null,"id":null,"libc":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 |
bc6d29781a70ee85cff553139e90fec36c7fe2a1f07ee2af62524ccaa57a90f7
|
|
| MD5 |
ca08072a7f1c919fceaa719e5d29e4ca
|
|
| BLAKE2b-256 |
17d8385b8a06dcf7015ce4d85ace40a43d3cb45a9c389685aee3a2105f283a97
|