Super Shell 标志

Super Shell

社区
cfdude

Super Shell MCP

发布者cfdude
代码仓库super-shell-mcp
语言JavaScript
复刻数
9
星标数
21
可用工具
9
传输类型stdio
分类
许可协议MIT
链接
  • 将工具接入 AI 工作流

    Super Shell 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 9 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 21 个 Star 和 9 个 Fork。

MseeP.ai Security Assessment Badge

Super Shell MCP Server

smithery badge

An MCP (Model Context Protocol) server for executing shell commands across multiple platforms (Windows, macOS, Linux). This server provides a secure way to execute shell commands with built-in whitelisting and approval mechanisms.

🎉 Now available as a Claude Desktop Extension! Install with one click using the .dxt package - no developer tools or configuration required.

Features

  • Execute shell commands through MCP on Windows, macOS, and Linux
  • Automatic platform detection and shell selection
  • Support for multiple shells:
    • Windows: cmd.exe, PowerShell
    • macOS: zsh, bash, sh
    • Linux: bash, sh, zsh
  • Shell parsing disabled by default to eliminate command-injection risk, with an explicit opt-in mode for trusted workflows
  • Command whitelisting with security levels:
    • Safe: Commands that can be executed without approval
    • Requires Approval: Commands that need explicit approval before execution
    • Forbidden: Commands that are explicitly blocked
  • Platform-specific command whitelists
  • Non-blocking approval workflow for potentially dangerous commands
  • Comprehensive logging system with file-based logs
  • Comprehensive command management tools
  • Platform information tool for diagnostics

Installation

Option 1: Claude Desktop Extension (.dxt) - Recommended

One-Click Installation for Claude Desktop:

  1. Download the super-shell-mcp.dxt file from the latest release

  2. Quick Install: Double-click the .dxt file while Claude Desktop is open

    OR

    Manual Install:

    • Open Claude Desktop
    • Go to Settings > Extensions
    • Click "Add Extension"
    • Select the downloaded super-shell-mcp.dxt file
  3. Configure (optional): Set custom shell path if needed

  4. Start using - The extension is ready to use immediately!

✅ Benefits of DXT Installation:

  • No developer tools required (Node.js, Python, etc.)
  • No manual configuration files
  • Automatic dependency management
  • One-click installation and updates
  • Secure credential storage in OS keychain

Option 2: Installing via Smithery

To install Super Shell MCP Server for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install @cfdude/super-shell-mcp --client claude

Option 3: Installing Manually

bash
# Clone the repository
git clone https://github.com/cfdude/super-shell-mcp.git
cd super-shell-mcp

# Install dependencies
npm install

# Build the project
npm run build

Usage

For Claude Desktop Extension Users (.dxt)

If you installed using the .dxt extension (Option 1), you're ready to go! No additional configuration needed. The extension handles everything automatically:

  • ✅ Automatic startup when Claude Desktop launches
  • ✅ Platform detection and appropriate shell selection
  • ✅ Built-in security with command whitelisting and approval workflows
  • ✅ Optional configuration via Claude Desktop's extension settings

For Manual Installation Users

If you installed manually (Option 2 or 3), you'll need to configure Claude Desktop or your MCP client:

Starting the Server Manually

bash
npm start

Or directly:

bash
node build/index.js

Manual Configuration for MCP Clients

For manual installations, both Roo Code and Claude Desktop use a similar configuration format for MCP servers:

Using NPX (Recommended for Manual Setup)

The easiest way to use Super Shell MCP is with NPX, which automatically installs and runs the package from npm without requiring manual setup. The package is available on NPM at https://www.npmjs.com/package/super-shell-mcp.

Roo Code Configuration with NPX
json
"super-shell": {
  "command": "npx",
  "args": [
    "-y",
    "super-shell-mcp"
  ],
  "alwaysAllow": [],
  "disabled": false
}
Claude Desktop Configuration with NPX
json
"super-shell": {
  "command": "npx",
  "args": [
    "-y",
    "super-shell-mcp"
  ],
  "alwaysAllow": false,
  "disabled": false
}

Option 2: Using Local Installation

If you prefer to use a local installation, add the following to your Roo Code MCP settings configuration file (located at ~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json):

json
"super-shell": {
  "command": "node",
  "args": [
    "/path/to/super-shell-mcp/build/index.js"
  ],
  "alwaysAllow": [],
  "disabled": false
}

You can optionally provide a trusted shell and opt into shell parsing by setting environment variables instead of command-line flags:

json
"super-shell": {
  "command": "node",
  "args": [
    "/path/to/super-shell-mcp/build/index.js"
  ],
  "env": {
    "CUSTOM_SHELL": "/usr/bin/bash",
    "SUPER_SHELL_USE_SHELL": "true"
  },
  "alwaysAllow": [],
  "disabled": false
}

Windows 11 example:

json
"super-shell": {
  "command": "C:\\Program Files\\nodejs\\node.exe",
  "args": [
    "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npx-cli.js",
    "-y",
    "super-shell-mcp",
    "C:\\Users\\username"
  ],
  "env": {
    "CUSTOM_SHELL": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
    "SUPER_SHELL_USE_SHELL": "true"
  },
  "alwaysAllow": [],
  "disabled": false
}

Claude Desktop Configuration

Add the following to your Claude Desktop configuration file (located at ~/Library/Application Support/Claude/claude_desktop_config.json):

json
"super-shell": {
  "command": "node",
  "args": [
    "/path/to/super-shell-mcp/build/index.js"
  ],
  "alwaysAllow": false,
  "disabled": false
}

For Windows users, the configuration file is typically located at %APPDATA%\Claude\claude_desktop_config.json.

Platform-Specific Configuration

Windows

  • Default shell: cmd.exe (or PowerShell if available)
  • Configuration paths:
    • Roo Code: %APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
    • Claude Desktop: %APPDATA%\Claude\claude_desktop_config.json
  • Shell path examples:
    • cmd.exe: C:\\Windows\\System32\\cmd.exe
    • PowerShell: C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe
    • PowerShell Core: C:\\Program Files\\PowerShell\\7\\pwsh.exe

macOS

  • Default shell: /bin/zsh
  • Configuration paths:
    • Roo Code: ~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
    • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Shell path examples:
    • zsh: /bin/zsh
    • bash: /bin/bash
    • sh: /bin/sh

Linux

  • Default shell: /bin/bash (or $SHELL environment variable)
  • Configuration paths:
    • Roo Code: ~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
    • Claude Desktop: ~/.config/Claude/claude_desktop_config.json
  • Shell path examples:
    • bash: /bin/bash
    • sh: /bin/sh
    • zsh: /usr/bin/zsh

Shell Execution Modes & Environment Variables

Shell parsing is disabled by default for security. Customise behaviour with the following environment variables:

  • SUPER_SHELL_USE_SHELL: set to true (or 1/yes/on) to enable shell parsing for trusted workflows. Omit or set to false to keep the safer default.
  • CUSTOM_SHELL: optional path to the shell executable used when shell parsing is enabled.
  • SUPER_SHELL_COMMAND_TIMEOUT: optional override (milliseconds) for the default 30s command timeout.

⚠️ Enabling shell parsing reintroduces the risk of command injection. Only enable it when you fully trust the command source and payload.

Replace /path/to/super-shell-mcp with the actual path where you cloned the repository.

Note:

  • For Roo Code: Setting alwaysAllow to an empty array [] is recommended for security reasons, as it will prompt for approval before executing any commands. If you want to allow specific commands without prompting, you can add their names to the array, for example: "alwaysAllow": ["execute_command", "get_whitelist"].
  • For Claude Desktop: Setting alwaysAllow to false is recommended for security reasons. Claude Desktop uses a boolean value instead of an array, where false means all commands require approval and true means all commands are allowed without prompting.

Important: The alwaysAllow parameter is processed by the MCP client (Roo Code or Claude Desktop), not by the Super Shell MCP server itself. The server will work correctly with either format, as the client handles the approval process before sending requests to the server.

Available Tools

The server exposes the following MCP tools:

get_platform_info

Get information about the current platform and shell.

json
{}

execute_command

Execute a shell command on the current platform.

json
{
  "command": "ls",
  "args": ["-la"]
}

get_whitelist

Get the list of whitelisted commands.

json
{}

add_to_whitelist

Add a command to the whitelist.

json
{
  "command": "python3",
  "securityLevel": "safe",
  "description": "Run Python 3 scripts"
}

update_security_level

Update the security level of a whitelisted command.

json
{
  "command": "python3",
  "securityLevel": "requires_approval"
}

remove_from_whitelist

Remove a command from the whitelist.

json
{
  "command": "python3"
}

get_pending_commands

Get the list of commands pending approval.

json
{}

approve_command

Approve a pending command.

json
{
  "commandId": "command-uuid-here"
}

deny_command

Deny a pending command.

json
{
  "commandId": "command-uuid-here",
  "reason": "This command is potentially dangerous"
}

Default Whitelisted Commands

The server includes platform-specific command whitelists that are automatically selected based on the detected platform.

Common Safe Commands (All Platforms)

  • echo - Print text to standard output

Unix-like Safe Commands (macOS/Linux)

  • ls - List directory contents
  • pwd - Print working directory
  • echo - Print text to standard output
  • cat - Concatenate and print files
  • grep - Search for patterns in files
  • find - Find files in a directory hierarchy
  • cd - Change directory
  • head - Output the first part of files
  • tail - Output the last part of files
  • wc - Print newline, word, and byte counts

Windows-specific Safe Commands

  • dir - List directory contents
  • type - Display the contents of a text file
  • findstr - Search for strings in files
  • where - Locate programs
  • whoami - Display current user
  • hostname - Display computer name
  • ver - Display operating system version

Commands Requiring Approval

Windows Commands Requiring Approval

  • copy - Copy files
  • move - Move files
  • mkdir - Create directories
  • rmdir - Remove directories
  • rename - Rename files
  • attrib - Change file attributes

Unix Commands Requiring Approval

  • mv - Move (rename) files
  • cp - Copy files and directories
  • mkdir - Create directories
  • touch - Change file timestamps or create empty files
  • chmod - Change file mode bits
  • chown - Change file owner and group

Forbidden Commands

Windows Forbidden Commands

  • del - Delete files
  • erase - Delete files
  • format - Format a disk
  • runas - Execute a program as another user

Unix Forbidden Commands

  • rm - Remove files or directories
  • sudo - Execute a command as another user

Security Considerations

  • All commands are executed with the permissions of the user running the MCP server
  • Commands requiring approval are held in a queue until explicitly approved
  • Forbidden commands are never executed
  • The server uses Node.js's execFile instead of exec to prevent shell injection
  • Arguments are validated against allowed patterns when specified

Extending the Whitelist

You can extend the whitelist by using the add_to_whitelist tool. For example:

json
{
  "command": "npm",
  "securityLevel": "requires_approval",
  "description": "Node.js package manager"
}

NPM Package Information

Super Shell MCP is available as an npm package at https://www.npmjs.com/package/super-shell-mcp.

Benefits of Using NPX

Using the NPX method (as shown in Option 1 of the Configuration section) offers several advantages:

  1. No Manual Setup: No need to clone the repository, install dependencies, or build the project
  2. Automatic Updates: Always uses the latest published version
  3. Cross-Platform Compatibility: Works the same way on Windows, macOS, and Linux
  4. Simplified Configuration: Shorter configuration with no absolute paths
  5. Reduced Maintenance: No local files to manage or update

Using from GitHub

If you prefer to use the latest development version directly from GitHub:

json
"super-shell": {
  "command": "npx",
  "args": [
    "-y",
    "github:cfdude/super-shell-mcp"
  ],
  "alwaysAllow": [],  // For Roo Code
  "disabled": false
}

Publishing Your Own Version

If you want to publish your own modified version to npm:

  1. Update the package.json with your details
  2. Ensure the "bin" field is properly configured:
    json
    "bin": {
      "super-shell-mcp": "./build/index.js"
    }
  3. Publish to npm:
    bash
    npm publish

NPX Best Practices

For optimal integration with MCP clients using NPX, this project follows these best practices:

  1. Executable Entry Point: The main file includes a shebang line (#!/usr/bin/env node) and is made executable during build.

  2. Package Configuration:

    • "type": "module" - Ensures ES Modules are used
    • "bin" field - Maps the command name to the entry point
    • "files" field - Specifies which files to include when publishing
    • "prepare" script - Ensures compilation happens on install
  3. TypeScript Configuration:

    • "module": "NodeNext" - Proper ES Modules support
    • "moduleResolution": "NodeNext" - Consistent with ES Modules
  4. Automatic Installation and Execution:

    • The MCP client configuration uses npx -y to automatically install and run the package
    • No terminal window is tied up as the process runs in the background
  5. Publishing Process:

    bash
    # Update version in package.json
    npm version patch  # or minor/major as appropriate
    
    # Build and publish
    npm publish

These practices ensure the MCP server can be started automatically by the MCP client without requiring a separate terminal window, improving user experience and operational efficiency.

Troubleshooting

Cross-Platform Issues

Windows-Specific Issues

  1. PowerShell Script Execution Policy

    • Issue: PowerShell may block script execution with the error "Execution of scripts is disabled on this system"
    • Solution: Run PowerShell as Administrator and execute Set-ExecutionPolicy RemoteSigned or use the -ExecutionPolicy Bypass parameter when configuring the shell
  2. Path Separators

    • Issue: Windows uses backslashes (\) in paths, which need to be escaped in JSON
    • Solution: Use double backslashes (\\) in JSON configuration files, e.g., C:\\Windows\\System32\\cmd.exe
  3. Command Not Found

    • Issue: Windows doesn't have Unix commands like ls, grep, etc.
    • Solution: Use Windows equivalents (dir instead of ls, findstr instead of grep)

macOS/Linux-Specific Issues

  1. Shell Permissions

    • Issue: Permission denied when executing commands
    • Solution: Ensure the shell has appropriate permissions with chmod +x /path/to/shell
  2. Environment Variables

    • Issue: Environment variables not available in MCP server
    • Solution: Set environment variables in the shell's profile file (.zshrc, .bashrc, etc.)

General Troubleshooting

  1. Shell Detection Issues

    • Issue: Server fails to detect the correct shell
    • Solution: Explicitly specify the shell path in the configuration
  2. Command Execution Timeout

    • Issue: Commands taking too long and timing out
    • Solution: Increase the timeout value in the command service constructor

Logging System

The server includes a comprehensive logging system that writes logs to a file for easier debugging and monitoring:

  1. Log File Location

    • Default: logs/super-shell-mcp.log in the server's directory
    • The logs directory is created automatically and tracked by Git (with a .gitkeep file)
    • Log files themselves are excluded from Git via .gitignore
    • Contains detailed information about server operations, command execution, and approval workflow
  2. Log Levels

    • INFO: General operational information
    • DEBUG: Detailed debugging information
    • ERROR: Error conditions and exceptions
  3. Viewing Logs

    • Use standard file viewing commands to check logs:
      bash
      # View the entire log
      cat logs/super-shell-mcp.log
      
      # Follow log updates in real-time
      tail -f logs/super-shell-mcp.log
  4. Log Content

    • Server startup and configuration
    • Command execution requests and results
    • Approval workflow events (pending, approved, denied)
    • Error conditions and troubleshooting information
  5. Whitelist Management

    • Issue: Need to add custom commands to whitelist
    • Solution: Use the add_to_whitelist tool to add commands specific to your environment

Known Issues

Android Studio Otter 2 Feature Drop Compatibility

Affected Version: Android Studio Otter 2 Feature Drop | 2025.2.2 Canary 3 (Build #AI-252.25557.131.2522.14357309)

Issue: Android Studio's MCP client implementation incorrectly serializes array parameters as strings when calling the execute_command tool. This causes commands with arguments to fail with the error:

Error: Expected array, received string

Example:

javascript
// This fails in Android Studio Otter 2
execute_command(
  command = "git",
  args = ["add", "."]  // Sent as string '["add", "."]' instead of array
)

Root Cause: This is a bug in Android Studio's MCP client, not in super-shell-mcp. The server correctly defines args as type array in its schema, and the issue has been verified to work correctly with:

  • Claude Desktop
  • Official MCP SDK clients
  • Other MCP-compatible tools

Status: This is an Android Studio bug. The super-shell-mcp server implements the MCP specification correctly.

Workaround: None currently available. Users experiencing this issue should report it to the Android Studio/JetBrains team.

References:

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

安装

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "super-shell": {
      "command": "npx",
      "args": [
        "-y",
        "super-shell-mcp"
      ]
    }
  }
}

可用工具

  • get_platform_info

    Get information about the current platform and shell

  • execute_command

    Execute a shell command on the current platform

  • get_whitelist

    Get the list of whitelisted commands

  • add_to_whitelist

    Add a command to the whitelist

  • update_security_level

    Update the security level of a whitelisted command

  • remove_from_whitelist

    Remove a command from the whitelist

  • get_pending_commands

    Get the list of commands pending approval

  • approve_command

    Approve a pending command

  • deny_command

    Deny a pending command

将 Super Shell MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Super Shell 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 Super Shell 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Super Shell MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "super-shell": {
      "command": "npx",
      "args": [
        "-y",
        "super-shell-mcp"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Super Shell MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Super Shell MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Super Shell 帮我完成这项任务吗?
Super Shell
当然。我已阅读。
以下是我使用 Super Shell 得到的结果。

常见问题

Super Shell MCP 服务器有什么用途?

Super Shell 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Super Shell MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 Super Shell,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 Super Shell MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 Super Shell 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Super Shell MCP 连接到 TypingMind?

Super Shell 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Super Shell MCP 在 TypingMind 中提供哪些工具?

Super Shell 提供 9 个 MCP 工具,您可以在 TypingMind 的插件页面启用这些工具,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Super Shell MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 Super Shell 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇