@prmichaelsen/acp-mcp 0.7.1 → 1.0.0
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/CHANGELOG.md +57 -0
- package/README.md +121 -41
- package/agent/progress.yaml +29 -5
- package/dist/server-factory.js +2 -496
- package/dist/server-factory.js.map +4 -4
- package/dist/server.js +2 -496
- package/dist/server.js.map +4 -4
- package/dist/utils/ssh-connection.d.ts +0 -40
- package/package.json +1 -1
- package/src/server-factory.ts +2 -12
- package/src/server.ts +2 -11
- package/src/utils/ssh-connection.ts +1 -304
- package/dist/tools/acp-remote-list-files.d.ts +0 -16
- package/dist/tools/acp-remote-read-file.d.ts +0 -16
- package/dist/tools/acp-remote-write-file.d.ts +0 -16
- package/dist/types/file-entry.d.ts +0 -88
- package/src/tools/acp-remote-list-files.ts +0 -100
- package/src/tools/acp-remote-read-file.ts +0 -94
- package/src/tools/acp-remote-write-file.ts +0 -107
- package/src/types/file-entry.ts +0 -123
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,63 @@ All notable changes to this project 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
|
+
## [1.0.0] - 2026-02-24
|
|
9
|
+
|
|
10
|
+
### Removed
|
|
11
|
+
- **BREAKING**: Removed `acp_remote_list_files`, `acp_remote_read_file`, and `acp_remote_write_file` tools
|
|
12
|
+
- All SFTP-based tools had fundamental issues with path expansion (didn't expand `~`)
|
|
13
|
+
- SFTP implementation was unreliable, complex, and had multiple edge cases
|
|
14
|
+
- `acp_remote_execute_command` with shell commands is more reliable and flexible
|
|
15
|
+
- Single tool approach is simpler and more maintainable
|
|
16
|
+
|
|
17
|
+
### Migration Guide
|
|
18
|
+
|
|
19
|
+
**Before (v0.x)**:
|
|
20
|
+
```typescript
|
|
21
|
+
// List files
|
|
22
|
+
acp_remote_list_files({ path: "~/project", recursive: false })
|
|
23
|
+
|
|
24
|
+
// Read file
|
|
25
|
+
acp_remote_read_file({ path: "~/project/package.json" })
|
|
26
|
+
|
|
27
|
+
// Write file
|
|
28
|
+
acp_remote_write_file({ path: "~/project/file.txt", content: "hello" })
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**After (v1.0.0)**:
|
|
32
|
+
```typescript
|
|
33
|
+
// List files - use ls, find, or tree
|
|
34
|
+
acp_remote_execute_command({ command: "ls -la ~/project" })
|
|
35
|
+
acp_remote_execute_command({ command: "find ~/project -type f" })
|
|
36
|
+
acp_remote_execute_command({ command: "tree ~/project" })
|
|
37
|
+
|
|
38
|
+
// Read file - use cat
|
|
39
|
+
acp_remote_execute_command({ command: "cat ~/project/package.json" })
|
|
40
|
+
|
|
41
|
+
// Write file - use echo or tee
|
|
42
|
+
acp_remote_execute_command({ command: "echo 'hello' > ~/project/file.txt" })
|
|
43
|
+
// Or for multi-line:
|
|
44
|
+
acp_remote_execute_command({ command: "cat > ~/project/file.txt << 'EOF'\nhello\nworld\nEOF" })
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Benefits of single-tool approach**:
|
|
48
|
+
- ✅ Properly expands `~` and all environment variables
|
|
49
|
+
- ✅ More flexible (use any shell commands and flags)
|
|
50
|
+
- ✅ Can use any installed tools (cat, echo, sed, awk, etc.)
|
|
51
|
+
- ✅ Much simpler codebase (only one tool to maintain)
|
|
52
|
+
- ✅ More reliable (uses shell directly, no SFTP edge cases)
|
|
53
|
+
- ✅ Consistent behavior with interactive SSH sessions
|
|
54
|
+
|
|
55
|
+
### Technical Details
|
|
56
|
+
- Removed `src/tools/acp-remote-list-files.ts`
|
|
57
|
+
- Removed `src/tools/acp-remote-read-file.ts`
|
|
58
|
+
- Removed `src/tools/acp-remote-write-file.ts`
|
|
59
|
+
- Removed `src/types/file-entry.ts`
|
|
60
|
+
- Removed all SFTP methods from SSHConnectionManager (getSFTP, readFile, writeFile, listFiles)
|
|
61
|
+
- Removed SFTPWrapper import from ssh2
|
|
62
|
+
- Now provides only 1 core tool: execute_command
|
|
63
|
+
- Dramatically simplified codebase and reduced maintenance burden
|
|
64
|
+
|
|
8
65
|
## [0.7.1] - 2026-02-23
|
|
9
66
|
|
|
10
67
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
# ACP MCP
|
|
2
2
|
|
|
3
|
-
MCP server for
|
|
3
|
+
MCP server for remote machine operations via SSH. Provides a single, powerful tool for executing any shell command on remote machines with real-time progress streaming.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install
|
|
8
|
+
npm install @prmichaelsen/acp-mcp
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Development
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
+
npm install
|
|
14
15
|
npm run dev
|
|
15
16
|
```
|
|
16
17
|
|
|
@@ -56,45 +57,124 @@ const server = await createServer({
|
|
|
56
57
|
|
|
57
58
|
## Available Tools
|
|
58
59
|
|
|
59
|
-
- **
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
60
|
+
**acp-mcp v1.0.0** provides a single, powerful tool for all remote operations:
|
|
61
|
+
|
|
62
|
+
### acp_remote_execute_command
|
|
63
|
+
|
|
64
|
+
Execute any shell command on the remote machine with optional progress streaming.
|
|
65
|
+
|
|
66
|
+
**Parameters**:
|
|
67
|
+
- `command` (required): Shell command to execute
|
|
68
|
+
- `cwd` (optional): Working directory for command execution
|
|
69
|
+
- `timeout` (optional): Timeout in seconds (default: 30, ignored if progress streaming)
|
|
70
|
+
|
|
71
|
+
**Returns**: `{ stdout, stderr, exitCode, timedOut, streamed? }`
|
|
72
|
+
|
|
73
|
+
**Features**:
|
|
74
|
+
|
|
75
|
+
1. **Shell Environment** (v0.7.1+): Automatically sources shell configuration files
|
|
76
|
+
- Sources `~/.zshrc`, `~/.bashrc`, or `~/.profile` before executing commands
|
|
77
|
+
- Ensures `$PATH` and environment variables are properly loaded
|
|
78
|
+
- Enables user-installed tools (nvm, homebrew, etc.) to work correctly
|
|
79
|
+
- Gracefully handles missing config files
|
|
80
|
+
|
|
81
|
+
2. **Progress Streaming** (v0.7.0+): Real-time output for long-running commands
|
|
82
|
+
- Requires MCP SDK v1.26.0+ (server and client)
|
|
83
|
+
- Client must provide `progressToken` in request `_meta`
|
|
84
|
+
- Client must handle progress notifications via `onprogress` callback
|
|
85
|
+
- Graceful fallback to timeout mode if no `progressToken` provided
|
|
86
|
+
- Rate limited to max 10 notifications/second
|
|
87
|
+
- Ideal for: `npm run build`, `npm test`, `npm run dev`
|
|
88
|
+
|
|
89
|
+
## Common Operations
|
|
90
|
+
|
|
91
|
+
### List Files
|
|
92
|
+
```bash
|
|
93
|
+
# Basic listing
|
|
94
|
+
acp_remote_execute_command({ command: "ls -la ~/project" })
|
|
95
|
+
|
|
96
|
+
# Recursive listing
|
|
97
|
+
acp_remote_execute_command({ command: "find ~/project -type f" })
|
|
98
|
+
|
|
99
|
+
# With tree (if installed)
|
|
100
|
+
acp_remote_execute_command({ command: "tree ~/project" })
|
|
101
|
+
|
|
102
|
+
# Only directories
|
|
103
|
+
acp_remote_execute_command({ command: "ls -d */ ~/project" })
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Read Files
|
|
107
|
+
```bash
|
|
108
|
+
# Read entire file
|
|
109
|
+
acp_remote_execute_command({ command: "cat ~/project/package.json" })
|
|
110
|
+
|
|
111
|
+
# Read first 100 lines
|
|
112
|
+
acp_remote_execute_command({ command: "head -n 100 ~/project/large-file.txt" })
|
|
113
|
+
|
|
114
|
+
# Read last 50 lines
|
|
115
|
+
acp_remote_execute_command({ command: "tail -n 50 ~/project/log.txt" })
|
|
116
|
+
|
|
117
|
+
# Search in file
|
|
118
|
+
acp_remote_execute_command({ command: "grep 'pattern' ~/project/file.txt" })
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Write Files
|
|
122
|
+
```bash
|
|
123
|
+
# Write simple content
|
|
124
|
+
acp_remote_execute_command({ command: "echo 'hello world' > ~/project/file.txt" })
|
|
125
|
+
|
|
126
|
+
# Write multi-line content
|
|
127
|
+
acp_remote_execute_command({
|
|
128
|
+
command: "cat > ~/project/file.txt << 'EOF'\nline 1\nline 2\nline 3\nEOF"
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
# Append to file
|
|
132
|
+
acp_remote_execute_command({ command: "echo 'new line' >> ~/project/file.txt" })
|
|
133
|
+
|
|
134
|
+
# Create directories
|
|
135
|
+
acp_remote_execute_command({ command: "mkdir -p ~/project/new/nested/dir" })
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### File Operations
|
|
139
|
+
```bash
|
|
140
|
+
# Copy files
|
|
141
|
+
acp_remote_execute_command({ command: "cp ~/source.txt ~/dest.txt" })
|
|
142
|
+
|
|
143
|
+
# Move files
|
|
144
|
+
acp_remote_execute_command({ command: "mv ~/old.txt ~/new.txt" })
|
|
145
|
+
|
|
146
|
+
# Delete files
|
|
147
|
+
acp_remote_execute_command({ command: "rm ~/file.txt" })
|
|
148
|
+
|
|
149
|
+
# Change permissions
|
|
150
|
+
acp_remote_execute_command({ command: "chmod 755 ~/script.sh" })
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Development Operations
|
|
154
|
+
```bash
|
|
155
|
+
# Git operations
|
|
156
|
+
acp_remote_execute_command({ command: "git status", cwd: "~/project" })
|
|
157
|
+
acp_remote_execute_command({ command: "git commit -m 'message'", cwd: "~/project" })
|
|
158
|
+
|
|
159
|
+
# Package management
|
|
160
|
+
acp_remote_execute_command({ command: "npm install", cwd: "~/project" })
|
|
161
|
+
acp_remote_execute_command({ command: "npm run build", cwd: "~/project" })
|
|
162
|
+
|
|
163
|
+
# Process management
|
|
164
|
+
acp_remote_execute_command({ command: "ps aux | grep node" })
|
|
165
|
+
acp_remote_execute_command({ command: "kill -9 12345" })
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Why Single Tool?
|
|
169
|
+
|
|
170
|
+
**v1.0.0 removed specialized tools** (`list_files`, `read_file`, `write_file`) in favor of `execute_command`:
|
|
171
|
+
|
|
172
|
+
✅ **Properly expands `~` and environment variables** - SFTP-based tools didn't
|
|
173
|
+
✅ **Maximum flexibility** - Use any shell command or tool
|
|
174
|
+
✅ **Simpler codebase** - One tool instead of four
|
|
175
|
+
✅ **More reliable** - No SFTP edge cases or limitations
|
|
176
|
+
✅ **Consistent behavior** - Works exactly like interactive SSH
|
|
177
|
+
✅ **Easier to maintain** - Single code path to test and debug
|
|
98
178
|
|
|
99
179
|
## Configuration
|
|
100
180
|
|
package/agent/progress.yaml
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
project:
|
|
2
2
|
name: acp-mcp
|
|
3
|
-
version: 0.
|
|
3
|
+
version: 1.0.0
|
|
4
4
|
started: 2026-02-22
|
|
5
5
|
status: in_progress
|
|
6
6
|
current_milestone: M4
|
|
7
7
|
description: |
|
|
8
8
|
MCP server for remote machine operations via SSH.
|
|
9
|
-
Provides
|
|
10
|
-
and listing directories on remote development environments.
|
|
9
|
+
Provides single powerful tool (execute_command) for all remote operations.
|
|
11
10
|
Supports real-time progress streaming for long-running commands.
|
|
11
|
+
Shell-based approach is more reliable than SFTP for all operations.
|
|
12
12
|
|
|
13
13
|
milestones:
|
|
14
14
|
- id: M1
|
|
@@ -209,6 +209,29 @@ progress:
|
|
|
209
209
|
overall: 80%
|
|
210
210
|
|
|
211
211
|
recent_work:
|
|
212
|
+
- date: 2026-02-24
|
|
213
|
+
description: Removed ALL specialized tools - v1.0.0 single-tool approach
|
|
214
|
+
items:
|
|
215
|
+
- 🔥 **BREAKING CHANGE**: Removed all SFTP-based tools (list_files, read_file, write_file)
|
|
216
|
+
- ✅ Root cause: All SFTP tools don't expand ~ or environment variables
|
|
217
|
+
- ✅ SFTP implementation was unreliable, complex, and had multiple edge cases
|
|
218
|
+
- ✅ Single execute_command tool is more reliable and flexible for ALL operations
|
|
219
|
+
- ✅ Removed src/tools/acp-remote-list-files.ts
|
|
220
|
+
- ✅ Removed src/tools/acp-remote-read-file.ts
|
|
221
|
+
- ✅ Removed src/tools/acp-remote-write-file.ts
|
|
222
|
+
- ✅ Removed src/types/file-entry.ts
|
|
223
|
+
- ✅ Removed ALL SFTP methods from SSHConnectionManager (getSFTP, readFile, writeFile, listFiles)
|
|
224
|
+
- ✅ Removed SFTPWrapper import from ssh2
|
|
225
|
+
- ✅ Updated server.ts and server-factory.ts (single tool registration)
|
|
226
|
+
- ✅ Updated CHANGELOG.md with v1.0.0 breaking change and migration guide
|
|
227
|
+
- ✅ Updated README.md with comprehensive usage examples
|
|
228
|
+
- ✅ Version bumped to 1.0.0 (major breaking change)
|
|
229
|
+
- ✅ Build successful - TypeScript compiles without errors
|
|
230
|
+
- 📋 Now provides ONLY 1 tool: execute_command
|
|
231
|
+
- 📋 Use shell commands for all operations (ls, cat, echo, etc.)
|
|
232
|
+
- 📋 Much simpler, more reliable, and easier to maintain
|
|
233
|
+
- 📋 Migration guide provided in CHANGELOG.md
|
|
234
|
+
|
|
212
235
|
- date: 2026-02-23
|
|
213
236
|
description: Fixed shell environment not loading - v0.7.1 patch
|
|
214
237
|
items:
|
|
@@ -337,10 +360,11 @@ recent_work:
|
|
|
337
360
|
- ✅ Version bumped to v0.4.1
|
|
338
361
|
|
|
339
362
|
next_steps:
|
|
340
|
-
- Deploy
|
|
363
|
+
- Deploy v1.0.0 to npm registry (breaking change - removed list_files tool)
|
|
364
|
+
- Update mcp-auth wrapper to use v1.0.0
|
|
365
|
+
- Update agentbase.me to use execute_command for file listing
|
|
341
366
|
- Test shell environment fix with user-installed tools (npm, node, git)
|
|
342
367
|
- Test progress streaming with real clients (Claude Desktop, mcp-auth)
|
|
343
|
-
- Close GitHub Issue #2 after production verification
|
|
344
368
|
- Start M5: Progress Streaming - Wrapper Integration (mcp-auth)
|
|
345
369
|
- Start M6: Progress Streaming - Client Integration (agentbase.me)
|
|
346
370
|
- Consider ACP update to v3.12.0 (experimental features system)
|