CommandBridge MCP
CommandBridge MCP lets you inspect hosts, run policy-controlled diagnostic commands, and review audit records from MCP clients.
Get system info – read hostname, OS platform/release, architecture, uptime, CPU/memory, and effective execution policy.
Run commands – execute allowed commands (e.g.,
hostname,df,Get-Process) on Linux/Windows with configurable shell, working directory, timeout, and output limits.Enforce security policy – allowlist mode blocks unapproved commands and shell syntax; unrestricted mode is available but explicitly destructive.
Review audits – list recent command lifecycle events (attempted, blocked, completed, failed) with redacted commands, exit codes, durations, and timeout/truncation flags.
Deploy and connect – one-command installers create a persistent HTTP service with bearer-token auth for Codex/MCP, plus stdio support.
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
Connect Codex and other MCP clients to Linux and Windows hosts with policy-controlled command execution.
繁體中文 · Install · Connect Codex · Uninstall · Changelog
CommandBridge is a Model Context Protocol (MCP) server deployed on the host you want to inspect. It gives AI clients a consistent interface for reading host information, running permitted diagnostic commands, and reviewing operation records without requiring SSH as the connection method.
Each host runs its own MCP endpoint. The server supports local stdio and remote Streamable HTTP; the one-command installers below create an HTTP background service that starts at boot.
Installation uses a fixed bootstrap URL and the latest main commit that passed all CI checks, including service installation tests. Tags are optional historical references. Until the first successful install-channel publication, bootstrap fails with a clear error instead of installing an unverified commit. Read the1.0 migration guide before upgrading custom allowlists.
What can you do with it?
Use case | CommandBridge capability |
Inspect a host | Read operating system details, CPU count, memory, uptime, and effective execution policy. |
Run diagnostics | Execute allowlisted commands such as |
Work across platforms | Use the same MCP tools with each platform's command shell. |
Review operations | Retrieve redacted command attempts, policy rejections, execution outcomes, and durations. |
Deploy a persistent service | Download a runtime, build and test the source, install the service, and enable startup at boot. |
Related MCP server: AgentsID Guard
Features
One-command deployment: downloads and builds GitHub source without a preinstalled Git or Node.js.
Automatic connection setup: fresh installs can detect a LAN/Tailscale IPv4 address, configure the listener and allowed Host together, and print a setup block for Codex.
Execution policy: command allowlisting by default, with limits on shells, working directories, timeouts, output, inherited environment variables, and concurrent commands.
Audit trail: records command lifecycle events; commands do not start if the initial audit write fails.
Low-privilege services: a dedicated
command-bridgeaccount on Linux andLocalServiceon Windows.Configuration preservation: reinstalls retain configuration and tokens, with recovery mechanisms for failures during upgrade activation.
How it works
flowchart LR
Client["Codex / MCP client"] --> Transport["stdio / Streamable HTTP"]
Transport --> Policy["Command policy checks"]
Policy --> Executor["Linux / Windows command executor"]
Policy --> Audit["Audit log"]
Executor --> AuditHTTP connections use bearer-token authentication. The service executes commands under a low-privilege account, returns results to the client, and writes operation events to the host's logging system.
Requirements
Platform | Environment |
Windows | Windows 10/11 or Windows Server, x64, with an elevated Windows PowerShell session. |
Linux | x64/ARM64, glibc, systemd as PID 1, and |
Network | Access to GitHub, nodejs.org, and the npm registry during installation; remote clients must be able to reach the host's address and service port. |
Alpine/musl is not supported. The systemd installer cannot run directly on Synology DSM. See the Linux guide and Windows guide for complete prerequisites.
One-command installation
Downloads GitHub source and Node.js, builds and tests the application, starts the service, and enables startup at boot. No preinstalled Git or Node.js is required. Without an explicit URL, a fresh install selects a LAN/Tailscale IPv4 address and prints Codex settings with the IP, port, and token. It falls back to a local-only address if none is found. Existing configuration is preserved.
Windows
Open Windows PowerShell as administrator (x64) and paste:
$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 -PrintCodexSetup; if ($LASTEXITCODE -ne 0) { throw "CommandBridge failed (exit $LASTEXITCODE)." } } finally { Remove-Item -LiteralPath $script -Force -ErrorAction SilentlyContinue }Linux
On a glibc Linux host with systemd (x64/ARM64), paste:
script="$(mktemp)" && curl -fsSL https://raw.githubusercontent.com/HsinPu/command-bridge-mcp-server/main/scripts/bootstrap.sh -o "$script" && sudo bash "$script" --print-codex-setup && rm -f "$script"Installation starts CommandBridgeMCP on Windows or command-bridge-mcp-server on Linux and enables startup after a reboot. The installer checks /health to verify that the service responds.
Connect Codex
After a successful installation, the terminal prints a marked block containing the actual endpoint URL, bearer token, and MCP settings:
========== BEGIN COPY FOR CODEX ==========
MCP URL: http://192.168.1.20:8800/mcp
Bearer token (secret): <generated or preserved token>
...connection settings...
========== END COPY FOR CODEX ==========The IP above is an example. Paste the complete installer-generated block into a trusted Codex task on the client computer and ask it to configure the connection. Do not post the token in public issues or commit it to Git.
A domain name is not required. Without an explicit URL, a fresh installation prefers a private IPv4 address on a default-route interface, then looks for other private IPv4 addresses. If none is found, it falls back to 127.0.0.1, which works only on the same host. Existing configuration files are not automatically changed to a newly detected IP.
Generated HTTP URLs are for a trusted LAN or VPN only. The installer does not provide TLS or open firewall ports. You can specify your own URL for an HTTPS reverse proxy or tunnel. If DHCP changes the address, update the service and client settings. See the platform guides for details.
MCP tools
Tool | Purpose |
| Read host information and effective shell, command, working-directory, and concurrency policies. |
| Execute one command and return stdout, stderr, exit code, duration, and timeout/truncation status. |
| Read recent audit events: 50 by default, up to 100 per request. |
Example requests for a connected client:
Show this host's system information and currently allowed commands.
Run hostname and tell me the result.
List the last 20 operation records and identify rejected or failed commands.
Command restrictions and security boundaries
The default allowlist mode parses literal arguments, matches an exact approved argv combination, and launches a fixed executable without a shell. Built-in PowerShell cmdlets use a fixed wrapper. Linux defaults include uname, hostname, df, and ps; Windows defaults include Get-Process, Get-Service, and systeminfo. Built-ins allow no arguments by default; Get-CimInstance uses Win32_OperatingSystem. Custom commands require an administrator-managed policy file.
Deletion commands such as rm, del, and Remove-Item are absent from the default policies and are rejected. Enabling a custom native executable policy can permit destructive operations, and unrestricted explicitly restores free-form shell execution. Neither mode is a complete filesystem sandbox.
Administrators must trust the executable and every argument combination they approve. The service must not be able to modify its policy or approved binaries. Working-directory checks resolve symlinks, but arguments can still refer to other accessible paths. Keep the low-privilege account and network restrictions, and do not expose the service directly to the internet. See thesecurity policy.
Service installation defaults:
Setting | Default |
Execution mode |
|
Shell | Linux: |
HTTP port |
|
Command timeout | 15 seconds by default, 60-second maximum |
Output limit | 50,000 characters |
Concurrent commands | 2 |
Audit logging
Each command request entering the execution flow first records attempted, followed by blocked, completed, or failed. Events include the timestamp, audit ID, redacted command, shell, working directory, source, exit code, and duration.
Platform | Where to look |
Windows | Event Viewer → Windows Logs → Application, source |
Linux | systemd journal for |
MCP client | Call |
Audit events do not store stdout/stderr, and common secret patterns in commands are redacted. Failure to write the initial event prevents execution; failure to write the terminal event withholds captured output. Retention is controlled by the host, and the logs are not tamper-proof.
Local stdio defaults to private JSONL files in the user's data directory, rotating at 10 MiB per file with five files retained. Service installations explicitly select journal or Event Log. The authenticated /ready endpoint checks service dependencies; installation also verifies a real MCP command and matching audit lifecycle before discarding upgrade backups.
One-command uninstall
Stops and removes the service and application, preserving configuration, token, and work data.
Windows
Open Windows PowerShell as administrator and paste:
$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)" && curl -fsSL https://raw.githubusercontent.com/HsinPu/command-bridge-mcp-server/main/scripts/bootstrap.sh -o "$script" && sudo bash "$script" --uninstall --yes && rm -f "$script"Detailed settings and full data removal: Windows guide · Linux guide.
Documentation and feedback
Linux deployment guide: prerequisites, configuration, systemd operations, upgrades, and full removal.
Windows deployment guide: service configuration, Event Log, recovery, and full removal.
Environment template: configurable environment variables; the application's local default is stdio, which differs from service installation settings.
Changelog: version changes and release status.
1.0 migration and policies: exact arguments, custom policies, audit backends, and network refresh.
Issues: general problems and feature requests. Include the version, operating system, and error details with secrets removed.
Security policy: instructions for reporting security issues privately.
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.
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
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.973 npm21MIT

AgentsID Guardofficial
AlicenseAqualityDmaintenanceMCP server that protects shell, file, database, git, and HTTP operations with per-agent permission rules505 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 gradedqualityCmaintenanceA production-ready MCP server for secure, session-based command execution, file manipulation, and system inspection via local terminal sessions.11 npmISC