drio
Open app

MCP Shell Server

Source

Catalog onlyCatalog onlySTDIO

Overview

MCP Shell Server is a secure shell command execution server that implements the Model Context Protocol (MCP), allowing remote execution of whitelisted shell commands with stdin input support.

To use the MCP Shell Server, install it via pip and start the server by specifying allowed commands through the ALLOW_COMMANDS environment variable. You can then submit commands using an API request format.

  • Secure execution by whitelisting available commands. - Supports standard input for command execution. - Comprehensive output including stdout, stderr, exit status, and execution time. - Validates commands to avoid unsafe operations. - Provides timeout control for command execution.
  1. Remote execution of maintenance commands in secure environments.
  2. Integration with other applications that need controlled command execution.
  3. Allowing users to execute various shell commands safely without direct shell access.

Add to your AI client

Use these steps to connect MCP Shell Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-shell-server-tumf": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-shell-server-tumf"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-shell-server-tumf": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-shell-server-tumf"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-shell-server-tumf": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-shell-server-tumf"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-shell-server-tumf": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-shell-server-tumf"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-shell-server-tumf": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-shell-server-tumf"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-shell-server-tumf": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-shell-server-tumf"
      ]
    }
  }
}

FAQ

Can I add more commands to the whitelist?

Yes, you can modify the `ALLOW_COMMANDS` variable to include additional commands as needed.

Is the server secure against injection attacks?

Yes! The server is designed with security in mind and implements command whitelisting and validation to prevent shell injection.

How do I install MCP Shell Server?

Use the command `pip install mcp-shell-server` to install the server.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":176,"uuid":"de58efdd-c054-416e-9ad3-3766805ddf45","name":"mcp-shell-server","title":"MCP Shell Server","description":"","avatar_url":"https://avatars.githubusercontent.com/u/69994?v=4","created_at":"$D2024-12-13T09:12:17.600Z","updated_at":"$D2024-12-13T12:28:11.974Z","status":"created","author_name":"tumf","author_avatar_url":"https://avatars.githubusercontent.com/u/69994?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/tumf/mcp-shell-server","target":"_self","content":"$29","summary":"$2a","img_url":"https://camo.githubusercontent.com/f283560a28f9552b49cf24c8b95d9c4076eb27d210d3f0127fdcfb168c7651fb/68747470733a2f2f636f6465636f762e696f2f67682f74756d662f6d63702d7368656c6c2d7365727665722f6272616e63682f6d61696e2f67726170682f62616467652e737667","type":null,"metadata":"{\"star\":\"93\",\"license\":\"MIT license\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-05-04 20:42:08\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]