bradlives commited on
Commit
24ad809
·
verified ·
1 Parent(s): 18473c0

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +103 -41
README.md CHANGED
@@ -6,8 +6,19 @@ Terminal access for Claude with two security modes, plus SSH bridge for remote s
6
 
7
  - **Local shell** with safe/dangerous command separation
8
  - **SSH Bridge** - GUI app for secure remote server access
9
- - **Full visibility** - see every command Claude runs
10
- - **Instant disconnect** - revoke access anytime
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  ## Components
13
 
@@ -15,26 +26,33 @@ Terminal access for Claude with two security modes, plus SSH bridge for remote s
15
  Local Windows terminal access with configurable command allowlists.
16
 
17
  ### 2. SSH Bridge (`ssh-bridge.exe`)
18
- WinForms app that:
19
- - You authenticate with password (never stored on disk)
20
  - Claude sends commands through it
21
- - You see all commands and output in real-time
22
- - Click Disconnect to revoke access instantly
 
 
 
23
 
24
  ## Installation
25
 
26
- ### Prerequisites
 
 
 
 
 
 
27
  - .NET 8.0 SDK
28
  - Windows 10/11
29
 
30
- ### Build
31
-
32
  ```bash
33
  git clone https://github.com/FreeOnlineUser/shell-mcp.git
34
  cd shell-mcp
35
  dotnet restore
36
- dotnet build ShellMcp.csproj
37
- dotnet build SshBridge.csproj
38
  ```
39
 
40
  ### Configure Claude Desktop
@@ -46,18 +64,20 @@ Edit `%APPDATA%\Claude\claude_desktop_config.json`:
46
  "mcpServers": {
47
  "shell_safe": {
48
  "command": "dotnet",
49
- "args": ["C:\\path\\to\\shell-mcp.dll"],
50
  "env": {
51
  "SHELL_MCP_MODE": "safe",
52
- "SHELL_MCP_START_DIR": "C:\\your\\workspace"
 
53
  }
54
  },
55
  "shell_dangerous": {
56
  "command": "dotnet",
57
- "args": ["C:\\path\\to\\shell-mcp.dll"],
58
  "env": {
59
  "SHELL_MCP_MODE": "dangerous",
60
- "SHELL_MCP_START_DIR": "C:\\your\\workspace"
 
61
  }
62
  }
63
  }
@@ -73,57 +93,99 @@ Edit `%APPDATA%\Claude\claude_desktop_config.json`:
73
  ### Local Shell
74
  | Tool | Description |
75
  |------|-------------|
76
- | `Shell` | Execute a local command |
77
  | `Pwd` | Get current working directory |
78
- | `ShellInfo` | Show mode and allowed commands |
79
  | `ShellBatch` | Run multiple commands in sequence |
80
 
81
- ### SSH (requires SSH Bridge running)
82
  | Tool | Description |
83
  |------|-------------|
84
  | `SshCommand` | Execute command on remote server |
85
  | `SshStatus` | Check if SSH Bridge is connected |
86
-
87
- ## SSH Bridge Usage
88
-
89
- 1. Run `ssh-bridge.exe`
90
- 2. Enter host, username, and password
91
- 3. Click **Connect**
92
- 4. Window shows all commands Claude runs and their output
93
- 5. Click **Disconnect** anytime to revoke access
94
-
95
- Password is held in memory only while connected - never written to disk.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
  ## Security Model
98
 
99
  ### shell_safe (approve once)
100
  Read-only and build commands:
101
- - `dir`, `ls`, `type`, `cat`, `pwd`, `cd`
102
- - `git status`, `git log`, `git diff`, `git branch`
103
- - `dotnet build`, `dotnet run`, `dotnet test`
104
- - `npm install`, `npm run`, `npm test`
 
 
105
 
106
  ### shell_dangerous (approve each time)
107
  Modifying commands:
108
  - `del`, `rm`, `rmdir`, `move`, `copy`, `mkdir`
109
- - `git push`, `git commit`, `git reset`
110
- - `taskkill`
 
111
 
112
  ### Always blocked
113
- - `format`, `diskpart`, `regedit`
114
  - `net user`, `net localgroup`
115
- - `rm -rf /`, `del /s /q c:\`
 
 
 
 
 
 
 
 
 
116
 
117
- ### SSH Bridge
118
- - You authenticate manually each session
119
- - You see every command in real-time
120
- - Disconnect button = instant revoke
121
- - No password persistence
122
 
123
  ## Dependencies
124
 
125
  - [ModelContextProtocol](https://www.nuget.org/packages/ModelContextProtocol) - MCP SDK for .NET
126
  - [SSH.NET](https://www.nuget.org/packages/SSH.NET) - SSH client library
 
127
 
128
  ## License
129
 
 
6
 
7
  - **Local shell** with safe/dangerous command separation
8
  - **SSH Bridge** - GUI app for secure remote server access
9
+ - **Lift Pen** - Pause Claude's command execution instantly
10
+ - **Sudo support** - Auto-send password for sudo commands (opt-in)
11
+ - **Full visibility** - See every command Claude runs in real-time
12
+ - **Background processes** - Spawn and manage long-running tasks
13
+ - **File operations** - Write files without shell escaping issues
14
+
15
+ ## Quick Start (Pre-built Binaries)
16
+
17
+ Download from the `release/` folder:
18
+ - `shell-mcp.dll` - MCP server for Claude Desktop
19
+ - `ssh-bridge.exe` - GUI for SSH connections
20
+
21
+ No build required - just configure Claude Desktop (see below).
22
 
23
  ## Components
24
 
 
26
  Local Windows terminal access with configurable command allowlists.
27
 
28
  ### 2. SSH Bridge (`ssh-bridge.exe`)
29
+ WinForms GUI that:
30
+ - You authenticate with password (held in memory only)
31
  - Claude sends commands through it
32
+ - Real-time output display with syntax highlighting
33
+ - **Lift Pen** button to pause Claude instantly
34
+ - **Sudo** button to enable auto-password for sudo commands
35
+ - **Pin** button to keep window on top
36
+ - Right-click context menu: Copy, Copy All, Clear
37
 
38
  ## Installation
39
 
40
+ ### Option 1: Use Pre-built Binaries
41
+ 1. Download files from `release/` folder
42
+ 2. Configure Claude Desktop (see below)
43
+
44
+ ### Option 2: Build from Source
45
+
46
+ **Prerequisites:**
47
  - .NET 8.0 SDK
48
  - Windows 10/11
49
 
 
 
50
  ```bash
51
  git clone https://github.com/FreeOnlineUser/shell-mcp.git
52
  cd shell-mcp
53
  dotnet restore
54
+ dotnet build ShellMcp.csproj -c Release
55
+ dotnet build SshBridge.csproj -c Release
56
  ```
57
 
58
  ### Configure Claude Desktop
 
64
  "mcpServers": {
65
  "shell_safe": {
66
  "command": "dotnet",
67
+ "args": ["C:\\path\\to\\release\\shell-mcp.dll"],
68
  "env": {
69
  "SHELL_MCP_MODE": "safe",
70
+ "SHELL_MCP_START_DIR": "C:\\your\\workspace",
71
+ "SSH_BRIDGE_PATH": "C:\\path\\to\\release\\ssh-bridge.exe"
72
  }
73
  },
74
  "shell_dangerous": {
75
  "command": "dotnet",
76
+ "args": ["C:\\path\\to\\release\\shell-mcp.dll"],
77
  "env": {
78
  "SHELL_MCP_MODE": "dangerous",
79
+ "SHELL_MCP_START_DIR": "C:\\your\\workspace",
80
+ "SSH_BRIDGE_PATH": "C:\\path\\to\\release\\ssh-bridge.exe"
81
  }
82
  }
83
  }
 
93
  ### Local Shell
94
  | Tool | Description |
95
  |------|-------------|
96
+ | `Shell` | Execute a local command with optional timeout |
97
  | `Pwd` | Get current working directory |
98
+ | `ShellInfo` | Show mode and list of allowed commands |
99
  | `ShellBatch` | Run multiple commands in sequence |
100
 
101
+ ### SSH Tools
102
  | Tool | Description |
103
  |------|-------------|
104
  | `SshCommand` | Execute command on remote server |
105
  | `SshStatus` | Check if SSH Bridge is connected |
106
+ | `SshPrefill` | Pre-fill connection details and optionally auto-connect |
107
+ | `SshPenStatus` | Check if user has paused execution (pen lifted) |
108
+ | `SshPenDown` | Request to resume execution |
109
+ | `SshAbort` | Send Ctrl+C to abort running command |
110
+ | `SshIsRunning` | Check if a command is currently executing |
111
+ | `SshSetTimeout` | Set timeout for next command (1-3600 seconds) |
112
+ | `SshTail` | Get last 50 lines of terminal output |
113
+ | `SshKillPort` | Kill process listening on a specific port |
114
+ | `SshSpawn` | Start a background process with a trackable name |
115
+ | `SshListSpawned` | List all tracked background processes |
116
+ | `SshKillSpawned` | Kill a background process by name |
117
+ | `SshWriteFile` | Write content to file without shell escaping |
118
+ | `SshAppendFile` | Append content to file without shell escaping |
119
+
120
+ ## SSH Bridge Features
121
+
122
+ ### Lift Pen (Pause Claude)
123
+ Click **Lift Pen** to immediately pause Claude's command execution. Any running command is aborted, and new commands are blocked until you click again to resume. Perfect for:
124
+ - Reviewing what Claude is doing
125
+ - Taking manual control temporarily
126
+ - Emergency stop
127
+
128
+ ### Sudo Support
129
+ Click **Sudo** to enable auto-password entry for sudo commands. When enabled:
130
+ - Claude can run `sudo` commands without prompting
131
+ - Your password is sent automatically when sudo asks
132
+ - Password is only held in memory while connected
133
+
134
+ ### Pin Window
135
+ Click **Pin** to keep the SSH Bridge window always on top.
136
+
137
+ ### Interactive Command Blocking
138
+ The bridge automatically blocks interactive commands that would break the shell:
139
+ - **Editors:** vim, nano, emacs (use `echo` or `SshWriteFile` instead)
140
+ - **Pagers:** less, more (use `cat`, `head`, `tail` instead)
141
+ - **TUI apps:** htop, top (use `top -b -n 1` or `ps aux`)
142
+ - **Databases:** mysql, psql (use `-e` or `-c` flags for queries)
143
+ - **Multiplexers:** tmux, screen (not supported)
144
+
145
+ Each blocked command shows helpful alternatives.
146
 
147
  ## Security Model
148
 
149
  ### shell_safe (approve once)
150
  Read-only and build commands:
151
+ - `dir`, `ls`, `type`, `cat`, `head`, `tail`, `find`, `grep`, `pwd`, `cd`, `tree`
152
+ - `echo`, `date`, `time`, `whoami`, `hostname`
153
+ - `git status`, `git log`, `git diff`, `git branch`, `git remote`, `git fetch`, `git show`
154
+ - `dotnet build`, `dotnet run`, `dotnet test`, `dotnet restore`
155
+ - `npm install`, `npm run`, `npm test`, `npm list`, `npm ci`
156
+ - `node --version`, `yarn install`, `yarn build`, `yarn test`
157
 
158
  ### shell_dangerous (approve each time)
159
  Modifying commands:
160
  - `del`, `rm`, `rmdir`, `move`, `copy`, `mkdir`
161
+ - `git push`, `git pull`, `git merge`, `git rebase`, `git reset`, `git commit`, `git add`
162
+ - `taskkill`, `shutdown`
163
+ - `npm install -g`, `npm uninstall`
164
 
165
  ### Always blocked
166
+ - `format`, `diskpart`, `reg`, `regedit`
167
  - `net user`, `net localgroup`
168
+ - `powershell -enc`, `rm -rf /`, `del /s /q c:\`
169
+
170
+ ### SSH Bridge Security
171
+ - Password held in memory only - never written to disk
172
+ - Lift Pen for instant pause
173
+ - Disconnect for instant revoke
174
+ - All commands visible in real-time
175
+ - Sudo disabled by default
176
+
177
+ ## Output Handling
178
 
179
+ - Large outputs are automatically truncated (last 150 lines returned to Claude)
180
+ - Maximum 500KB per response
181
+ - Real-time streaming display in SSH Bridge window
182
+ - ANSI escape codes stripped for clean output
 
183
 
184
  ## Dependencies
185
 
186
  - [ModelContextProtocol](https://www.nuget.org/packages/ModelContextProtocol) - MCP SDK for .NET
187
  - [SSH.NET](https://www.nuget.org/packages/SSH.NET) - SSH client library
188
+ - [BouncyCastle](https://www.nuget.org/packages/BouncyCastle.Cryptography) - Cryptography (SSH.NET dependency)
189
 
190
  ## License
191