Skip to content

Commit c51a51c

Browse files
Merge pull request #2 from PromptExecution/feature/mcp-mcp-tests
Add MCP MCP test harness
2 parents ff1ca97 + 637ff7e commit c51a51c

File tree

12 files changed

+5480
-69
lines changed

12 files changed

+5480
-69
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PM2 is constantly assailed by [more than 1800 tests](https://github.com/Unitech/
3838

3939
Official website: [https://pm2.keymetrics.io/](https://pm2.keymetrics.io/)
4040

41-
Works on Linux (stable) & macOS (stable) & Windows (stable). All Node.js versions are supported starting Node.js 12.X and Bun since v1
41+
Works on Linux (stable) & macOS (stable) & Windows (stable). All Node.js versions are supported starting Node.js 22.0.0 and Bun since v1
4242

4343

4444
## Installing PM2
@@ -222,6 +222,15 @@ $ pm2 update
222222

223223
*PM2 updates are seamless*
224224

225+
## MCP server
226+
227+
PM2 now bundles an [MCP](https://modelcontextprotocol.io/specification/2025-11-25) stdio server that exposes the core process controls (list, describe, start, restart, reload, stop, delete, log flush/rotation, dump, daemon kill) plus process resources.
228+
229+
- Run it with `pm2-mcp` (or `npm run mcp`) and point your MCP client at that stdio command.
230+
- Quick Codex registration: `codex mcp add pm2-mcp -- pm2-mcp` then `codex mcp list` to confirm.
231+
- Tools: `pm2_list_processes`, `pm2_describe_process`, `pm2_start_process`, `pm2_restart_process`, `pm2_reload_process`, `pm2_stop_process`, `pm2_delete_process`, `pm2_flush_logs`, `pm2_reload_logs`, `pm2_dump`, `pm2_tail_logs`, `pm2_kill_daemon`.
232+
- Resources: `pm2://processes` (list) and `pm2://process/{id}` (detail). Both return JSON payloads.
233+
225234
## PM2+ Monitoring
226235

227236
If you manage your apps with PM2, PM2+ makes it easy to monitor and manage apps across servers.

bin/pm2-mcp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env node
2+
require('../lib/mcp/server.js');

bun.lock

Lines changed: 378 additions & 36 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)