CommandBridge MCP
CommandBridge MCP lets you inspect a Linux/Windows host, run policy-controlled commands, and review audit events.
Get host system info (
command_bridge_get_system_info): OS, platform, release, architecture, CPU count, memory, uptime, execution mode, allowed shells/commands/roots, and max parallel commands.Run a command (
command_bridge_run_command): execute one command via bash/sh/powershell/cmd with optional working directory, shell, and timeout; returns stdout, stderr, exit code, signal, duration, and timeout/truncation status. Allowlist mode blocks unconfigured commands and shell control syntax; unrestricted mode may change host state.List audit events (
command_bridge_list_audit_events): retrieve recent redacted command attempts, blocks, completions, or failures (default 50, max 100) with phase, execution mode, source, exit code, duration, and error code.
Provides tools for inspecting and running permitted diagnostic commands on Linux hosts, including reading OS details, CPU count, memory, uptime, and the effective execution policy, executing allowlisted shell commands, and reviewing redacted command audit events.
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., "@CommandBridge MCPshow system information"
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.
CommandBridge MCP
Run commands and background jobs on Linux and Windows from Codex or another MCP client.
繁體中文 · Install · Connect Codex · Uninstall · Guides
Each host runs its own MCP endpoint. Connect through local stdio or Streamable HTTP to inspect the host, run permitted commands, and review operation records.
Features
Three command modes:
allowlist,guarded, andunrestricted.Background jobs with status, retained output, and cancellation; accepted jobs continue after client disconnect.
Audit records and read-only diagnostics for troubleshooting.
Optional SHA-256 verified file uploads/downloads in a private directory, up to 5 MiB per file, without overwriting.
One-command service installation, startup at boot, and managed updates.
flowchart LR
Client["Codex / MCP client"] --> Server["CommandBridge: policy + Audit"]
Server --> Host["Linux / Windows"]Related MCP server: AgentsID Guard
One-command installation
Windows: x64 Windows 10/11 or Server, with administrator PowerShell. Linux: x64/ARM64 glibc, systemd as PID 1, and sudo. Installation needs access to GitHub, nodejs.org, and npm; Git and Node.js need not be preinstalled. See the platform guides for prerequisites and SELinux requirements.
Windows
Run in administrator Windows PowerShell:
$script = Join-Path $env:TEMP ("command-bridge-" + [guid]::NewGuid() + ".ps1"); try { Invoke-WebRequest -UseBasicParsing -ErrorAction Stop "https://raw.githubusercontent.com/HsinPu/command-bridge-mcp-server/main/scripts/bootstrap.ps1" -OutFile $script; & powershell.exe -NoProfile -ExecutionPolicy Bypass -File $script -ExecutionMode guarded -PrintCodexSetup; if ($LASTEXITCODE -ne 0) { throw "CommandBridge failed (exit $LASTEXITCODE)." } } finally { Remove-Item -LiteralPath $script -Force -ErrorAction SilentlyContinue }Linux
Run from your non-root login account:
(script="$(mktemp)" && trap 'rm -f -- "$script"' EXIT && curl -fsSL https://raw.githubusercontent.com/HsinPu/command-bridge-mcp-server/main/scripts/bootstrap.sh -o "$script" && sudo bash "$script" --run-as-installer --guarded --print-codex-setup)The commands select guarded, start the service, enable startup at boot, and print Codex connection settings after MCP/Audit verification. Linux runs as your login account with its existing sudo permissions; Windows uses LocalService.
Application paths: Linux /usr/local/lib/command-bridge; Windows %ProgramFiles%\CommandBridgeMCP.
Installation uses a single source SHA from the CI-approved install channel, which may lag the version in this README. Reinstall preserves the Token and other settings but selects the mode from the supplied options. Use update to preserve the current mode.
Connect Codex
Copy the installer-generated setup block into a trusted Codex task on the client computer.
Apply its connection name, URL, and token environment variable. Each host suggests
cb_<hostname>; choose an unused name if it conflicts with an existing connection.Restart Codex if needed, then verify the connection and ask it to run
hostname.
Fresh installs detect a LAN/VPN IPv4, falling back to local-only 127.0.0.1. Existing listener settings are preserved. HTTP is for trusted networks; TLS and firewall rules are not configured automatically. Keep the printed Token private.
To print the setup again on Linux:
sudo /usr/local/bin/command-bridge setup --show-tokenWindows: run & "$env:ProgramFiles\CommandBridgeMCP\command-bridge.cmd" setup --show-token in administrator PowerShell. Without --show-token, setup hides the Token.
Usage
Capability | MCP tools |
Host information and commands |
|
Background jobs |
|
Audit and diagnostics |
|
Optional file transfer |
|
Managed updates |
|
Ask your connected client: “Show the host information, run hostname, and list the last 20 operation records.”
Use background jobs for long or verbose builds: they default to 30 minutes with a one-hour maximum. Saved output is truncated at its limit while the job continues; synchronous commands terminate at their output limit. See background jobs for retry IDs and cancellation limits.
Local commands
Linux host terminal:
command-bridge --version
command-bridge info --json
command-bridge update --check
sudo /usr/local/bin/command-bridge updateWindows uses & "$env:ProgramFiles\CommandBridgeMCP\command-bridge.cmd" with the same arguments; applying an update requires administrator PowerShell. Updates preserve settings and validate activation with rollback on failure. Fixed-purpose MCP updates are enabled by default on managed services. See local administration and MCP updates.
Permissions and Audit
Mode | Behavior |
| Fixed programs with exact approved argument combinations; the unconfigured application default. |
| General commands with checks for recognizable deletion and system modifications; selected by the installers above. |
| Free-form shell execution under the service account's existing permissions; explicit opt-in. |
All modes check recognizable direct changes to CommandBridge itself. These checks prevent common mistakes; scripts, arbitrary programs, and full root sudo can bypass them. They are not a security sandbox. File transfer is independently disabled by default; enabling unrestricted does not enable transfers.
Commands require successful initial Audit; terminal Audit failure withholds output. Audit excludes stdout/stderr and masks common secret patterns, but is not tamper-proof. Linux uses the systemd journal or installer-account file Audit; Windows uses the CommandBridgeMCP Application Event Log source. Read records through the Audit tool; see diagnostics if Audit is unavailable.
One-command uninstall
Windows
Run in administrator Windows PowerShell:
$script = Join-Path $env:TEMP ("command-bridge-" + [guid]::NewGuid() + ".ps1"); try { Invoke-WebRequest -UseBasicParsing -ErrorAction Stop "https://raw.githubusercontent.com/HsinPu/command-bridge-mcp-server/main/scripts/bootstrap.ps1" -OutFile $script; & powershell.exe -NoProfile -ExecutionPolicy Bypass -File $script -Uninstall -Yes; if ($LASTEXITCODE -ne 0) { throw "CommandBridge failed (exit $LASTEXITCODE)." } } finally { Remove-Item -LiteralPath $script -Force -ErrorAction SilentlyContinue }Linux
(script="$(mktemp)" && trap 'rm -f -- "$script"' EXIT && curl -fsSL https://raw.githubusercontent.com/HsinPu/command-bridge-mcp-server/main/scripts/bootstrap.sh -o "$script" && sudo bash "$script" --uninstall --yes)Uninstall removes the service and managed program files, including verified old Linux /opt deployments. It preserves configuration, Token, logs, work data, and job/update/recovery records. Full cleanup (purge) is documented in the platform guides; your installer login account is never deleted.
Guides
Topic | Documentation |
Installation, paths, configuration, recovery | |
Jobs and administration | |
Command policies | |
Transfers and operations | |
Changes and support |
Development
Built with TypeScript, Node.js ≥20, the MCP SDK, Express, and Zod. Read AGENTS.md; use npm ci and npm test to build and check the source. Local stdio development uses .env.example and npm run dev. Never commit tokens or local .env files.
License: this repository currently has no LICENSE file or package license declaration.
Available Tools
3 toolscommand_bridge_get_system_infoGet CommandBridge Host InformationARead-onlyIdempotent
Return operating-system information and the effective CommandBridge command policy.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| release | Yes | |
| cpuCount | Yes | |
| hostname | Yes | |
| platform | Yes | |
| allowedRoots | Yes | |
| architecture | Yes | |
| freeMemoryMb | Yes | |
| allowedShells | Yes | |
| executionMode | Yes | |
| totalMemoryMb | Yes | |
| uptimeSeconds | Yes | |
| allowedCommands | Yes | |
| maxParallelCommands | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, covering the safety profile. The description adds value by specifying the two categories of returned data (OS info and command policy), which is more specific than the title alone. No contradictions with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is front-loaded with the verb 'Return' and contains no redundant jargon or filler. Every word earns its place, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (zero parameters), the presence of an output schema to document return values, and strong annotations covering safety, the description is fully complete. It clearly states what the tool produces and is sufficient for an agent to select and invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the schema fully covers parameter semantics. According to the rules, a baseline of 4 is appropriate when there are no parameters, and the description correctly does not attempt to explain nonexistent parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns operating-system information and the effective CommandBridge command policy, using a specific verb ('Return') and naming the exact resources. This distinguishes it from sibling tools like command_bridge_run_command and command_bridge_list_audit_events.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when one needs OS info or the current command policy, but it does not explicitly mention when to use it over siblings or provide exclusions. No alternatives are named, so guidance is only implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
command_bridge_list_audit_eventsList CommandBridge Audit EventsARead-onlyIdempotent
Return recent CommandBridge command audit events. Commands are redacted; command output, bearer tokens, and environment values are never included.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of newest events to return. Defaults to 50. |
Output Schema
| Name | Required | Description |
|---|---|---|
| events | Yes | |
| hasMore | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only and safe behavior, so the description adds value by disclosing the redaction policy: commands are redacted, and output, bearer tokens, and environment values are never included. This is critical behavioral context beyond what annotations provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with the main purpose front-loaded, followed by a necessary caveat about redaction. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with one optional parameter, an output schema, and safety annotations, the description is complete. It explains what is returned and what is intentionally excluded, giving the agent enough context to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single parameter 'limit' is fully described in the schema (with default and range). The description adds no extra semantic detail beyond the schema, so the baseline score of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Return') and resource ('recent CommandBridge command audit events'), clearly distinguishing it from sibling tools like get_system_info and run_command. The scope is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The purpose implies when to use it (for auditing past commands), but there is no explicit guidance on when to use this over alternatives or any exclusions. The redaction note subtly hints at expectations, but no direct usage guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
command_bridge_run_commandRun Host CommandADestructive
Run one command on this Linux or Windows host. Allowlist mode blocks shell control syntax and unconfigured commands. This tool may change host state when unrestricted mode is enabled.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory under an allowed root. | |
| shell | No | Shell to use. Defaults to the first allowed shell. | |
| command | Yes | Command text to execute. | |
| timeoutMs | No | Requested timeout in milliseconds. |
Output Schema
| Name | Required | Description |
|---|---|---|
| ok | Yes | |
| cwd | Yes | |
| shell | Yes | |
| signal | Yes | |
| stderr | Yes | |
| stdout | Yes | |
| exitCode | Yes | |
| timedOut | Yes | |
| truncated | Yes | |
| durationMs | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare destructiveHint=true and readOnlyHint=false. The description adds valuable behavioral context by explaining the allowlist mode behavior and explicitly warning that 'This tool may change host state when unrestricted mode is enabled.' This goes beyond the annotations to explain the mode-dependent risk.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, consisting of three short sentences that each provide essential information: the action/platform, the allowlist restriction, and the potential for state changes. No filler words or redundant details are present.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists and annotations are rich, the description covers the core purpose, platform, safety modes, and state-change risk. It does not fully explain the cwd restriction or timeout behavior, but those are documented in the schema. Overall, it is adequately complete for a potentially destructive command execution tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents each parameter. The description adds no additional parameter-specific guidance, but the baseline of 3 is appropriate when the schema carries the meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's specific action: 'Run one command on this Linux or Windows host.' This distinguishes it from sibling tools (get_system_info, list_audit_events) which retrieve information, and the platform scope adds clarity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool (executing a command on the host) and hints at constraints via 'Allowlist mode blocks shell control syntax and unconfigured commands.' Direct alternatives are not named, but the sibling tools are obviously read-only and different, giving implicit guidance. No exclusions are stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.3.0- First observed
command_bridge_get_system_info - First observed
command_bridge_list_audit_events - First observed
command_bridge_run_command
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: system info, command execution, and audit events. No overlap in functionality.
All tools share the command_bridge_ prefix followed by a consistent verb_noun pattern (get_system_info, run_command, list_audit_events).
Three tools is a reasonable minimal set for a command execution server focused on running commands, inspecting policy, and auditing. Slightly minimal but well-scoped.
The core lifecycle is covered: inspect policy (system info), execute command, and review audit trail. Missing direct policy modification or async command control, but these are typically outside the scope of a simple command bridge.
Maintenance
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
MCP Server for an Agent Task Marketplace
Related MCP Servers
- AlicenseAqualityFmaintenanceAn MCP server that enables secure execution of shell commands across Windows, macOS, and Linux with built-in whitelisting and approval mechanisms for enhanced security.932 npm22MIT

AgentsID Guardofficial
AlicenseAqualityDmaintenanceMCP server that protects shell, file, database, git, and HTTP operations with per-agent permission rules502 npmMIT- AlicenseBqualityCmaintenanceMCP server for administering Linux/Unix hosts via SSH and Windows hosts via WinRM/PowerShell Remoting, supporting persistent inventory, sessions, jobs, and command groups.29MIT
- AlicenseNot gradedqualityDmaintenanceA production-ready MCP server for secure, session-based command execution, file manipulation, and system inspection via local terminal sessions.6 npmISC