process-mcp

process-mcp

An MCP server that allows AI assistants to manage background processes, enabling start, stop, monitoring, and querying of long-running shell commands without blocking the conversation.

Category
Visit Server

README

process-mcp

A local MCP (Model Context Protocol) server for managing background processes.

process-mcp lets AI assistants and other MCP clients start, stop, monitor, and query long-running shell commands without blocking the conversation. Instead of waiting for a command to finish, clients can start it in the background and receive a notification when it exits.

Features

  • Start background processes with custom arguments, working directory, and environment variables
  • Stop processes gracefully with SIGTERM or forcefully with SIGKILL
  • Query real-time status and retrieve recent log output
  • List all managed processes and resolve their system PIDs
  • Receive process/exit notifications when a background process terminates
  • Short, friendly process IDs via nanoid (6 characters)
  • Strict input validation with zod
  • Runs over stdio — no HTTP or SSE ports required

Installation

Requires Bun.

bun install
bun run build

To run the server directly during development:

bun run dev

To run the compiled server:

bun run start

Configuration

Add process-mcp to your MCP client configuration. For opencode, edit ~/.config/opencode/opencode.json:

{
  "mcpServers": {
    "process-mcp": {
      "command": "bun",
      "args": [
        "run",
        "/path/to/process-mcp/dist/index.js"
      ]
    }
  }
}

Adjust the absolute path to match your local clone location.

Tools Reference

start

Start a background process.

Parameters:

Name Type Required Description
command string yes Executable or command to run
args string[] no Arguments passed to the command
cwd string no Working directory for the process
env record no Extra environment variables
notifyOnExit boolean no Send a process/exit notification when the process ends

Example response:

{
  "id": "a1b2c3",
  "pid": 12345,
  "status": "running"
}

stop

Stop a managed process.

Parameters:

Name Type Required Description
id string yes Process ID returned by start
force boolean no Use SIGKILL instead of SIGTERM (default: false)

Example response:

{
  "id": "a1b2c3",
  "pid": 12345,
  "status": "stopped"
}

get-status

Get the current status of a process.

Parameters:

Name Type Required Description
id string yes Process ID

Returns: "running" | "stopped" | "exited" | "crashed" | "not-exists"

get-log

Retrieve the stdout/stderr log of a process.

Parameters:

Name Type Required Description
id string yes Process ID
lastLines number no Number of recent log lines to return

Example response:

{
  "lines": [
    "Build started...",
    "Compiled 42 files",
    "Build finished"
  ]
}

list

List all managed processes.

Parameters: none

Example response:

{
  "processes": [
    { "id": "a1b2c3", "pid": 12345, "status": "running" },
    { "id": "d4e5f6", "pid": null, "status": "exited" }
  ]
}

get-pid

Get the system PID of a managed process.

Parameters:

Name Type Required Description
id string yes Process ID

Returns: PID number or null

Notification

When a process is started with notifyOnExit: true, the server sends a process/exit notification once the process terminates. The notification payload includes the process ID and final status.

This allows clients such as opencode to resume a conversation after a long-running task completes, without polling for status.

Development

Run the test suite:

bun test

Build the project:

bun run build

Run the server from source:

bun run dev

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured