Execute a secure shell in Claude Desktop using the Model Context Protocol.
A Node.js implementation of the Model Context Protocol (MCP) that provides secure shell command execution capabilities. This server allows AI models to execute shell commands in a controlled environment with built-in security measures. Easily integrates with Claude Desktop for connecting Claude with your shell.
Run npx mcp-shell
.
To add it to Claude Desktop, run npx mcp-shell config
. Or add npx -y mcp-shell
to your config manually.
Start (or restart) Claude Desktop and you should see the MCP tool listed on the landing page.
The server implements several security measures:
Command Blacklisting
Command Validation
The server provides one tool:
Executes a shell command and returns its output.
Input Schema:
{
"type": "object",
"properties": {
"command": { "type": "string" }
}
}
Response:
The following command categories are blocked for security:
The server includes comprehensive error handling:
The server is built using:
To modify the security settings, you can:
BLACKLISTED_COMMANDS
set to adjust blocked commandsvalidateCommand
function to add additional validation rulesCallToolRequestSchema
handler