CommandBridge MCP
Click on "Install 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 can execute operating-system commands. Start withallowlist mode, use a dedicated low-privilege service account, and keep remote HTTP access on a private authenticated network.
Project status
CommandBridge MCP is pre-1.0 software for controlled environments. The pinned raw GitHub installation commands below target v0.3.0; use them only after that tag is published. A checked-out repository can be installed directly.
Related MCP server: AgentsID Guard
Why CommandBridge?
CommandBridge is a cross-platform Model Context Protocol server for inspecting a host and running policy-bounded commands when SSH is unavailable or intentionally excluded from the workflow.
Need | CommandBridge approach |
No SSH access | Use local stdio or private Streamable HTTP. |
Safer first deployment | Default to simple, configured diagnostic commands in allowlist mode. |
Linux and Windows hosts | Use the same MCP tool surface with platform-appropriate shells. |
Traceable operations | Record a redacted audit lifecycle for every command attempt. |
Controlled remote access | Require a bearer token for HTTP and place the listener behind private HTTPS. |
Highlights
Cross-platform — Linux supports bash, sh, and optional pwsh; Windows supports PowerShell and cmd.exe.
Policy-first execution — limits shells, command names, working directories, timeouts, output size, inherited environment variables, and concurrency.
Audit trail — records attempted plus one final blocked, completed, or failed event without command output or unredacted secrets.
Deployment assets — provides a Linux systemd installer and an x64 Windows service installer using WinSW and LocalService.
Quick start
Linux systemd
From a checked-out repository on a supported glibc-based Linux host with systemd:
git clone https://github.com/HsinPu/command-bridge-mcp-server.git
cd command-bridge-mcp-server
sudo bash scripts/linux-systemd/install.sh \
--print-codex-setup \
--codex-url "https://command-bridge.example.com/mcp"The installer downloads a pinned Node.js runtime, builds and tests the source, creates the low-privilege command-bridge account, installs under /opt, enables the service, verifies /health, and prints a copy-ready Codex setup block.
Verify the service:
sudo systemctl status command-bridge-mcp-server --no-pager
curl -fsS http://127.0.0.1:8800/healthinstaller=$(mktemp)
curl -fsSL https://raw.githubusercontent.com/HsinPu/command-bridge-mcp-server/v0.3.0/scripts/linux-systemd/install.sh -o "$installer"
sudo bash "$installer" --print-codex-setup --codex-url "https://command-bridge.example.com/mcp"
rm -f "$installer"See the Linux systemd guide for prerequisites, rollback, upgrades, audit access, and safe uninstall procedures.
Synology DSM is not a systemd host. Use Container Manager or a DSM-specific package instead.
Windows service
From an elevated PowerShell session in a checked-out repository:
git clone https://github.com/HsinPu/command-bridge-mcp-server.git
Set-Location command-bridge-mcp-server
.\scripts\windows\install.ps1 -PrintCodexSetup -CodexUrl "https://command-bridge.example.com/mcp"The x64 installer verifies Node.js v24.18.0 and WinSW v2.12.0, runs the test suite, registers the CommandBridgeMCP Application Event Log source, and starts the service as NT AUTHORITY\LocalService.
See the Windows service guide for host requirements, Event Viewer queries, rollback, and uninstall commands.
Local development
git clone https://github.com/HsinPu/command-bridge-mcp-server.git
cd command-bridge-mcp-server
npm ci
cp .env.example .env
npm run build
npm startThe default transport is stdio. For Streamable HTTP, configure COMMAND_BRIDGE_TRANSPORT=http and a bearer token of at least 32 characters.
Connect Codex
For a remote Codex client, expose the loopback listener through a private HTTPS route such as Tailscale Serve, Cloudflare Tunnel, or an authenticated reverse proxy.
CommandBridge's built-in HTTP listener is not TLS-enabled. Never expose port8800 directly to the public internet.
The recommended path is to use --print-codex-setup during installation and paste the marked block into a trusted Codex task. It keeps the bearer token out of config.toml and uses an environment variable instead.
For manual setup, store the token as COMMAND_BRIDGE_BEARER_TOKEN on the Codex client and add:
[mcp_servers.command_bridge]
enabled = true
url = "https://command-bridge.example.com/mcp"
bearer_token_env_var = "COMMAND_BRIDGE_BEARER_TOKEN"
startup_timeout_sec = 20.0
tool_timeout_sec = 60.0Restart Codex, open /mcp, and confirm that command_bridge is connected.
How it works
flowchart LR
client["Codex or MCP client"]
transport{"Transport"}
stdio["Local stdio"]
http["Private Streamable HTTP"]
auth["Bearer token and Host validation"]
policy["Command policy and limits"]
executor["Command executor"]
audit["Redacted audit log"]
host["Linux or Windows host"]
client --> transport
transport --> stdio --> policy
transport --> http --> auth --> policy
policy --> executor --> host
executor --> auditEach deployed host runs one MCP endpoint. A future gateway mode will coordinate multiple outbound-connected host agents.
MCP tools
Tool | Purpose | Safety behavior |
command_bridge_get_system_info | Returns host information and the effective CommandBridge policy. | Read-only and idempotent. |
command_bridge_run_command | Runs one command using the selected shell and working directory. | Enforces the configured policy; can change host state in unrestricted mode. |
command_bridge_list_audit_events | Returns recent redacted audit events. | Read-only, idempotent, default limit 50, maximum 100. |
Example command request:
{
"command": "hostname",
"shell": "bash",
"cwd": "/var/lib/command-bridge-mcp-server/work",
"timeoutMs": 15000
}Command audit log
Every command_bridge_run_command call writes an attempted event before process start, followed by exactly one terminal blocked, completed, or failed event.
If the first audit write fails, CommandBridge does not start the command.
If a terminal audit write fails, CommandBridge withholds captured command output.
Events include an audit ID, time, phase, redacted command, shell, working directory, execution mode, source, exit code, duration, timeout/truncation state, and error code.
Events never include stdout, stderr, bearer tokens, environment values, or the unredacted command.
On Linux, events are written as compact JSON to the service journal. On Windows, they are written to the Application Event Log under CommandBridgeMCP. The host controls retention. This is operational evidence, not a signed, hash-chained, or tamper-evident compliance ledger.
Use the read-only tool to inspect recent records:
{ "limit": 50 }Uninstall
The Linux standard uninstall removes the service, application, Audit reader, and its restricted sudoers rule while preserving configuration, work data, and the low-privilege account for a later reinstall.
uninstaller=$(mktemp)
curl -fsSL https://raw.githubusercontent.com/HsinPu/command-bridge-mcp-server/v0.3.0/scripts/linux-systemd/uninstall.sh -o "$uninstaller"
sudo bash "$uninstaller" --yes
rm -f "$uninstaller"A full purge permanently deletes the bearer token, configuration, work data, and service identity.
uninstaller=$(mktemp)
curl -fsSL https://raw.githubusercontent.com/HsinPu/command-bridge-mcp-server/v0.3.0/scripts/linux-systemd/uninstall.sh -o "$uninstaller"
sudo bash "$uninstaller" --purge --yes
rm -f "$uninstaller"For Windows, run .\scripts\windows\uninstall.ps1 -Yes from an elevated PowerShell session. Add -Purge to delete %ProgramData%\CommandBridgeMCP; use -DryRun to preview actions.
Configuration and execution policy
Copy .env.example for manual development. The most important settings are:
Variable | Default | Purpose |
COMMAND_BRIDGE_TRANSPORT | stdio | Selects stdio or http. |
COMMAND_BRIDGE_BEARER_TOKEN | None | Required by HTTP mode; at least 32 characters. |
COMMAND_BRIDGE_EXECUTION_MODE | allowlist | Selects allowlist or unrestricted. |
COMMAND_BRIDGE_ALLOWED_SHELLS | OS defaults | Comma-separated permitted shells. |
COMMAND_BRIDGE_ALLOWED_COMMANDS | OS defaults | Commands permitted in allowlist mode. |
COMMAND_BRIDGE_ALLOWED_ROOTS | Startup directory | Allowed working-directory roots. |
COMMAND_BRIDGE_DEFAULT_TIMEOUT_MS | 15000 | Default command timeout. |
COMMAND_BRIDGE_MAX_OUTPUT_CHARS | 50000 | Combined stdout and stderr ceiling. |
COMMAND_BRIDGE_MAX_PARALLEL_COMMANDS | 2 | Per-process command concurrency. |
allowlist mode rejects pipes, redirects, chaining, command substitution, and newlines. Use unrestricted only after reviewing the service account's operating-system permissions.
Supported hosts
Environment | Support |
Manual development | Node.js 20 or later and npm |
Linux runtime | bash, sh, and optional PowerShell 7 through pwsh |
Linux installer | systemd, glibc, x86_64 or arm64, Linux 4.18+, at least 400 MB under /opt |
Windows runtime | Windows PowerShell and cmd.exe |
Windows installer | Windows 10/11 or Windows Server x64, elevated PowerShell, bundled Node.js and WinSW |
Alpine and musl Linux | Not supported by the systemd installer |
Security model
Application policy is only one layer of defense.
Keep allowlist mode unless unrestricted execution is explicitly required.
Run CommandBridge under a dedicated non-administrator account.
Use a unique bearer token per host and rotate it after suspected exposure.
Keep HTTP private or behind authenticated TLS.
Restrict allowed roots and inherited environment variables.
Never place passwords, API keys, or private keys in command arguments.
Do not add the Linux service account to sudo, docker, adm, or systemd-journal groups. The installer grants only one exact no-argument sudoers rule for its root-owned audit reader.
Read the complete security policy before deployment. Report vulnerabilities through a private GitHub Security Advisory, not a public issue.
Documentation
Topic | Documentation |
Linux installation, upgrades, audit access, and uninstall | |
Windows service, Event Log, and uninstall | |
Manual configuration reference | |
Security boundary and reporting |
Development
npm ci
npm testnpm test compiles TypeScript and runs command-policy, audit lifecycle/redaction, MCP tool, Linux asset, uninstall asset, and Windows installer asset tests.
On Windows PowerShell, use npm.cmd when execution policy blocks npm.ps1.
src/ Application source
docs/ Deployment guides
packaging/linux/ Fixed Linux audit reader
packaging/systemd/ Linux systemd unit
packaging/windows/ WinSW service definition
scripts/linux-systemd/ Linux installer and uninstaller
scripts/windows/ Windows installer, uninstaller, and Event Log helpersRoadmap
Background jobs with polling and cancellation
Central gateway with agent-initiated outbound connections
OAuth 2.1 for remote MCP clients
Signed host enrollment and per-host authorization scopes
Signed prebuilt Linux release artifacts for offline installation
Contributing
Issues and pull requests are welcome.
Open an issue before a significant behavior or security-boundary change.
Create a focused branch.
Run npm test.
Open a pull request with the motivation, behavior change, and verification evidence.
Project links
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. Dates show when Glama detected each change.
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
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
111Personal 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
- AlicenseAqualityDmaintenanceAn MCP server that enables secure execution of shell commands across Windows, macOS, and Linux with built-in whitelisting and approval mechanisms for enhanced security.911720MIT

AgentsID Guardofficial
AlicenseAqualityDmaintenanceMCP server that protects shell, file, database, git, and HTTP operations with per-agent permission rules5014MIT- 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.14ISC
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/HsinPu/command-bridge-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server