Shell Execution MCP Server

by samihalawa

1 346 downloads Not rated yet

About

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

Explore

- 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 with the appropriate shell
- Timeout Control: Configure command execution timeouts to prevent hanging
- Session Reset: Ability to reset the shell session if needed


npm install

1. Execute a simple command:


execute-command(command: "ls -la")

2. Run a long-running command in the background:

execute-command(command: "sleep 60 && echo 'Done'", runInBackground: true)

3. Execute a command with a custom timeout:

execute-command(command: "find / -name '*.js'", timeoutMs: 60000)

4. Reset the shell session:

reset-shell()
```

Double-check the paths in your configuration:
- Use absolute paths instead of relative paths
- For Windows users, use forward slashes (/) or escaped backslashes (\\) in the path
- Verify the server file path is correct

If you see "Tool execution failed" errors, check:

1. That the server is running correctly
2. That your configuration file uses absolute paths
3. That you have restarted your client application after changing the configuration

A Model Context Protocol (MCP) server that provides persistent shell command execution capabilities for Claude and other MCP-compatible AI assistants.

Features

- 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 with the appropriate shell
- Timeout Control: Configure command execution timeouts to prevent hanging
- Session Reset: Ability to reset the shell session if needed

Installation

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.