Shell MCP Server
local-only server
The server can only run on the client’s local machine because it depends on local resources.
Shell MCP Server
A Model Context Protocol server that provides shell command execution capabilities. This server enables LLMs to execute shell commands and receive their output in a controlled manner.
Available Tools
execute_command
- Execute a shell command and return its output- Required arguments:
command
(string): Shell command to execute
- Returns:
- Command result containing:
command
: The executed commandoutput
: Combined stdout and stderr outputreturn_code
: Command execution return code
- Command result containing:
- Required arguments:
Installation
Using uv (recommended)
When using uv
no specific installation is needed. We will
use uvx
to directly run mcp-server-shell.
Using PIP
Alternatively you can install mcp-server-shell
via pip:
After installation, you can run it as a script using:
Configuration
Configure for Claude.app
Add to your Claude settings:
Configure for Zed
Add to your Zed settings.json:
Example Interactions
Execute a shell command:
Response:
Debugging
You can use the MCP inspector to debug the server. For uvx installations:
Or if you've installed the package in a specific directory or are developing on it:
Examples of Questions for Claude
- "What files are in the current directory?"
- "Show me the contents of the README.md file"
- "What's the current system date?"
- "Check if Python is installed and show its version"
Security Considerations
⚠️ Warning: This server executes shell commands directly on your system. Use with caution and implement appropriate security measures to prevent unauthorized or dangerous command execution.
Contributing
We encourage contributions to help expand and improve mcp-server-shell. Whether you want to add new features, enhance security, or improve documentation, your input is valuable.
For examples of other MCP servers and implementation patterns, see: https://github.com/modelcontextprotocol/servers
Pull requests are welcome! Feel free to contribute new ideas, bug fixes, or enhancements to make mcp-server-shell even more powerful and useful.
License
mcp-server-shell is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
This server cannot be installed
A Model Context Protocol server that allows LLMs to execute shell commands and receive their output in a controlled manner.
- Available Tools
- Installation
- Configuration
- Example Interactions
- Debugging
- Examples of Questions for Claude
- Security Considerations
- Contributing
- License