drio
Open app

Shell Execution MCP Server

Source

Shell Execution MCP Server for Claude and other MCP-compatible AI assistants

Catalog onlyCatalog onlySTDIO

Overview

Shell Execution MCP Server is a Model Context Protocol (MCP) server that provides persistent shell command execution capabilities for Claude and other MCP-compatible AI assistants.

To use the Shell Execution MCP Server, clone the repository, install dependencies, build the server, and start it. Configure it in your MCP settings to enable command execution.

  • Persistent Shell Session: Maintains state between commands in the same session. - Background Execution: Run commands in the background with proper process management. - Cross-Platform: Works on macOS, Linux, and Windows. - Timeout Control: Configure command execution timeouts. - Session Reset: Ability to reset the shell session if needed.
  1. Execute shell commands in a persistent environment.
  2. Run long-running processes in the background.
  3. Manage shell sessions for AI assistants.

Add to your AI client

Use these steps to connect Shell Execution MCP 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-server-shell-exec-samihalawa": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-shell-exec-samihalawa"
      ]
    }
  }
}

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-server-shell-exec-samihalawa": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-shell-exec-samihalawa"
      ]
    }
  }
}

Claude Code

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

.mcp.json (project root)

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

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-server-shell-exec-samihalawa": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-shell-exec-samihalawa"
      ]
    }
  }
}

Windsurf

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

~/.codeium/windsurf/mcp_config.json

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

Cline

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

Cline MCP Settings (via UI)

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

FAQ

Can I run commands in the background?

Yes! You can run commands in the background with the appropriate configuration.

Is it compatible with all operating systems?

Yes! It works on macOS, Linux, and Windows.

How do I reset the shell session?

You can reset the shell session using the `reset-shell` command.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2684,"uuid":"c3957475-9e84-4f3f-8188-be3e3c6975cd","name":"mcp-server-shell-exec","title":"Shell Execution MCP Server","description":"Shell Execution MCP Server for Claude and other MCP-compatible AI assistants","avatar_url":"https://avatars.githubusercontent.com/u/3243470?v=4","created_at":"2025-03-13T09:37:06.182Z","updated_at":"2025-03-13T09:39:30.746Z","status":"created","author_name":"samihalawa","author_avatar_url":"https://avatars.githubusercontent.com/u/3243470?v=4","tags":"mcp-server,shell-execution,ai-assistant","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/samihalawa/mcp-server-shell-exec","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"TypeScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-09 18:06:44\"}","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"}]]}]