mcp-ssh-manager 3.0.0 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +10 -1
- package/CHANGELOG.md +63 -0
- package/CLAUDE.md +16 -0
- package/README.md +117 -4
- package/cli/commands/server.sh +27 -5
- package/cli/commands/tools.sh +603 -0
- package/cli/lib/config.sh +104 -14
- package/cli/lib/menu.sh +124 -0
- package/cli/ssh-manager +17 -7
- package/context-test.txt +1 -0
- package/docs/SOCIAL_MEDIA_ANNOUNCEMENT.md +385 -0
- package/docs/TOOL_MANAGEMENT.md +473 -0
- package/docs/TROUBLESHOOTING.md +143 -0
- package/package.json +5 -4
- package/scripts/validate.sh +12 -0
- package/src/backup-manager.js +12 -12
- package/src/command-aliases.js +16 -16
- package/src/config-loader.js +1 -1
- package/src/config.js +70 -0
- package/src/database-manager.js +38 -40
- package/src/deploy-helper.js +12 -13
- package/src/health-monitor.js +26 -26
- package/src/hooks-system.js +43 -43
- package/src/index.js +899 -841
- package/src/logger.js +53 -53
- package/src/profile-loader.js +14 -14
- package/src/server-aliases.js +11 -11
- package/src/server-groups.js +98 -97
- package/src/session-manager.js +59 -58
- package/src/ssh-key-manager.js +4 -3
- package/src/ssh-manager.js +46 -24
- package/src/tool-config-manager.js +434 -0
- package/src/tool-registry.js +196 -0
- package/src/tunnel-manager.js +98 -98
|
@@ -80,7 +80,16 @@
|
|
|
80
80
|
"Bash(npm whoami:*)",
|
|
81
81
|
"Bash(npm view:*)",
|
|
82
82
|
"Bash(npm pack:*)",
|
|
83
|
-
"Bash(npm publish:*)"
|
|
83
|
+
"Bash(npm publish:*)",
|
|
84
|
+
"Bash(git rm:*)",
|
|
85
|
+
"Bash(while read line_num rest)",
|
|
86
|
+
"Bash(do sed -n \"$line_nums/.*''''\\([^'''']*\\)''''.*/\\1/p\" /Users/jeremy/mcp/mcp-ssh-manager/src/index.js done)",
|
|
87
|
+
"Bash(sed:*)",
|
|
88
|
+
"Bash(perl:*)",
|
|
89
|
+
"Bash(git fetch:*)",
|
|
90
|
+
"Bash(git -C /Users/jeremy/mcp/mcp-ssh-manager log:*)",
|
|
91
|
+
"WebFetch(domain:www.npmjs.com)",
|
|
92
|
+
"WebFetch(domain:glama.ai)"
|
|
84
93
|
],
|
|
85
94
|
"deny": []
|
|
86
95
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,69 @@ All notable changes to MCP SSH Manager will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.1.2] - 2026-02-09
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Windows compatibility**: Replace `process.env.HOME` with `os.homedir()` for cross-platform support ([#8](https://github.com/bvisible/mcp-ssh-manager/issues/8))
|
|
13
|
+
- `process.env.HOME` is undefined on Windows, causing crash at startup
|
|
14
|
+
- Fixed in `src/ssh-key-manager.js`, `src/index.js`, `src/ssh-manager.js`
|
|
15
|
+
|
|
16
|
+
## [3.1.1] - 2025-11-15
|
|
17
|
+
|
|
18
|
+
### 🔧 Stability & Performance Release
|
|
19
|
+
|
|
20
|
+
This release fixes critical issues causing Claude Code to crash or freeze during MCP tool execution, particularly with large command outputs.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- **Claude Code crashes**: Automatic output truncation prevents context overflow
|
|
25
|
+
- All stdout/stderr outputs now limited to 10,000 characters (configurable)
|
|
26
|
+
- Clear truncation indicator showing how many characters were cut
|
|
27
|
+
- Prevents "Interrupted: What should Claude do instead?" errors
|
|
28
|
+
|
|
29
|
+
- **Timeout issues**: Default timeout increased from 30s to 2 minutes
|
|
30
|
+
- Maximum timeout raised to 5 minutes for long-running operations
|
|
31
|
+
- Prevents premature command termination
|
|
32
|
+
|
|
33
|
+
- **Standardized error responses**: Consistent JSON error format
|
|
34
|
+
- Better error handling and logging
|
|
35
|
+
- Improved debugging information
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- **Performance configuration** via environment variables:
|
|
40
|
+
- `MCP_SSH_MAX_OUTPUT_LENGTH`: Control output truncation (default: 10000)
|
|
41
|
+
- `MCP_SSH_DEFAULT_TIMEOUT`: Set default command timeout (default: 120000ms)
|
|
42
|
+
- `MCP_SSH_MAX_TIMEOUT`: Set maximum timeout limit (default: 300000ms)
|
|
43
|
+
- `MCP_SSH_COMPACT_JSON`: Enable compact JSON responses (default: false)
|
|
44
|
+
- `MCP_SSH_DEBUG`: Enable debug information (default: false)
|
|
45
|
+
- `MCP_SSH_CONNECTION_TIMEOUT`: Connection idle timeout (default: 1800000ms)
|
|
46
|
+
- `MCP_SSH_KEEPALIVE_INTERVAL`: Keepalive packet interval (default: 60000ms)
|
|
47
|
+
|
|
48
|
+
- **New configuration module** (`src/config.js`):
|
|
49
|
+
- Centralized configuration management
|
|
50
|
+
- Helper functions: `truncateOutput()`, `formatJSONResponse()`
|
|
51
|
+
- Environment variable parsing with defaults
|
|
52
|
+
|
|
53
|
+
- **Troubleshooting documentation**:
|
|
54
|
+
- Complete guide in `docs/TROUBLESHOOTING.md`
|
|
55
|
+
- Best practices for handling large outputs
|
|
56
|
+
- Performance optimization tips
|
|
57
|
+
- Debugging steps for common issues
|
|
58
|
+
|
|
59
|
+
### Changed
|
|
60
|
+
|
|
61
|
+
- Updated `.env.example` with new performance configuration options
|
|
62
|
+
- Enhanced README with troubleshooting section for Claude Code crashes
|
|
63
|
+
- Improved error logging with detailed context
|
|
64
|
+
|
|
65
|
+
### Documentation
|
|
66
|
+
|
|
67
|
+
- Added comprehensive troubleshooting guide
|
|
68
|
+
- Updated README with performance tuning section
|
|
69
|
+
- Added examples for handling large command outputs
|
|
70
|
+
|
|
8
71
|
## [3.0.0] - 2025-10-01
|
|
9
72
|
|
|
10
73
|
### 🎉 Major Release - Enterprise DevOps Features
|
package/CLAUDE.md
CHANGED
|
@@ -51,6 +51,22 @@ ssh-manager codex convert to-toml # Convert .env to TOML
|
|
|
51
51
|
ssh-manager codex convert to-env # Convert TOML to .env
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
### Tool Management (NEW in v3.1)
|
|
55
|
+
```bash
|
|
56
|
+
ssh-manager tools list # Show all tools and status
|
|
57
|
+
ssh-manager tools configure # Interactive configuration wizard
|
|
58
|
+
ssh-manager tools enable <group> # Enable a tool group
|
|
59
|
+
ssh-manager tools disable <group> # Disable a tool group
|
|
60
|
+
ssh-manager tools reset # Reset to defaults (all tools)
|
|
61
|
+
ssh-manager tools export-claude # Export auto-approval config
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Tool Groups**: core (5), sessions (4), monitoring (6), backup (4), database (4), advanced (14)
|
|
65
|
+
|
|
66
|
+
**Modes**: all (37 tools, ~43.5k tokens), minimal (5 tools, ~3.5k tokens), custom (variable)
|
|
67
|
+
|
|
68
|
+
See [docs/TOOL_MANAGEMENT.md](docs/TOOL_MANAGEMENT.md) for complete guide.
|
|
69
|
+
|
|
54
70
|
### Development and Testing
|
|
55
71
|
```bash
|
|
56
72
|
npm start # Start MCP server (requires stdin)
|
package/README.md
CHANGED
|
@@ -8,9 +8,11 @@ A powerful Model Context Protocol (MCP) server that enables **Claude Code** and
|
|
|
8
8
|
|
|
9
9
|
<div align="center">
|
|
10
10
|
|
|
11
|
+
[](https://www.npmjs.com/package/mcp-ssh-manager)
|
|
12
|
+
[](https://www.npmjs.com/package/mcp-ssh-manager)
|
|
11
13
|
[](https://github.com/bvisible/mcp-ssh-manager)
|
|
12
14
|
[](https://modelcontextprotocol.io)
|
|
13
|
-
[](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v3.1.0)
|
|
14
16
|
[](https://claude.ai/code)
|
|
15
17
|
[](https://openai.com/codex)
|
|
16
18
|
[](https://modelcontextprotocol.io)
|
|
@@ -20,13 +22,31 @@ A powerful Model Context Protocol (MCP) server that enables **Claude Code** and
|
|
|
20
22
|
<img width="380" height="200" src="https://glama.ai/mcp/servers/@bvisible/mcp-ssh-manager/badge" alt="SSH Manager MCP server" />
|
|
21
23
|
</a>
|
|
22
24
|
|
|
25
|
+
<br/>
|
|
26
|
+
|
|
27
|
+
<a href="https://mseep.ai/app/bvisible-mcp-ssh-manager">
|
|
28
|
+
<img src="https://mseep.net/pr/bvisible-mcp-ssh-manager-badge.png" alt="MseeP.ai Security Assessment Badge" />
|
|
29
|
+
</a>
|
|
30
|
+
|
|
23
31
|
</div>
|
|
24
32
|
|
|
25
33
|
---
|
|
26
34
|
|
|
27
|
-
## 🎉 What's New in v3.
|
|
35
|
+
## 🎉 What's New in v3.1.0
|
|
28
36
|
|
|
29
|
-
**
|
|
37
|
+
**Tool Activation System** (Released: November 15, 2025)
|
|
38
|
+
|
|
39
|
+
### 🎯 Context Usage Optimization
|
|
40
|
+
- **92% context reduction**: Enable only the tools you need (minimal mode: 5 tools vs all 37)
|
|
41
|
+
- **Tool management CLI**: `ssh-manager tools list/configure/enable/disable`
|
|
42
|
+
- **6 tool groups**: Core, Sessions, Monitoring, Backup, Database, Advanced
|
|
43
|
+
- **Auto-approval export**: Generate Claude Code auto-approval configs
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Previous Releases
|
|
48
|
+
|
|
49
|
+
### v3.0.0 - Enterprise DevOps Platform (October 1, 2025)
|
|
30
50
|
|
|
31
51
|
This release adds **12 new MCP tools** transforming SSH Manager into a comprehensive DevOps automation platform:
|
|
32
52
|
|
|
@@ -101,6 +121,54 @@ This release adds **12 new MCP tools** transforming SSH Manager into a comprehen
|
|
|
101
121
|
|
|
102
122
|
---
|
|
103
123
|
|
|
124
|
+
## ⚙️ Tool Management & Context Optimization
|
|
125
|
+
|
|
126
|
+
**NEW in v3.1**: Reduce Claude Code context usage by 92% with tool activation management!
|
|
127
|
+
|
|
128
|
+
MCP SSH Manager includes **37 tools** organized into **6 groups**. By default, all tools are enabled, but you can optimize for your specific workflow:
|
|
129
|
+
|
|
130
|
+
### Quick Setup
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Interactive configuration wizard
|
|
134
|
+
ssh-manager tools configure
|
|
135
|
+
|
|
136
|
+
# View current configuration
|
|
137
|
+
ssh-manager tools list
|
|
138
|
+
|
|
139
|
+
# Enable/disable specific groups
|
|
140
|
+
ssh-manager tools enable monitoring
|
|
141
|
+
ssh-manager tools disable backup
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Configuration Modes
|
|
145
|
+
|
|
146
|
+
| Mode | Tools | Context Usage | Best For |
|
|
147
|
+
|------|-------|---------------|----------|
|
|
148
|
+
| **All** (default) | 37 tools | ~43.5k tokens | Full feature set, most users |
|
|
149
|
+
| **Minimal** | 5 tools | ~3.5k tokens | Basic SSH operations only |
|
|
150
|
+
| **Custom** | 5-37 tools | Varies | Tailored to your workflow |
|
|
151
|
+
|
|
152
|
+
### Tool Groups
|
|
153
|
+
|
|
154
|
+
- **Core** (5 tools) - Always enabled: list, execute, upload, download, sync
|
|
155
|
+
- **Sessions** (4 tools) - Persistent SSH sessions
|
|
156
|
+
- **Monitoring** (6 tools) - Health checks, service status, process management
|
|
157
|
+
- **Backup** (4 tools) - Database and file backups
|
|
158
|
+
- **Database** (4 tools) - MySQL, PostgreSQL, MongoDB operations
|
|
159
|
+
- **Advanced** (14 tools) - Deployment, sudo, tunnels, groups, aliases, etc.
|
|
160
|
+
|
|
161
|
+
### Benefits
|
|
162
|
+
|
|
163
|
+
- **92% context reduction** in minimal mode (~40k tokens saved)
|
|
164
|
+
- **Fewer approval prompts** in Claude Code
|
|
165
|
+
- **Faster loading** and cleaner interface
|
|
166
|
+
- **Auto-approval configuration** export for Claude Code
|
|
167
|
+
|
|
168
|
+
📖 [**Complete Tool Management Guide →**](docs/TOOL_MANAGEMENT.md)
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
104
172
|
## 🔍 Alternative Search Terms
|
|
105
173
|
|
|
106
174
|
Looking for:
|
|
@@ -133,6 +201,18 @@ This is **the** MCP SSH Manager you've been searching for! 🎯
|
|
|
133
201
|
|
|
134
202
|
### 1. Install MCP SSH Manager
|
|
135
203
|
|
|
204
|
+
**Option A: Install from npm (recommended)**
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# Install globally from npm
|
|
208
|
+
npm install -g mcp-ssh-manager
|
|
209
|
+
|
|
210
|
+
# Or install locally
|
|
211
|
+
npx mcp-ssh-manager
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Option B: Install from source**
|
|
215
|
+
|
|
136
216
|
```bash
|
|
137
217
|
# Clone and install
|
|
138
218
|
git clone https://github.com/bvisible/mcp-ssh-manager.git
|
|
@@ -534,6 +614,39 @@ claude mcp list
|
|
|
534
614
|
|
|
535
615
|
## 🐛 Troubleshooting
|
|
536
616
|
|
|
617
|
+
### Claude Code Crashes / Interruptions
|
|
618
|
+
|
|
619
|
+
**Symptoms:**
|
|
620
|
+
- Claude shows "Interrupted: What should Claude do instead?"
|
|
621
|
+
- MCP tools execute but Claude stops working
|
|
622
|
+
- Commands succeed but Claude freezes
|
|
623
|
+
|
|
624
|
+
**Solution:** v3.1.1 includes automatic fixes:
|
|
625
|
+
- ✅ Output auto-truncated to prevent context overflow
|
|
626
|
+
- ✅ Timeout increased to 2 minutes (default), max 5 minutes
|
|
627
|
+
- ✅ Standardized error responses
|
|
628
|
+
|
|
629
|
+
**Performance Tuning** (add to `.env`):
|
|
630
|
+
```bash
|
|
631
|
+
# Reduce output size (default: 10000 characters)
|
|
632
|
+
MCP_SSH_MAX_OUTPUT_LENGTH=5000
|
|
633
|
+
|
|
634
|
+
# Increase timeout for slow commands (default: 120000ms)
|
|
635
|
+
MCP_SSH_DEFAULT_TIMEOUT=180000
|
|
636
|
+
|
|
637
|
+
# Use compact JSON to save tokens (default: false)
|
|
638
|
+
MCP_SSH_COMPACT_JSON=true
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
**For large outputs:**
|
|
642
|
+
```bash
|
|
643
|
+
# Instead of: cat huge-log.txt
|
|
644
|
+
# Use: tail -n 100 huge-log.txt
|
|
645
|
+
# Or: grep ERROR huge-log.txt | tail -n 50
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
See [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) for complete guide.
|
|
649
|
+
|
|
537
650
|
### MCP Tools Not Available
|
|
538
651
|
|
|
539
652
|
1. Ensure MCP is installed: `claude mcp list`
|
|
@@ -542,7 +655,7 @@ claude mcp list
|
|
|
542
655
|
|
|
543
656
|
### Connection Failed
|
|
544
657
|
|
|
545
|
-
1. Test connection: `
|
|
658
|
+
1. Test connection: `ssh-manager server test [server_name]`
|
|
546
659
|
2. Verify network connectivity
|
|
547
660
|
3. Check firewall rules
|
|
548
661
|
4. Ensure SSH service is running on remote server
|
package/cli/commands/server.sh
CHANGED
|
@@ -191,21 +191,43 @@ cmd_server_remove() {
|
|
|
191
191
|
fi
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
# Edit server configuration
|
|
195
|
-
|
|
194
|
+
# Edit server configuration (full .env file)
|
|
195
|
+
cmd_server_edit_file() {
|
|
196
196
|
local editor=$(get_config "default_editor" "${EDITOR:-nano}")
|
|
197
|
-
|
|
197
|
+
|
|
198
198
|
if [ ! -f "$SSH_MANAGER_ENV" ]; then
|
|
199
199
|
print_error "Configuration file not found: $SSH_MANAGER_ENV"
|
|
200
200
|
return 1
|
|
201
201
|
fi
|
|
202
|
-
|
|
202
|
+
|
|
203
203
|
print_info "Opening configuration in $editor..."
|
|
204
204
|
$editor "$SSH_MANAGER_ENV"
|
|
205
|
-
|
|
205
|
+
|
|
206
206
|
print_success "Configuration updated"
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
# Edit server interactively
|
|
210
|
+
cmd_server_edit() {
|
|
211
|
+
local server="$1"
|
|
212
|
+
|
|
213
|
+
if [ -z "$server" ]; then
|
|
214
|
+
# No server specified, launch wizard
|
|
215
|
+
wizard_edit_server
|
|
216
|
+
else
|
|
217
|
+
# Server specified, edit that specific server
|
|
218
|
+
# Check if server exists
|
|
219
|
+
local host=$(get_server_config "$server" "HOST")
|
|
220
|
+
if [ -z "$host" ]; then
|
|
221
|
+
print_error "Server '$server' not found"
|
|
222
|
+
return 1
|
|
223
|
+
fi
|
|
224
|
+
|
|
225
|
+
# Set SELECTED_SERVER for wizard
|
|
226
|
+
SELECTED_SERVER="$server"
|
|
227
|
+
wizard_edit_server
|
|
228
|
+
fi
|
|
229
|
+
}
|
|
230
|
+
|
|
209
231
|
# Show server details
|
|
210
232
|
cmd_server_show() {
|
|
211
233
|
local server="$1"
|