Shell
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.
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
Maintainer
Works with
Installation
Manual Installation
npx shell-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 configOr 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"]
}
}
}Restart Claude Desktop
Quit and reopen Claude Desktop. The run_command tool should now be available.
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.
Shell Alternatives — Similar Developer Tools Servers
Looking for alternatives to Shell? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up Shell in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.