-
Notifications
You must be signed in to change notification settings - Fork 131
add: github.com/PromptExecution/pm2-mcp #11219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
PM2 with Model Context Protocol (MCP) server support. Features: - Full PM2 process manager functionality - Built-in MCP server for process management - 12 MCP tools for process lifecycle, logging, and monitoring - 2 MCP resources for process information - Automatic sandbox environment detection - Support for stdio and HTTP transports - Compatible with Claude Code, Codex, and other MCP clients Provides binaries: - pm2: Main PM2 CLI - pm2-dev: Development mode - pm2-docker: Docker runtime - pm2-runtime: Production runtime - pm2-mcp: MCP server Requirements: - Node.js >= 22.0.0 - Source build using npm install Related: - Repository: https://github.com/PromptExecution/pm2-mcp - MCP Spec: https://modelcontextprotocol.io/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new package for pm2-mcp, a fork of the PM2 process manager that includes Model Context Protocol (MCP) server support. The package enables process management through MCP-compatible clients by providing both the standard PM2 binaries and a new pm2-mcp binary that exposes MCP functionality.
Key Changes:
- New package definition for github.com/PromptExecution/pm2-mcp
- Installs from GitHub source tarballs using npm with Node.js >=22
- Provides 5 binaries: pm2, pm2-dev, pm2-docker, pm2-runtime, and pm2-mcp
- Includes README documentation with installation and usage examples
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| projects/github.com/PromptExecution/pm2-mcp/package.yml | Package definition with build/test configuration for pm2-mcp installation |
| projects/github.com/PromptExecution/pm2-mcp/README.md | Documentation covering features, installation, and MCP integration examples |
Critical Issue Found: The package directory path uses incorrect casing (PromptExecution vs promptexecution). According to pkgx conventions demonstrated by the sister package just-mcp and other GitHub packages, the directory structure should use all lowercase even when the actual GitHub organization uses mixed case. The directory should be projects/github.com/promptexecution/pm2-mcp/ not projects/github.com/PromptExecution/pm2-mcp/.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,65 @@ | |||
| # pm2-mcp pkgx package | |||
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package directory path uses incorrect casing. According to pkgx conventions, GitHub project paths should use lowercase for the directory structure even when the actual GitHub organization name uses mixed case.
The directory should be:
projects/github.com/promptexecution/pm2-mcp/
Not:
projects/github.com/PromptExecution/pm2-mcp/
This matches the pattern used by the sister package just-mcp which is correctly located at projects/github.com/promptexecution/just-mcp/ while still referencing github: PromptExecution/just-mcp/tags in the versions field and using PromptExecution in URLs.
| @@ -0,0 +1,30 @@ | |||
| distributable: | |||
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package directory path uses incorrect casing. According to pkgx conventions, GitHub project paths should use lowercase for the directory structure even when the actual GitHub organization name uses mixed case.
The directory should be:
projects/github.com/promptexecution/pm2-mcp/
Not:
projects/github.com/PromptExecution/pm2-mcp/
This matches the pattern used by the sister package just-mcp which is correctly located at projects/github.com/promptexecution/just-mcp/ while still referencing github: PromptExecution/just-mcp/tags in the versions field and using PromptExecution in URLs.
Add MCP server support to PM2 for process management through MCP-compatible clients.
Features:
- New pm2-mcp binary that exposes PM2 process management via MCP
- 12 MCP tools for process lifecycle, logging, and monitoring:
- 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_tail_logs
- pm2_dump, pm2_kill_daemon
- 2 MCP resources for real-time process information:
- pm2://processes (list)
- pm2://process/{id} (detail)
- Automatic sandbox environment detection and adaptation
- Support for stdio and HTTP (Streamable) transports
- Client notifications for sandbox status and recommendations
- Compatible with Claude Code, Codex, and other MCP clients
Implementation:
- New lib/mcp/server.js with full MCP server implementation
- Uses @modelcontextprotocol/sdk for MCP protocol
- Sandbox detection checks home directory writability and environment
- Auto-selects writable PM2_HOME in sandboxed environments
- No-daemon mode by default for MCP client compatibility
- Comprehensive environment variable configuration
Documentation:
- README with MCP server quickstart and setup commands
- Environment variables table (PM2_MCP_*, PM2_HOME, etc.)
- Sandbox detection explanation
- Tool and resource documentation
- Justfile recipes for easy registration with MCP clients
Related:
- Enables pkgx packaging: pkgxdev/pantry#11219
- Development fork: https://github.com/PromptExecution/pm2-mcp
- MCP Specification: https://modelcontextprotocol.io/
Co-authored-by: Claude <[email protected]>
🔗 Upstream IntegrationI've created a PR to integrate the MCP server changes into the upstream PM2 repository: Upstream PR: Unitech/pm2#6066 Current Status
Why PromptExecution/pm2-mcp for now?The package currently points to the fork so it can be tested immediately. Once the upstream PR is merged, we can update the package to use the official TestingUsers can install and test the MCP server right now: pkgx install github.com/PromptExecution/pm2-mcp
pkgx pm2-mcp --helpCross-References
|
Package: github.com/PromptExecution/pm2-mcp
PM2 with Model Context Protocol (MCP) server support for process management.
What is pm2-mcp?
PM2 is a production process manager for Node.js applications. This fork adds MCP server capabilities, allowing process management through MCP-compatible clients like Claude Code and Codex.
Key Features
pm2-mcpbinary that exposes process management via MCPPackage Details
npm install --global)v)Binaries Provided
pm2- Main PM2 CLIpm2-dev- Development modepm2-docker- Docker runtimepm2-runtime- Production runtimepm2-mcp- MCP serverTesting
Links
Related
This package follows the same pattern as the recently merged
just-mcppackage (github.com/promptexecution/just-mcp), which is also an MCP server implementation.Checklist
distributable,versions,build,test){{prefix}}