brokre
Allows executing ClickHouse client commands with secure credential injection, enabling AI agents to interact with ClickHouse databases without exposing passwords.
Allows executing Docker commands with secure credential injection, enabling AI agents to manage Docker containers and images while keeping credentials hidden.
Allows executing Git commands with secure credential injection, enabling AI agents to perform Git operations while keeping credentials hidden.
Allows executing MinIO client commands with secure credential injection, enabling AI agents to interact with MinIO object storage without exposing passwords.
Allows executing MySQL client commands with secure credential injection, enabling AI agents to interact with MySQL databases without exposing passwords.
Allows executing psql commands with secure credential injection, enabling AI agents to interact with PostgreSQL databases without exposing passwords.
Allows executing Redis client commands with secure credential injection, enabling AI agents to interact with Redis instances without exposing passwords.
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., "@brokrerun 'uptime' on server prod-db"
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.
brokre — AI-safe Credential Broker
English | 简体中文
brokre is a local credential broker for AI agents and humans. Use it with Cursor, Claude Code, Kimi Code, Trae, OpenClaw, Hermes Agent, ChatClaw, and other MCP-capable clients to run ssh, mysql, psql, and more — passwords never enter AI context, environment variables, or ps output. It wraps any CLI on your PATH — not only SSH or MySQL — and injects saved passwords at the prompt without exposing plaintext to the AI process, shell history, or process environment.
Developed by Techinone (成都同创合一科技有限公司).
What's New in 0.2.17
0.2.17 is the current release: SessionRelay routed SSH by default, multi-hop bastion routes, local-only list by default, and the existing one-command npm install / auto MCP registration / auto binary upgrade flow.
npm — install, auto-update, auto MCP setup
npm install -g brokre # or: npx -y brokre@latestCapability | What happens |
Auto MCP registration |
|
Auto binary upgrade | On each MCP start, compares npm package version with |
CLI without npm |
|
Supported IDEs | Cursor, VS Code, VS Code Insiders, Claude Code, Claude Desktop, Trae, Kimi Code, Windsurf, OpenClaw — see packages/brokre-mcp/README.md. |
Recommended MCP config (also applied by auto-setup):
{ "command": "npx", "args": ["-y", "brokre@latest"] }Bastion broker — cluster management
The bastion layer lets AI agents operate many hosts behind one jump box without copying vault passwords into context or scattering secrets on the laptop.
Advantage | What it means in practice |
Single control plane | Register a bastion SSH alias ( |
Smart routing |
|
Secrets stay on the bastion | Routed exec runs |
Human gate, agent-friendly | Bastion outbound requires unlock (TTY, |
Cluster-safe defaults | Local-only list by default; explicit bastion discovery; reachability probes with ms timeouts and concurrency caps; loop detection and audit |
Privileged ops over routes |
|
Typical flow for a K8s / DB / batch cluster behind one entry host:
brokre bastion enable b150
brokre bastion sync b150 --json # pull inner alias catalog
brokre bastion unlock
brokre list --include-bastions --json # b150::db, b150::worker-01, …
brokre ssh b150::db systemctl status # MCP: brokre_exec with routed aliasMCP equivalent:
{ "binary": "ssh", "args": ["b150::db", "uname", "-a"] }Gate policy (default vs strict) — see Bastion gate policy below. Gate is inactive until brokre bastion set-key; then default unlocks only bastion outbound paths; strict requires unlock for every exec while list remains local-only unless bastion discovery is requested.
See Cross-network list inheritance and Bastion proxy below for setup details.
Related MCP server: Access
CLI security (core)
brokre is built around one rule: secrets stay out of the AI's reach and out of observable process state.
Layer | What brokre does |
No env / | Injection is PTY prompt-based — passwords are never passed via |
Parent never holds plaintext (Unix) | Saved passwords decrypt in a short-lived |
AI cannot |
|
Vault at rest | Per-field AES-256-GCM; DEK wrapped with OS keyring (Linux) or |
Audit | HMAC-chained JSONL at |
MCP boundary | MCP exposes metadata ( |
Manage UI | Binds |
OS hardening | Core dumps disabled, ptrace checks (Linux), optional |
Full threat model: SECURITY.md, THREAT_MODEL.md.
Any CLI on PATH (generic by design)
brokre is not a fixed list of database/SSH wrappers. The core model is:
brokre <any-cli-on-PATH> [args...]First connection: run verbatim, capture the password you type at the prompt, offer to save as an alias.
Next time: brokre <cli> <alias> … auto-injects — AI and scripts only see the alias name.
Preset prompt patterns ship for common tools (ssh, mysql, psql, redis-cli, ftp, clickhouse, git, docker, kubectl, sudo, …). Everything else uses a generic password: / passphrase: matcher — no code changes required.
brokre gsql prod-cluster -c "SELECT 1" # any proprietary CLI on PATH
brokre kubectl get pods # if your cluster CLI prompts for a password
brokre my-internal-tool --host db.internalCustomize when needed:
~/.brokre/prompts.toml— per-binary prompt regex overrides~/.brokre/manage.toml— custom sections in the manage UI (e.g. GaussDB, internal tools)
Built-in manage UI tabs (when the binary is installed) include SSH, FTP, MySQL, PostgreSQL, Redis, ClickHouse, MinIO — convenience only; the PTY wrapper works for any CLI.
Install (MCP first — recommended for AI)
The npm package brokre launches the local brokre mcp server over stdio for Cursor, Claude Code, Kimi Code, Trae, OpenClaw, Windsurf, VS Code, and other MCP clients.
Choose your install path
Path | Best for | Install | MCP in IDEs | CLI upgrade |
npm (recommended) | AI users; want one command |
| Automatic on install ( | npm + auto-download on each MCP start |
install.sh / Homebrew | Production; no Node for daily use |
| Run |
|
Manual MCP JSON | Custom layouts only | CLI or npm already present | Edit IDE config by hand | Depends on how CLI was installed |
Recommended MCP entry (also what auto-setup writes):
{ "command": "npx", "args": ["-y", "brokre@latest"] }No Node — point MCP at the native binary: { "command": "brokre", "args": ["mcp"] }.
Path A — npm one-liner (0.2.8+)
npm install -g brokre
# or without global install:
npx -y brokre@latestOn npm install, three things happen automatically:
MCP launcher —
brokre-mcp/npx -y brokre@latestspawnsbrokre mcp.IDE auto-registration —
postinstallrunsbrokre-setup-mcp: detects installed IDEs only (app, CLI, or real usage artifacts — not empty folders) and merges the MCP entry above into each global config. Idempotent; preserves your other MCP servers.Binary auto-upgrade — on each MCP start, if
PATHor~/.brokre/bin/brokreis older than the npm package, the matching GitHub Release is downloaded.
IDEs covered by auto-setup
IDE | Global config |
Cursor |
|
VS Code / Insiders |
|
Claude Code |
|
Claude Desktop |
|
Trae |
|
Kimi Code |
|
Windsurf |
|
OpenClaw |
|
Re-run registration (e.g. you installed brokre before Cursor, then installed Cursor later):
brokre mcp setup # via CLI — same logic as postinstall
npx brokre-setup-mcp # via npm
brokre mcp setup --dry-run # preview only
brokre mcp setup --force # overwrite existing brokre entrySkip auto-registration on npm install: BROKRE_MCP_SKIP_SETUP=1. Disable binary auto-download: BROKRE_SKIP_AUTO_INSTALL=1. Pin a binary: BROKRE_BIN=/path/to/brokre.
Requires Node.js 18+ for the npm path.
Path B — Native CLI (install.sh / Homebrew, no npm)
curl -fsSL https://raw.githubusercontent.com/Furowu/brokre/main/install.sh | bashbrew tap Furowu/brokre
brew install brokreVersion and upgrade (built into the CLI — no npm required):
brokre version # version, binary path, install type
brokre version --check # compare with latest GitHub release
brokre version --check --json
brokre upgrade # download latest release (curl + tar)
brokre upgrade --check # exit 1 if an update is available
brokre upgrade 0.2.10 # install a specific version
brokre upgrade --force # reinstall even when up to dateRe-run install.sh also upgrades when a newer release exists.
Register MCP after CLI install (needs Node for the setup script, or npx fallback):
brokre mcp setupManual per-IDE setup (optional)
Use this only if you skip auto-setup or need project-scoped config.
Cursor — one-click install, or ~/.cursor/mcp.json:
{
"mcpServers": {
"brokre": { "command": "npx", "args": ["-y", "brokre@latest"] }
}
}Claude Code — user scope in ~/.claude.json or claude mcp add --scope user brokre -- npx -y brokre@latest. Project scope: .mcp.json with "type": "stdio".
More clients and env vars: packages/brokre-mcp/README.md. MCP Registry ID: io.github.Furowu/brokre.
MCP tools and usage
MCP tool | Purpose |
| Saved local aliases by default; set |
| Run any saved CLI alias ( |
| Remote privileged command ( |
| Open manage UI in browser for the human to add creds |
| Query audit history (metadata only — args redacted) |
| Verify tamper-evident audit log chain |
| Read or set bastion gate mode ( |
MCP vs CLI (essential for AI agents)
brokre is not a drop-in for ssh / mysql — you must prefix with brokre for vault injection.
Task | MCP (in IDE) | CLI (terminal / debugging) |
List aliases |
|
|
SSH remote command |
|
|
Any CLI |
|
|
Write remote script |
|
|
Privileged exec |
|
|
Add credentials |
|
|
First-time save | not available (human TTY required) |
|
Common mistakes (AI agents)
Wrong | Right |
|
|
MCP |
|
MCP |
|
bare |
|
For remote SSH: tokens after the alias are argv slices, not one shell command. Use split tokens for simple commands; use shell_command for complex scripts.
MCP elevated sessions (sudo / su, Unix)
By default, brokre mcp reuses a background elevated shell per (alias, mode, user) so sudo passwords are not re-prompted on every call.
brokre_exec_elevated (preferred for privilege escalation):
{
"alias": "prod",
"command": "systemctl status nginx",
"mode": "sudo_login",
"session": "reuse"
}Field | Description |
|
|
|
|
|
|
When the session pool is enabled, responses include session_reused and session_idle_expires_at in addition to exit_code / stdout / stderr. session_idle_expires_at is a rolling idle-window hint refreshed on each call, not a fixed expiry timestamp. stderr is usually empty on the pool path.
brokre_exec: binary=ssh with sudo/su in args auto-uses the same pool (always reuse; no session=new|close). Example: args=["prod","sudo","whoami"].
Writing remote scripts/files (shell_command, binary=ssh only): pass only the alias in args; put the full shell script in shell_command (brokre normalizes to sh -c). Do not embed sh -c '...' in args or split printf/redirects across argv tokens. For privileged system paths use brokre_exec_elevated.command.
{
"binary": "ssh",
"args": ["prod"],
"shell_command": "cat > /tmp/deploy.sh <<'EOF'\n#!/bin/sh\necho ok\nEOF"
}Bastion routes work the same: args=["b150::db"] with shell_command as the remote script.
SessionRelay tunnel (default)
brokre ssh b150::db uses the SessionRelay path by default: the laptop starts brokre tunnel agent --stdio on b150 over SSH, and the agent runs brokre ssh db on the bastion. Multi-hop routes peel one hop per agent (b1::b2::db starts on b1, then b1 continues with b2::db). Inner credentials stay in the bastion vault; the laptop only relays terminal bytes. BROKRE_TUNNEL=0 is a temporary legacy escape hatch for emergency rollback.
brokre tunnel doctor b150
brokre ssh b150::db uname -aMCP brokre_exec responses for routed SSH include tunnel: { mode, active }. TcpForward, endpoint sync, Manage UI tunnel controls, and persistent tunneld are later phases.
Control | Default |
Idle teardown | 10 minutes |
Max lifetime | 30 minutes |
Per-command timeout | 120 seconds |
Variable | Default | Meaning |
|
|
|
|
| Idle timeout (seconds) |
|
| Max session lifetime (seconds) |
|
| Remote command timeout (seconds) |
Not supported: interactive sudo -i without a command, vim/top, or sudo passwords different from the vault password field. See THREAT_MODEL.md T12.
On first connect with an empty vault, brokre opens manage in your browser (http://127.0.0.1:56777/?t=…). Session tokens stay on localhost — never returned to the AI. Set BROKRE_MCP_NO_AUTO_OPEN=1 to disable auto-open.
| MCP tool | Purpose |
Add credentials
After CLI install, the manager opens on first run (brokre manage --onboard --open). Or anytime:
brokre manage --openOr save on first interactive connection (any CLI):
brokre ssh root@10.0.0.1
brokre my-tool --host internal.corpUse (AI-safe)
brokre mysql prod-db -e "SHOW TABLES"
brokre ssh prod-bastion uname -a
brokre <your-cli> <alias> [args...]List metadata (safe for AI / scripts)
brokre list --json # local aliases with reachability status (default probe)
brokre list --no-probe --json # metadata only, skip TCP/SSH probes
brokre list --reachable-only # hide unavailable aliases
brokre list --all --json # compat: show all (same as default unless --reachable-only)
brokre list --no-bastion-discovery # local only — no bastion SSH discoveryWhen bastions are registered, brokre list stays local-only by default and does not SSH to bastions or trigger bastion unlock. Use brokre list --include-bastions (MCP: include_bastions=true) when you actually need routed aliases such as b150::db; that remote discovery may require unlock.
OpenSSH sessions inject ConnectTimeout=5 by default (BROKRE_SSH_CONNECT_TIMEOUT). Override with -o ConnectTimeout=N or the env var.
Cross-network list inheritance (bastion broker)
For cross-network access — travel, VPN, public entry points — when direct LAN aliases are unreachable locally but reachable via a bastion running brokre.
Prerequisites
Laptop:
brokre bastion enable b150(b150is a saved SSH alias)Bastion host runs brokre at
~/.brokre/bin/brokre(standard install /npxpath) with inner aliases saved (e.g.db)
Routed list
brokre bastion unlock # if bastion key is set
brokre list --include-bastions # includes b150::db (route=b150, access=via_b150)When cross-network, use --include-bastions when you need routed aliases. Plain brokre list stays local-only and does not unlock or SSH to bastions.
Execute
brokre ssh b150::db uname -a
# MCP: brokre_exec binary=ssh, args=["b150::db", "uname", "-a"]When both paths work, the list shows both db (direct) and b150::db (via_b150) — distinguish by access.
Bastion proxy (cross-network / intranet entry)
Promote any saved SSH alias whose remote host runs brokre into a bastion broker. Secrets stay on the bastion; the laptop caches metadata and executes via SSH passthrough.
brokre bastion enable b150 # register ssh alias b150 as bastion
brokre bastion set-key # set bastion unlock key (TTY)
brokre bastion unlock # unlock outbound session (TTL, 30 min idle default)
brokre list --include-bastions --json # discover bastion-routed aliases
brokre ssh b150::db uname -a # routed exec via b150 remote brokre
brokre bastion sync b150 --json # fetch alias list from one bastionRoute separator
::(:is illegal in alias names):db(local),b150::db(via bastion),b1::b2::inner(multi-hop, default depth ≤2).Remote brokre: routed exec invokes
~/.brokre/bin/brokreon the bastion (withBROKRE_SOFT_MEMLOCK=1,BROKRE_ALLOW_FILE_KEYCHAIN=1,BROKRE_ROUTED_INNER=1for headless Linux). Interactive commands (e.g.sudo -i) automatically get-tt.Guardrails: probe concurrency cap, ms timeouts, short cache, loop detection, audit
route/bastion(HMAC v4).Manage UI:
brokre manageBastion tab — register/disable bastions, Web set-key and unlock/lock, strict-mode toggle, sync remote aliases; non-TTY still auto-opens/bastion-auth. Audit tab filters bybastion/sourceand shows route fields.
Bastion gate policy (default vs strict)
The bastion gate is a human unlock step before sensitive operations. It is off until you set a bastion key (brokre bastion set-key). After a key exists, unlock establishes a local TTL session (brokre bastion unlock, TTY passphrase, manage UI /bastion-auth, or MCP browser elicitation).
Policy is stored at ~/.brokre/bastion/policy.json (strict_mode, default false).
Mode |
| When unlock is required (key must be set) |
default |
| Bastion outbound only — |
strict |
| Every |
Examples (default mode, key set, session locked)
Operation | Unlock needed? |
| No |
| Yes |
| Yes |
| Yes |
| No |
In strict mode, exec rows require unlock; metadata-only brokre list remains local-only and does not unlock unless --include-bastions is used.
Set gate mode
brokre bastion strict status # default | strict
brokre bastion strict on # strict — all exec gated; list stays local-only unless discovery is requested
brokre bastion strict off # default — bastion outbound onlySurface | How |
CLI |
|
Manage UI | Bastion tab — strict mode toggle |
MCP |
|
MCP read response includes strict_mode, gate_mode, key_set, unlocked. List/exec responses include bastion_gate (required, unlocked_during_call, idle_expires_at).
Unlock session TTL (defaults): 30 min idle (BROKRE_BASTION_IDLE_SECS), 8 h max lifetime (BROKRE_BASTION_MAX_SECS). Idle window renews on each gated call while unlocked (shared across CLI, MCP, and manage UI via ~/.brokre/run/bastion_session.json). Bastion gate auth is independent of manage UI session idle expiry. Disable auto-open browser on MCP unlock: BROKRE_BASTION_NO_AUTO_OPEN=1.
Reveal / delete (human-only, real TTY)
brokre reveal mysql prod-db --field password
brokre rm ssh prod-bastionAudit log (metadata only)
brokre audit list --profile ssh --action exec --json
brokre audit verify --jsonEvents are stored at ~/.brokre/audit/audit.log (HMAC-chained). Command arguments are uniformly redacted as <REDACTED>. New events include a source field (cli, mcp, or manage). The manage UI Audit log tab and MCP brokre_audit_list expose the same metadata.
Manage UI security
127.0.0.1 only; session token in terminal
Passwords: create / rotate only — no read API
Delete / rotate require reveal passphrase (or
YESfor auto-saved records)15-minute idle timeout
Architecture
┌─────────┐ ┌──────────┐ ┌─────────────┐ ┌────────────┐
│ AI/User │────▶│ brokre CLI│────▶│ OS Keychain │────▶│ Vault File │
└─────────┘ └──────────┘ └─────────────┘ └────────────┘
│
▼
┌─────────────┐
│ PTY + inj. │──▶ any CLI on PATH (ssh, mysql, gsql, …)
└─────────────┘Double encryption: unique DEK per field; wrapped for
execandrevealseparately.Vault metadata:
profile,name,host_alias,saved_argsin cleartext beside ciphertext (THREAT_MODEL.md T3).SSH private keys:
0600temp file +-ifor the session (docs/HARDENING.md).
Preset manage UI groups
Convenience tabs when the binary is on PATH:
Group | Binaries |
SSH |
|
FTP |
|
MySQL |
|
PostgreSQL |
|
Redis |
|
ClickHouse |
|
MinIO |
|
Roadmap
Today: generic PTY wrapper + manage.toml groups + prompts.toml overrides.
Planned: full TOML connector profiles under ~/.brokre/profiles/ with per-tool injection strategies.
Piped stdin and OpenSSH sharing
Piped stdin (
tar | brokre ssh host 'tar xf -'): pipe data forwards only after injection completes.OpenSSH family (
ssh,scp,sftp): shared saved credentials when the host matches. Interactive save required first (TTY).
Development
cargo test # unit tests in src/ only (no tests/ integration suite in this repo)
cargo clippy --all-targets --all-features -- -D warnings
cargo build --release # binary: target/release/brokreRelease version is declared in VERSION (also reflected in Cargo.toml and packages/brokre-mcp/package.json). Official binaries and npm packages are published by TechinOne via GitHub Releases and CI — not part of this open-source tree.
License
MIT — see LICENSE.
Techinone · 成都同创合一科技有限公司
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/Furowu/brokre'
If you have feedback or need assistance with the MCP directory API, please join our Discord server