Mcp Sudo

io.github.KamaruSamaPublished by GitHub account KamaruSamav1.0.1Updated Oct 24, 2026

Run sudo commands with a Fernet-encrypted password bound to machine-id + user.

VerifiedSTDIODesktop onlyDeveloper ToolsSecurity & Monitoring

Overview

AI-generated overview

Lets an assistant store a sudo password locally and run privileged shell commands without re-entering credentials.

What you can do
Exposes four tools: store_password to cache the sudo password once, sudo_exec to run shell commands with sudo, has_password to check whether a password is stored, and clear_password to remove it. The password is encrypted with Fernet using a key derived from machine-id and USER, and the encrypted blob is kept at a config path with chmod 600. It is intended for single-user Linux workstations.
When to use it
Use it on a single-user Linux workstation when you want an assistant to run privileged commands repeatedly without typing the sudo password each time. It is not a secrets manager, so it is a poor fit for shared machines or multi-user systems.
Requirements
A local Python runtime (the package is installed from PyPI, with Python 3.12 and the mcp and cryptography packages shown in the README) and a Linux machine with machine-id and a USER value. It runs as a local stdio process and is desktop-only; no API keys or remote accounts are declared.
Before you install
It stores your sudo password on disk, encrypted with a key derived from machine-id and USER; the README warns that if machine-id is copied to another box or another user can read the MCP process, the password can be recovered. sudo_exec runs arbitrary privileged shell commands, which can change or delete system data. Treat it as session convenience, not a secrets manager.

Installation

In SourceWeft

  1. Open Mcp Sudo in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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

ToolPurpose
store_passwordStore sudo password (encrypted, one-time)
sudo_execRun shell command with sudo
has_passwordCheck if password is stored
clear_passwordRemove 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

bash
cd /path/to/mcp-sudouv venv --python 3.12 .venvuv 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 ❤


Contact


Copyright © 2026 likezara™. All rights reserved. Developed by Kamaru (pen name).

Source: README.md at commit 788e63b

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.1LatestSep 16, 2026

Score

40% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.