Bash MCP (Master Control Program)
local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Built as a TypeScript application that provides a secure interface for bash command execution with comprehensive session management for interactive command sessions.
Bash MCP (Master Control Program)
A TypeScript application that allows Claude to safely execute bash commands with security safeguards.
Features
- Execute bash commands in a controlled environment
- Support for both stateless and stateful (interactive) command execution
- Security safeguards:
- Whitelisted commands
- Whitelisted directories
- Command validation
- Output sanitization
- Session management for interactive commands
- Comprehensive logging
Installation
Configuration
The configuration is stored in config/default.json
. You can customize:
- Allowed commands
- Allowed directories
- Session settings
- Security settings
- Logging settings
Example configuration:
Usage
Simple Command Execution
Interactive Sessions
Security Considerations
This MCP is designed with security in mind, but it's important to:
- Keep the allowed commands and directories list as restrictive as possible
- Regularly review and update the configuration
- Monitor the logs for suspicious activity
- Keep the MCP and its dependencies up to date
Development
Building
Linting and Formatting
To check for linting issues:
To automatically fix linting and formatting issues:
Or manually:
Testing
This server cannot be installed
A TypeScript application that allows Claude to safely execute bash commands with security safeguards including whitelisted commands, directories, and comprehensive logging.