-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Description
PM2 should optionally include a native MCP server to expose process introspection, logs, and control via HTTP/SSE.
Enablement:
pm2 start ecosystem.config.js --mcp
# or
pm2 set mcp.enabled true
pm2 set mcp.port 7777
Endpoints / Features:
/processes (GET) — list all processes, status, CPU/mem, uptime
/process/:id (GET) — detailed info on a process
/logs/:id (GET) — stream or search logs for a process (SSE or tail)
/restart/:id (POST) — restart a process
/stop/:id (POST) — stop a process
/scale/:id (POST) — scale cluster instances up/down
/metrics (GET) — CPU/mem, restart counts, uptime summary
/health (GET) — overall PM2 daemon health
Design Notes:
- MCP server disabled by default
- Authentication optional (token or local-only by default)
- Can serve multiple MCP clients concurrently
- Minimal footprint — reuses PM2 internal process table and log streams
Use Cases:
LLM / AI tool orchestration (query, restart, scale)
Dev workflows: auto-tail logs, search history
Ops dashboards / monitoring integration
Programmatic PM2 control without shell commands
Summary:
- Native, optional MCP server
- Exposes logs, metrics, status, and control
- Lightweight, secure, opt-in
Unitech
Metadata
Metadata
Assignees
Labels
No labels