Labsco
patrickjm logo

Process Manager MCP

โ˜… 2

from patrickjm

Manage long-running bash processes and persist their logs.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

PM-MCP (Process Manager MCP)

A Model Context Protocol (MCP) server that allows Claude and other LLMs to manage long-running bash processes. Perfect for managing development servers, build processes, and other background tasks during development sessions.

Features

  • Start Processes: Launch long-running bash commands with names and descriptions
  • Process Management: Terminate individual processes or all processes at once
  • Log Management: Capture, retrieve, and search through stdout/stderr logs
  • Process Interaction: Send input to running processes
  • Failure Detection: Immediate error reporting for processes that fail to start
  • CLI Tool: Standalone command-line interface for process management
  • Persistent Logging: All process logs are saved to disk for later retrieval

Log Files

Process logs are stored in ./pm-mcp-logs/ directory with the format <process-id>.log. Each log entry includes:

  • Timestamp
  • Stream type (stdout/stderr)
  • Log content

Development

# Build the project
npm run build

# Watch mode for development
npm run dev

# Run the MCP server
npm start

# Use the CLI
npx pm-mcp cli --help

Architecture

  • ProcessManager: Core class handling process lifecycle, logging, and management
  • MCP Server: Exposes process management functionality via MCP protocol
  • CLI Tool: Standalone interface for direct process management
  • Logging: Persistent file-based logging with timestamp and stream type tracking