Dynamic Shell Server
A Model Context Protocol (MCP) server that enables secure execution of shell commands with a dynamic approval system. This server allows running arbitrary commands while maintaining security through user approval and audit logging.
Overview
Dynamic Shell Server is a Model Context Protocol (MCP) server that enables secure execution of shell commands with a dynamic approval system, allowing users to run arbitrary commands while maintaining security through user approval and audit logging.
To use the Dynamic Shell Server, clone the repository, set up a virtual environment, install dependencies, and run the server. Users can also integrate it with Claude Desktop for enhanced functionality.
- 🔐 Dynamic command approval system - 📝 Persistent storage of approved commands - 📊 Comprehensive audit logging - ⏱️ Command timeout protection - 🔄 Command revocation capability
- Securely executing shell commands in a controlled environment.
- Maintaining an audit trail of command executions for compliance.
- Allowing users to approve commands dynamically to enhance security.
Add to your AI client
Use these steps to connect Dynamic Shell Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"dynamic-shell-server-codelion": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dynamic-shell-server-codelion"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"dynamic-shell-server-codelion": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dynamic-shell-server-codelion"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"dynamic-shell-server-codelion": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dynamic-shell-server-codelion"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"dynamic-shell-server-codelion": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dynamic-shell-server-codelion"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"dynamic-shell-server-codelion": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dynamic-shell-server-codelion"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"dynamic-shell-server-codelion": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dynamic-shell-server-codelion"
]
}
}
}FAQ
How does the command approval process work?
Users are prompted to approve commands the first time they are executed, with options to allow once, remember for future use, or deny execution.
Is there a way to revoke command approvals?
Yes! Users can revoke approval for previously approved commands at any time.
What security measures are in place?
The server requires user approval for first-time command execution, has persistent storage for approved commands, and includes comprehensive audit logging.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2326,"uuid":"3cd23d46-a87b-42ae-98d2-10d18557cb8a","name":"Dynamic Shell Server","title":"Dynamic Shell Server","description":"A Model Context Protocol (MCP) server that enables secure execution of shell commands with a dynamic approval system. This server allows running arbitrary commands while maintaining security through user approval and audit logging.","avatar_url":null,"created_at":"2025-03-10T09:30:14.484+00:00","updated_at":"2025-03-12T14:27:27.272+00:00","status":"created","author_name":"codelion","author_avatar_url":null,"tags":"dynamic-shell-server,shell-commands,security","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/codelion/dynamic-shell-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":null,"user_uuid":"4b3349ed-885b-4179-8b78-6e5f0a053471","tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]