Secure dynamic MCP shell server with approval, audit logging, and command revocation for safe command execution
The Dynamic Shell Command MCP Server is an advanced infrastructure solution designed to enable secure execution of shell commands with a dynamic approval system, ensuring that arbitrary commands can be run while maintaining stringent security measures. This server integrates seamlessly into AI applications such as Claude Desktop and other MCP clients, providing a bridge for executing local tools or scripts directly from these platforms.
The Dynamic Shell Command MCP Server boasts several core features that enhance its suitability for both developers and end-users:
These features are designed to meet the stringent requirements of AI application integration, ensuring that users can leverage local tools and scripts seamlessly within an environment that prioritizes security and efficiency.
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
This diagram illustrates the dynamic exchange of messages between an AI application, which utilizes the MCP client for communication, and the MCP server. The server then interacts with the underlying data source or tool to execute commands securely.
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
This matrix highlights the support level for each MCP client, indicating which features are fully supported and which may require additional configuration. The compatibility ensures that developers can integrate this server into diverse AI applications without facing significant limitations.
git clone https://github.com/your-repo/dynamic-shell-server.git
cd dynamic-shell-server
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
pip install -r requirements.txt
Developers can run any shell command through the MCP server with a dynamic approval mechanism. This is particularly useful for quick testing or debugging within an AI application environment.
By integrating third-party tools seamlessly, this server allows developers to extend their AI applications without deploying additional software outside of the application itself.
The dynamic shell command MCP server supports seamless integration into major AI clients such as Claude Desktop and Continue. These clients utilize MCP commands for executing local scripts or tools directly from within their interfaces, enhancing user experience by providing immediate access to necessary functionalities.
{
"mcpServers": {
"shellServer": {
"command": "/absolute/path/to/.venv/bin/python",
"args": ["/absolute/path/to/dynamic_shell_server.py"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
This configuration snippet shows how to integrate the dynamic shell command server with MCP client applications, ensuring that commands are executed according to predefined parameters.
The Dynamic Shell Command MCP Server supports diverse AI clients and tools while maintaining a high level of performance. It ensures that resource usage is optimal and supports various execution environments seamlessly.
python dynamic_shell_server.py
Upon running an unapproved command, users are prompted to decide whether to allow it once, remember for future use, or deny execution. This ensures that all commands are securely managed.
Parameters:
- `command`: The command to execute.
- `args`: Optional list of arguments with the command.
Parameters:
- `command`: The exact command string to revoke approval for.
Data is stored in a configuration directory, including lists of approved commands and detailed execution logs.
How does the Dynamic Shell Command MCP Server ensure security? The server uses a dynamic approval system that requires explicit user permission before executing any command, which significantly reduces unauthorized access risks.
Can this server be used with other AI clients besides Claude Desktop and Continue? Yes, while it is optimized for Claude Desktop and Continue, the protocol's modular design allows integration with other MCP-compatible clients as well.
How does the command revocation feature work? Users can easily retract previously approved commands when no longer needed, ensuring compliance with evolving requirements or security policies.
Can I customize the approval prompt for better user experience? Yes, customization options are available in the MCP configuration file to tailor the appearance and behavior of the approval prompts as needed.
What happens if a command exceeds its 5-minute time limit? Commands that exceed their allocated execution time will be automatically terminated to prevent resource abuse or system overload.
For contributors interested in enhancing this MCP server, please follow the guidelines below:
For further information on Model Context Protocol and its ecosystem, refer to the official documentation and community forums.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration