Shell

v1.0.0Developer Toolsstable

A secure server that enables AI applications to execute shell commands in specified directories, supporting multiple shell types (bash, sh, cmd, powershell) with built-in security features like directory isolation and timeout control.

claudefunction-callingshell
Share:
41
Stars
0
Downloads
0
Weekly
0/5

What is Shell?

Shell is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to secure server that enables ai applications to execute shell commands in specified directories, supporting multiple shell types (bash, sh, cmd, powershell) with built-in security features like director...

A secure server that enables AI applications to execute shell commands in specified directories, supporting multiple shell types (bash, sh, cmd, powershell) with built-in security features like directory isolation and timeout control.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A secure server that enables AI applications to execute shel

Use Cases

Execute shell commands in specified directories securely.
Support bash, sh, cmd, and powershell shells.
Isolate commands with timeout control and directory restrictions.
hdresearch

Maintainer

LicenseMIT License
Languagejavascript
Versionv1.0.0
UpdatedMar 23, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx shell-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Shell

Shell MCP Server is a lightweight Node.js server that gives AI assistants the ability to execute shell commands on the local machine through a single run_command tool. It supports bash, sh, cmd, and PowerShell, and includes a built-in command blacklist that blocks destructive operations like rm, format, sudo, and eval. The server is designed for developers who want AI-assisted scripting and automation with a basic safety net, without the overhead of a full approval workflow.

Prerequisites

  • Node.js installed (any recent LTS version)
  • npm or npx available on your PATH
  • Claude Desktop or another MCP-compatible client
  • Awareness that command execution carries inherent risk — review the blacklist before use
1

Run the auto-configuration command

The shell MCP server includes a config helper that automatically adds itself to your Claude Desktop configuration file.

npx mcp-shell config
2

Or configure Claude Desktop manually

If you prefer manual setup, add the following block to your claude_desktop_config.json. The server will be launched via npx on demand.

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

Restart Claude Desktop

Quit and reopen Claude Desktop. The run_command tool should now be available.

4

Test with a safe read-only command

Ask Claude to run a harmless command to confirm the server is connected and working.

Shell Examples

Client configuration

Claude Desktop config using npx to run mcp-shell on demand. No environment variables are required.

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

Prompts to try

Example prompts that use the run_command tool for common development tasks.

- "Run 'ls -la' in my home directory and show me the output"
- "Check which version of Node.js is installed"
- "Run 'git status' in my current project directory"
- "Show me the top 10 CPU-consuming processes with 'ps aux | sort -nrk 3 | head -10'"
- "Run 'npm test' and report any failing tests"

Troubleshooting Shell

Command blocked with 'command is blacklisted' error

The server blocks destructive commands including rm, rmdir, del, format, mkfs, chmod, chown, sudo, su, exec, eval, shutdown, and reboot. Restructure your task to avoid these. For file deletion needs, consider using trash-cli or a similar safer alternative.

Command not found error for a valid system command

The server validates that commands exist before running them. Ensure the binary is installed and on PATH. On macOS/Linux, you can verify with 'which <command>'. The npx process inherits your shell's PATH, so tools installed in custom locations may not be visible.

No output returned for long-running commands

The server uses stdio transport which may buffer output. Commands that run for extended periods may appear to hang. Prefer commands that complete quickly and produce immediate output rather than interactive or daemon-style processes.

Frequently Asked Questions about Shell

What is Shell?

Shell is a Model Context Protocol (MCP) server that secure server that enables ai applications to execute shell commands in specified directories, supporting multiple shell types (bash, sh, cmd, powershell) with built-in security features like directory isolation and timeout control. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Shell?

Follow the installation instructions on the Shell GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Shell?

Shell works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Shell free to use?

Yes, Shell is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

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

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Shell?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides