mcp-sudo
Click on "Install 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-sudoupdate 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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description only says 'remove' without disclosing side effects, safety implications, or what happens if no password is stored. The agent cannot assess behavioral impact.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence that is concise and to the point. However, it could be slightly expanded to include behavioral context without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity and presence of an output schema, the description is overly minimal. It lacks context on the tool's effect on system state, error conditions, and security implications, which are important for a password management tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has no parameters, and the input schema is fully covered (100%). The description does not add parameter info because none exist, meeting the baseline of 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Remove the stored sudo password' clearly states the verb (remove) and the resource (stored sudo password), distinguishing it from siblings like has_password (check) and store_password (set).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. For example, it does not mention prerequisites like whether a password must exist, or that it should be called before storing a new password.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
has_passwordA
Check if a sudo password is already stored.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears the full burden. It states it checks if a password is stored, which is a simple read operation. However, it does not explicitly confirm no side effects or mention any preconditions, so it is adequate but not detailed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence that conveys the purpose efficiently with no unnecessary words. It is front-loaded and earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (zero parameters, an output schema exists), the description is complete enough. It tells an agent everything needed to understand the tool's role.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, and schema_description_coverage is 100% (trivially). With zero parameters, the baseline is 4; the description does not need to add parameter info.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Check' and the resource 'sudo password', and it distinguishes itself from siblings like 'clear_password', 'store_password', and 'sudo_exec' by focusing on checking existence.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its siblings (e.g., after storing a password, before executing with sudo). There is no mention of prerequisites or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
store_passwordC
Store sudo password encrypted. Only needs to be done once.
| Name | Required | Description | Default |
|---|---|---|---|
| password | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses encryption and one-time nature, but fails to explain behavior on repeated calls (overwrite?), required permissions, side effects, or security guarantees. For a sensitive operation, more detail is needed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences are concise, but the description is under-specified for a security tool. The structure is adequate, but could include more details without exceeding reasonable length.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of sibling tools and output schema, the description lacks completeness. It does not explain what the tool returns, error conditions, or how it fits into the sudo workflow (e.g., required before sudo_exec). A more complete description would link to siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, and the description adds no meaning to the 'password' parameter beyond the schema's type and requirement. No constraints, format, or security hints are provided, leaving the agent without guidance on valid input.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Store sudo password encrypted', specifying the verb and resource. It distinguishes from siblings like 'clear_password', 'has_password', and 'sudo_exec' by implying a setup action, though not explicitly contrasting them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Only mentions 'Only needs to be done once', which hints at a one-time setup but provides no explicit guidance on when to use this tool versus alternatives like 'has_password' (to check existence) or 'sudo_exec' (to use the password). No prerequisites or conditions are stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| timeout | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states that the command runs with sudo, but does not disclose side effects (e.g., elevated privileges, potential system changes), failure modes (e.g., timeout, permission errors), or dependencies (e.g., stored password existence). More detail is needed for safe usage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise: two sentences plus a structured Args list. Every line serves a purpose. No extraneous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (sudo execution) and the presence of an output schema (but not described), the description is minimally adequate. It lacks context about prerequisites (password must be stored), error behavior, and security implications. However, it covers the basic purpose and parameters. More detail would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It explains both parameters: 'command' is a shell command string, and 'timeout' is an integer defaulting to 120 seconds. This adds clear meaning beyond the schema's property names and types. However, it could be more specific (e.g., timeout is in seconds, not milliseconds).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool executes a command with sudo using the stored password. It uses a specific verb 'execute' and identifies the resource as a command with sudo. This distinguishes it from sibling tools that manage passwords (clear_password, has_password, store_password).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., password must be stored) or situations where a different tool (like a non-sudo command executor) should be used. Sibling tools are about password management, so usage context is implied but not explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
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.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
A paid remote MCP for hosted MCP server, built to return verdicts, receipts, usage logs, and audit-r
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.911720MIT
- AlicenseAqualityBmaintenanceA 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
- AlicenseAqualityBmaintenanceAn MCP server for SSH/SCP operations with passwordless authentication, enabling remote command execution, file transfer, and session management.199MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/KamaruSama/mcp-sudo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server