Skip to content

Commit 423857d

Browse files
Jérémy Christillinclaude
andcommitted
feat: add tool activation system to reduce context usage by 92%
Implement comprehensive tool management system allowing users to enable/disable tool groups and reduce Claude Code context usage from 43.5k tokens (37 tools) to 3.5k tokens (5 tools) in minimal mode. New Features: - Tool registry organizing 37 tools into 6 groups (core, sessions, monitoring, backup, database, advanced) - Configuration manager with 3 modes (all/minimal/custom) - Interactive CLI wizard for easy setup - Auto-approval config export for Claude Code - Per-group enable/disable commands CLI Commands: - ssh-manager tools list - View current configuration - ssh-manager tools configure - Interactive setup wizard - ssh-manager tools enable/disable <group> - Manage groups - ssh-manager tools reset - Reset to defaults - ssh-manager tools export-claude - Generate auto-approval config Files Added: - src/tool-registry.js - Tool group definitions and helpers - src/tool-config-manager.js - Configuration management - cli/commands/tools.sh - CLI commands implementation - docs/TOOL_MANAGEMENT.md - Complete user guide - tests/test-tool-registry.js - Test suite (13 tests) Files Modified: - src/index.js - Conditional tool registration - cli/ssh-manager - Integrated tools command - README.md - Added tool management section - CLAUDE.md - Updated for AI assistants - package.json - Version 3.1.0, new test script Impact: - 92% context reduction in minimal mode (~40k tokens saved) - Fewer approval prompts in Claude Code - Backward compatible (no config = all tools enabled) - Zero breaking changes All tests passing (13 new + all existing tests) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent d25550c commit 423857d

File tree

10 files changed

+2040
-41
lines changed

10 files changed

+2040
-41
lines changed

CLAUDE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,22 @@ ssh-manager codex convert to-toml # Convert .env to TOML
5151
ssh-manager codex convert to-env # Convert TOML to .env
5252
```
5353

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+
5470
### Development and Testing
5571
```bash
5672
npm start # Start MCP server (requires stdin)

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,54 @@ This release adds **12 new MCP tools** transforming SSH Manager into a comprehen
103103

104104
---
105105

106+
## ⚙️ Tool Management & Context Optimization
107+
108+
**NEW in v3.1**: Reduce Claude Code context usage by 92% with tool activation management!
109+
110+
MCP SSH Manager includes **37 tools** organized into **6 groups**. By default, all tools are enabled, but you can optimize for your specific workflow:
111+
112+
### Quick Setup
113+
114+
```bash
115+
# Interactive configuration wizard
116+
ssh-manager tools configure
117+
118+
# View current configuration
119+
ssh-manager tools list
120+
121+
# Enable/disable specific groups
122+
ssh-manager tools enable monitoring
123+
ssh-manager tools disable backup
124+
```
125+
126+
### Configuration Modes
127+
128+
| Mode | Tools | Context Usage | Best For |
129+
|------|-------|---------------|----------|
130+
| **All** (default) | 37 tools | ~43.5k tokens | Full feature set, most users |
131+
| **Minimal** | 5 tools | ~3.5k tokens | Basic SSH operations only |
132+
| **Custom** | 5-37 tools | Varies | Tailored to your workflow |
133+
134+
### Tool Groups
135+
136+
- **Core** (5 tools) - Always enabled: list, execute, upload, download, sync
137+
- **Sessions** (4 tools) - Persistent SSH sessions
138+
- **Monitoring** (6 tools) - Health checks, service status, process management
139+
- **Backup** (4 tools) - Database and file backups
140+
- **Database** (4 tools) - MySQL, PostgreSQL, MongoDB operations
141+
- **Advanced** (14 tools) - Deployment, sudo, tunnels, groups, aliases, etc.
142+
143+
### Benefits
144+
145+
- **92% context reduction** in minimal mode (~40k tokens saved)
146+
- **Fewer approval prompts** in Claude Code
147+
- **Faster loading** and cleaner interface
148+
- **Auto-approval configuration** export for Claude Code
149+
150+
📖 [**Complete Tool Management Guide →**](docs/TOOL_MANAGEMENT.md)
151+
152+
---
153+
106154
## 🔍 Alternative Search Terms
107155

108156
Looking for:

0 commit comments

Comments
 (0)