Skip to main content
Glama
Bridge Commander
by PaPasha215

Bridge Commander

A self-hosted Model Context Protocol server that gives an AI assistant (Claude Desktop, Claude Code, ChatGPT connectors, any MCP client) hands on your machines:

  • Files: read (text, images, Word, Excel, PDF, URLs, line ranges, tail), write, append, exact-text edit_block, move, mkdir, info

  • Search: find files by name/glob, grep contents with regex and context; background searches with paging

  • History: recent tool calls and usage statistics from the audit log

  • Terminal sessions: long-running and interactive commands with incremental output and stdin

  • Processes: list and kill system processes

  • Remote nodes: one server fans out to other machines over SSH (or any command), each with its own rules

  • Two transports: stdio for local clients, Streamable HTTP with a token for remote clients

No dependencies beyond the Python standard library. Use a maintained Python 3.12 or newer; the source also has compatibility checks on 3.9. The client ships as one .pyz file.

Русская версия

Quick start

git clone https://github.com/PaPasha215/bridge-commander-core && cd bridge-commander-core
python3 scripts/build_pyz.py                 # -> dist/bridge-commander.pyz
python3 dist/bridge-commander.pyz init       # writes ~/.config/bridge-commander/config.json

Or install as a command: pipx install . (then use bridge-commander instead of python3 …pyz).

Claude Code

claude mcp add bridge-commander -- python3 /absolute/path/bridge-commander.pyz serve

Claude Desktop

Add to claude_desktop_config.json (see examples/claude_desktop_config.json):

{"mcpServers": {"bridge-commander": {"command": "python3", "args": ["/absolute/path/bridge-commander.pyz", "serve"]}}}

Over SSH (a server somewhere else, no open ports)

claude mcp add my-server -- ssh my-server python3 bridge-commander.pyz serve

Remote HTTP clients (ChatGPT, claude.ai connectors, anything with a URL)

python3 bridge-commander.pyz token --write ~/.config/bridge-commander/token
python3 bridge-commander.pyz serve --transport http          # http://127.0.0.1:8765/mcp

Then publish the loopback port through a tunnel you trust. See docs/REMOTE.md.

Hosted cloud (no server of your own)

The free beta uses Bridge Commander Cloud. On a new macOS/Linux profile:

curl -fL --output bridge-commander.pyz https://bridgecommander.dev/download/bridge-commander.pyz &&
python3 -I bridge-commander.pyz init --directory ~/BridgeFiles &&
python3 -I bridge-commander.pyz remote --cloud https://bridgecommander.dev

Verify the downloaded 1.3.1 artifact against SHA256SUMS. Keep the MIT LICENSE with redistributed copies. Setup stops if a download or initialization fails. Inspect an existing configuration before changing it; do not add --force to this sequence.

The machine connects out over HTTPS, you confirm a code in the browser, and the chat connects to the cloud's MCP URL with OAuth. The device still enforces its own config file. remote --logout forgets the device credentials; revoking the device in the dashboard cuts access at once.

Backup route: remote --fallback https://edge.<cloud address> (repeatable; saved with the credentials). When the main address stops answering (a VPN drops, a network blocks the IP), the client switches to the first backup whose /health answers, and every 5 minutes checks whether the main address is back. A backup must be on the cloud's own domain, so the device token never goes to another host.

Related MCP server: MCP Local File Reader

Configuration

~/.config/bridge-commander/config.json (or --config FILE, or $BRIDGE_COMMANDER_CONFIG). Every key is optional.

The table lists underlying defaults for a manually supplied partial configuration. init instead writes an explicit private configuration for ~/BridgeFiles with read-only enabled. --allow-writes also permits commands with your OS user's rights. Run one remote client per OS profile: --config selects file rules, while saved device credentials are shared by that profile.

key

default

meaning

allowedDirectories

["~"]

Paths the tools may touch. Symlinks are resolved first, so they cannot escape. [] = unrestricted. Also the default working directory (first entry).

readOnly

false

Refuse writes, edits, moves, new processes, input and kills.

blockedCommands

sudo, mkfs, shutdown, …

First word of every command segment is checked. A seat belt, not a sandbox.

defaultShell

$SHELL / powershell.exe

Shell for start_process (sh-like, cmd, powershell, pwsh).

fileReadLineLimit

1000

Max lines per read_file call.

maxFileSizeBytes

10485760

Max size to read, write or search in a single file.

maxProcessOutputBytes

1048576

Output kept per session (oldest bytes are dropped first).

maxSessions

20

Terminal sessions kept at once.

allowConfigChanges

false

Allow the model to call set_config_value (in memory only).

auditLog

~/.local/state/bridge-commander/audit.jsonl

One JSON line per call: time, tool, node, ok, duration, arguments (strings cut to 200 chars; written text and process input only as a length), first line of the result (not for reads). Readable with get_recent_tool_calls. null disables it.

http

{"host": "127.0.0.1", "port": 8765, "tokenFile": null, "allowedOrigins": []}

HTTP transport. The token comes from $BRIDGE_COMMANDER_TOKEN or tokenFile.

nodes

{}

Remote machines, see below.

bridge-commander check validates the file and pings every node.

Remote nodes

A hub runs the MCP server. Each node runs bridge-commander worker, reached by any command that connects stdin/stdout — normally ssh. Every tool gains a node argument (local or a node name).

{
  "nodes": {
    "build-box": {
      "command": ["ssh", "-T", "-o", "BatchMode=yes", "build-box", "python3 ~/bin/bridge-commander.pyz worker"],
      "description": "Linux build server"
    }
  }
}
  • The worker applies its own config on its machine (allowed directories, read-only, blocked commands). The hub cannot widen them.

  • The SSH connection is kept open, so terminal sessions on a node survive between calls. If the link drops it is re-opened on the next call; sessions that lived in the old worker are gone.

  • Copy the worker with scp dist/bridge-commander.pyz build-box:bin/. Nothing else has to be installed.

Tools

tool

what it does

get_config / set_config_value

show settings, host and nodes / change a setting at runtime (if allowed)

list_nodes

check that every node answers

read_file, read_multiple_files

text with offset/length (negative offset = tail), images as image content; .docx, .xlsx (sheet), PDF (built in on macOS, pdftotext on Linux/Windows), http(s) URLs (is_url)

write_file

rewrite (atomic, keeps permissions) or append; creates parent directories

edit_block

replace exact text; checks the number of occurrences; handles CRLF files; on a miss shows the closest text and a character diff

create_directory, list_directory, move_file, get_file_info

the usual

search_files, search_code

name/glob search; regex or literal content search with context lines

start_search, get_more_search_results, stop_search, list_searches

the same searches in the background, paged, for big trees

start_process

run a command in a session; returns PID, status (running, waiting for input, exited with code N) and output

interact_with_process, read_process_output

send a line of input / get new output (or any retained lines with offset)

force_terminate, list_sessions

stop a session and its children / list sessions

list_processes, kill_process

system processes

get_recent_tool_calls, get_usage_stats

what was done recently (arguments, result start) and per-tool statistics, from the audit log

Security

Read docs/SECURITY.md before exposing it to a network. In short: this is remote shell access by design. allowedDirectories confines the file tools, but commands started with start_process run with your user's full rights. Use a dedicated user, readOnly, and a secret token; keep the HTTP listener on loopback behind an authenticated tunnel.

Development

python3 -m unittest discover -s tests -v    # stdlib only
python tests/sdk_compat.py                  # needs `pip install mcp`; checks the official SDK client

Candidate 1.3.0: 80 tests pass on macOS with Python 3.9 and 3.12. On Linux with Python 3.12, 79 tests pass and one PDF test is skipped because the optional converter is absent. These are isolated fixture checks. A real Linux CLI path through public HTTPS, delivered login email, device approval, OAuth, scoped read/search, authorized text changes and access revocation has also been checked. Fresh ChatGPT/mobile host acceptance and public capacity remain separate checks. The hosted route is Bridge Commander Cloud over OAuth.

PDF text: pdftotext (poppler) when present, otherwise the PDFKit built into macOS. On Windows install poppler (a Windows build of poppler with its bin folder on PATH, e.g. scoop install poppler) to read PDF; everything else needs nothing beyond Python.

License

MIT — see LICENSE.

CI: ci/github-actions-test.yml runs the tests on Linux and macOS. To enable it, copy it to .github/workflows/test.yml (pushing workflow files needs a token with the workflow scope).

Free public beta — client 1.3.1

The initial macOS/Linux path is a foreground Python .pyz in a terminal, a fresh private configuration and ~/BridgeFiles read-only. Use a maintained, patched Python; public installer acceptance is separate from compatibility tests. Do not run remote after a failed init, overwrite an existing configuration, or run two clients with the same credentials. Folder rules bound file tools; system/process/history queries have a broader read scope.

The client runs in the foreground terminal. Closing it stops new requests. An Apple Developer account is not needed to use this Python client or the ChatGPT plugin.

Remote sign-in now requires an explicit sharing configuration. Start with bridge-commander init --directory /path/to/shared-folder; the generated configuration is read-only and private. --allow-writes also enables commands with the OS user's permissions. The remote protocol requires the matching Cloud receipt API and finite delivery deadlines. Private metadata receipts prevent automatic replay across reconnect/restart; full outputs are kept only in bounded memory. Windows remote journal ACL acceptance is still pending.

Support: support@bridgecommander.dev. Include the client version, OS, error time and call identifier when available; omit passwords, tokens and private file contents.

Available Tools

26 tools
create_directoryC
Destructive

Create a directory (and parents).

Inputs: path (required).

edit_blockA
Destructive

Replace exact text in a file. old_string must match exactly and occur expected_replacements times (default 1). Include enough context to make it unique.

Inputs: file_path (required), new_string (required), old_string (required), expected_replacements.

force_terminateA
Destructive

Terminate a session started by start_process (and its child processes).

Inputs: pid (required).

get_configA
Read-onlyIdempotent

Show this server's configuration, version, host, user and configured nodes.

Inputs: no named parameters.

get_file_infoC
Read-onlyIdempotent

Size, type, timestamps, permissions and line count of a path.

Inputs: path (required).

get_more_search_resultsA
Read-onlyIdempotent

Read results of a search started with start_search. offset = first result line (negative = last N lines), length = how many (default 100, max 1000).

Inputs: search_id (required), length, offset.

get_recent_tool_callsA
Read-onlyIdempotent

Recent tool calls on this node from the audit log: time, tool, arguments (shortened), result start, success. Use it to recover context in a new chat. Filter by tool_name and since (ISO time, e.g. 2026-10-31T12:00).

Inputs: since, tool_name, max_results.

get_usage_statsA
Read-onlyIdempotent

Usage statistics from the audit log: calls, failures and average duration per tool and node.

Inputs: no named parameters.

interact_with_processB
Destructive

Send a line of input to a session started by start_process and return the new output.

Inputs: pid (required), input (required), timeout_ms.

kill_processA
Destructive

Send SIGTERM (or SIGKILL with force=true) to any process by PID.

Inputs: pid (required), force.

list_directoryA
Read-onlyIdempotent

List a directory as [DIR]/[FILE] lines, recursing up to depth levels (default 2).

Inputs: path (required), depth.

list_nodesB
Read-onlyIdempotent

List configured remote nodes and check that each answers.

Inputs: no named parameters.

list_processesA
Read-onlyIdempotent

List running system processes, optionally filtered by a substring.

Inputs: filter.

list_searchesB
Read-onlyIdempotent

List searches with their status and number of hits.

Inputs: no named parameters.

list_sessionsA
Read-onlyIdempotent

List sessions started by start_process.

Inputs: no named parameters.

move_fileB
Destructive

Move or rename a file or directory. Fails if the destination exists.

Inputs: source (required), destination (required).

read_fileA
Read-onlyIdempotent

Read a file: text, images (PNG/JPEG/GIF/WebP), Word .docx (text, headings, tables), Excel .xlsx (rows as tab-separated values; sheet = name or 0-based index), PDF (text; built in on macOS, pdftotext elsewhere). With is_url=true, path is an http(s) URL to fetch. offset = lines to skip; negative offset reads the last N lines. length = max lines (capped by fileReadLineLimit).

Inputs: path (required), sheet, is_url, length, +1 more.

read_multiple_filesC
Read-onlyIdempotent

Read several text files at once.

Inputs: paths (required).

read_process_outputA
Read-onlyIdempotent

Return new output of a session, waiting up to timeout_ms for some to appear. With offset, show retained output by line instead (negative offset = last N lines) without consuming it; length caps the lines.

Inputs: pid (required), length, offset, timeout_ms.

search_codeA
Read-onlyIdempotent

Search file contents with a regular expression (or literal=true for plain text). Returns path:line:text. file_pattern filters names, e.g. *.ts.

Inputs: path (required), pattern (required), literal, timeout_ms, +5 more.

search_filesA
Read-onlyIdempotent

Find files and directories whose name contains pattern (or matches a glob like *.py). Skips hidden dirs, .git and node_modules unless include_hidden.

Inputs: path (required), pattern (required), timeout_ms, max_results, +1 more.

set_config_valueA
Destructive

Change one setting at runtime (only when allowConfigChanges is true; not persisted). Keys: allowedDirectories, readOnly, blockedCommands, defaultShell, fileReadLineLimit.

Inputs: key (required), value (required).

start_processA
Destructive

Run a shell command in a new session. Returns its PID, status and the output produced within timeout_ms (default 5000). Long-running or interactive programs keep running: continue with read_process_output / interact_with_process. For Python REPLs use python3 -i.

Inputs: command (required), cwd, shell, timeout_ms.

write_fileA
Destructive

Write a file (mode=rewrite replaces it atomically, mode=append adds to the end). Creates parent directories. For big files write in chunks with append.

Inputs: path (required), content (required), mode.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 26 tools

    Disambiguation4/5

    The set splits cleanly into files, searching, processes/sessions, config and audit, and nearly every tool targets a distinct resource+action. The main softness is the search family: search_files/search_code duplicate start_search with search_type=files/content, and kill_process vs force_terminate overlap conceptually, though the descriptions do draw the sync-vs-background and any-PID-vs-session distinctions.

    Naming Consistency5/5

    Almost every name is a predictable snake_case verb_noun (read_file, list_directory, start_process, get_usage_stats), which makes the surface easy to scan. The only bare-verb name is force_terminate, a trivial deviation that context makes unambiguous.

    Tool Count3/5

    At 26 tools the surface is heavy, pushed over the line partly by six search-related tools (sync + background + paging + stop + list). Each tool does earn a role across files, processes and audit, but the breadth is at the top end of what an agent can hold in view at once.

    Completeness4/5

    File read/write/edit/move/create/list/info, process lifecycle, config and audit are all covered, but there is no delete_file or delete_directory (and no copy), so cleanup workflows dead-end at the shell. That gap is workable via start_process but is a real omission in an otherwise thorough surface.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server that allows AI models to safely access and interact with local file systems, enabling reading file contents, listing directories, and retrieving file metadata.
      10
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.
      2
      -
    • F
      license
      A
      quality
      D
      maintenance
      A local Model Context Protocol server that allows LLMs to securely execute shell commands on remote Linux and Windows systems via SSH connections.
      6
      2
      -