Host Process & Sub-Agent Governor
Provides host process supervision, multi-process management, and sub-agent concurrency control for Google Antigravity AI agent environments, including compatibility via a hooks.json PreToolUse hook.
Provides host process supervision, multi-process management, and sub-agent concurrency control for OpenAI Codex agent environments over MCP stdio.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Host Process & Sub-Agent Governor start npm run build in the background and show the redacted logs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Host Process & Sub-Agent Governor (host-governor-plugin)
A lightweight Model Context Protocol (MCP) server providing host process supervision, multi-process management, and sub-agent concurrency control for AI agent environments including Google Antigravity and OpenAI Codex.
Key Capabilities
Sub-Agent Quota Enforcement: Strictly caps concurrent sub-agents to a configurable threshold (default: 3 per AI model) across Harness windows via atomic lockfiles and priority queueing.
Detached Background Execution: Spawns and manages asynchronous background software processes without blocking agent tool loops.
Process-Tree Termination: Ensures clean lifecycle management (
taskkill /ton Windows, POSIX process groups on Unix) with graceful shutdown windows before force killing.Bounded Ring Buffering: Retains head and tail logs while streaming high-throughput processes without unbounded memory consumption.
Automated Secret Redaction: Masks Bearer tokens, API credentials, and sensitive environment keys from stdout/stderr captures.
Cross-Harness Interoperability: Compatible with Antigravity (
hooks.jsonPreToolUse hook) and standard MCP stdio clients.
Related MCP server: MCP Terminal
Quickstart
Prerequisites
Node.js (v18 or later)
npm
Installation & Build
# Install dependencies
npm install
# Compile TypeScript
npm run build
# Run Vitest test suite
npm testRunning the MCP Server
node dist/index.jsAll JSON-RPC messages are communicated strictly over stdio. Diagnostics and internal logs are routed to stderr.
MCP Tools Reference
Tool | Purpose |
| Launch a host process in the background |
| Query state and metadata of running or completed processes |
| Retrieve bounded, secret-redacted process output |
| Send input to a running interactive process via stdin |
| Terminate a process and its child process tree |
| Request a sub-agent concurrency lease |
| Release an active lease and unblock queue |
| View global concurrency quotas and active processes |
| Inspect host platform, memory usage, and saturation status |
Documentation
Detailed technical documentation is available in the docs/ directory:
License
MIT License. See LICENSE for details.
Available Tools
9 toolsgovernor_acquire_slotB
Acquire a sub-agent concurrency slot. Strictly enforces a limit of no more than 3 active sub-agents per AI model (cross-instance safe).
Inputs: modelId (required), subAgentName (required), priority, timeoutMs, +2 more.
governor_diagnoseA
Run deep diagnostics on the host execution environment, active sub-agent locks, and resource utilization.
Inputs: no named parameters.
governor_release_slotA
Release a previously acquired sub-agent slot, unblocking pending queued sub-agents for that model.
Inputs: leaseId (required).
governor_statusA
Inspect the current governor state: active sub-agents per model, queue depths, and running host background processes.
Inputs: modelId.
host_exec_inputB
Send stdin text to an active interactive background process.
Inputs: input (required), processId (required).
host_exec_logsB
Read captured stdout, stderr, and system logs from a background host process (with secret redaction).
Inputs: processId (required), tail, sinceTimestamp.
host_exec_startB
Spawn a software process running locally on the host machine in the background.
Inputs: command (required), cwd, tag, args, +5 more.
host_exec_statusA
Get status, exit code, state history, and runtime info of a background process, or list all running processes.
Inputs: processId.
host_exec_stopA
Stop or kill a running background host process and its entire child process tree.
Inputs: processId (required), force.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
The tools are split into two clear domains, governor and host process management, with mostly distinct actions. The only mild overlap is between governor_status and governor_diagnose, but the descriptions distinguish routine state inspection from deeper diagnostics.
All tool names use lowercase snake_case with consistent governor_ and host_exec_ prefixes. Verb choices are predictable: status, start, logs, input, stop, acquire, release, diagnose.
Nine tools is well-scoped for managing host background processes and sub-agent concurrency. Each tool has a clear lifecycle role and no obvious redundant operations.
The host process lifecycle is well covered: start, inspect, read logs, send input, and stop. Governor concurrency is covered through status, acquire, release, and diagnose, though there is no explicit queue-management or stale-lock cleanup operation.
Maintenance
Related MCP Connectors
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Execution control plane for agents: capabilities, durable jobs, budgets, receipts, and BYOK.
Hosted runtime for persistent agent teams, durable workflows, memory, schedules, and goals.
Secure Linux sandboxes for AI agents, as MCP tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to launch and manage system processes with strict security controls through executable allowlists, resource monitoring, and output capture capabilities.85 npm1MIT
- FlicenseBqualityDmaintenanceEnables AI agents to launch, monitor, and manage long-running terminal processes with real-time log capture and search functionality. It features automatic log rotation and graceful process termination to ensure system stability.55-
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to start, stop, and monitor long-running command-line processes in the background.37 npm11MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to efficiently manage and monitor background processes, with features like process startup, termination, log retrieval, and resource management.14 npm-