{"id":28561081,"url":"https://github.com/codelion/dynamic-shell-server","last_synced_at":"2025-09-21T00:33:20.253Z","repository":{"id":278118064,"uuid":"934575685","full_name":"codelion/dynamic-shell-server","owner":"codelion","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-18T04:37:03.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T05:22:21.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codelion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-18T04:04:24.000Z","updated_at":"2025-02-18T04:37:06.000Z","dependencies_parsed_at":"2025-02-18T05:32:26.448Z","dependency_job_id":null,"html_url":"https://github.com/codelion/dynamic-shell-server","commit_stats":null,"previous_names":["codelion/dynamic-shell-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelion%2Fdynamic-shell-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelion%2Fdynamic-shell-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelion%2Fdynamic-shell-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelion%2Fdynamic-shell-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codelion","download_url":"https://codeload.github.com/codelion/dynamic-shell-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelion%2Fdynamic-shell-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259054151,"owners_count":22798450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-10T10:14:04.130Z","updated_at":"2025-09-21T00:33:15.202Z","avatar_url":"https://github.com/codelion.png","language":"Python","funding_links":[],"categories":["カテゴリ","📚 Projects (2474 total)"],"sub_categories":["🛠️ \u003ca name=\"developer-tools\"\u003e\u003c/a\u003e開発ツール","MCP Servers"],"readme":"# Dynamic Shell Command MCP Server\n\nA 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.\n\n## Features\n\n- 🔐 Dynamic command approval system\n- 📝 Persistent storage of approved commands\n- 📊 Comprehensive audit logging\n- ⏱️ Command timeout protection\n- 🔄 Command revocation capability\n\n## Installation\n\n1. Clone this repository:\n```bash\ngit clone \u003crepository-url\u003e\ncd dynamic-shell-server\n```\n\n2. Create a virtual environment and activate it:\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows use: venv\\Scripts\\activate\n```\n\n3. Install dependencies:\n```bash\npip install -r requirements.txt\n```\n\n## Usage\n\n### Standalone Mode\n\nRun the server directly:\n\n```bash\npython dynamic_shell_server.py\n```\n\n### Claude Desktop Integration\n\n1. Open your Claude Desktop configuration:\n   - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`\n   - Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n2. Add the server configuration:\n```json\n{\n    \"mcpServers\": {\n        \"shell\": {\n            \"command\": \"/absolute/path/to/.venv/bin/python\",\n            \"args\": [\"/absolute/path/to/dynamic_shell_server.py\"]\n        }\n    }\n}\n```\n\n3. Restart Claude Desktop\n\n### Command Approval Process\n\nWhen running a command for the first time, you'll be prompted with:\n```\nCommand Approval Required\n\nCommand: \u003ccommand\u003e\nArguments: \u003cargs\u003e\n\nThis command has not been previously approved. Do you want to:\n1. Allow this command once\n2. Allow this command and remember for future use\n3. Deny execution\n\nPlease choose an option (1-3):\n```\n\n### Available Tools\n\n1. `execute_command`: Execute a shell command\n   - Parameters:\n     - `command`: The command to execute\n     - `args`: Optional list of command arguments\n\n2. `revoke_command_approval`: Revoke approval for a previously approved command\n   - Parameters:\n     - `command`: The command to revoke approval for\n\n### Available Resources\n\n1. `commands://approved`: Lists all approved commands with their approval dates\n\n## Data Storage\n\nThe server stores its data in `~/.config/mcp-shell-server/`:\n- `approved_commands.json`: List of approved commands and their approval dates\n- `audit.log`: Detailed execution history of all commands\n\n## Security Features\n\n- User approval required for first-time command execution\n- Persistent storage of approved commands\n- Comprehensive audit logging\n- 5-minute command timeout\n- No shell execution (prevents injection attacks)\n- Command revocation capability\n\n## Example Usage\n\nThrough Claude Desktop:\n\n```\nHuman: Run 'npm install' in my project directory\nAssistant: I'll help you run that command. Since this is the first time running 'npm install', you'll need to approve it.\n[Command approval prompt appears]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelion%2Fdynamic-shell-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelion%2Fdynamic-shell-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelion%2Fdynamic-shell-server/lists"}