bridge-mcp
This MCP server exposes Bridge’s organizational context and collaboration workflow to coding agents via eight tools.
Read/update Bridge status, branch binding, claims, and scratchpad, plus pull a 7-day org context snapshot with tasks, quotes, citations, decisions, leases, seams, briefs, and corrections.
Fetch latest ORG/TEAM Morning Briefs and recent 72-hour corrections.
Log, edit, retract, or list seams such as wins, decisions, friction, and handoffs.
List, propose, score, resolve, or check 1-Click Decisions, including blocking/advisory modes and recipients.
Claim, release, or list cross-worktree file scope leases.
List, dispatch, claim, complete, or compile capsules for Bridge agent jobs.
Ingest bounded verification facts for task reconciliation.
Configures the repository's Git tooling via bridge setup git-hooks (installing prepare-commit-msg and post-commit hooks), checks out issue-driven feature branches (feat/<taskId>-<slug>) or isolated worktrees for a task, and binds the active branch to a Bridge taskId/jobId in .bridge/state.json so subsequent bridge commands inherit that context. Also supports piping git log output into seams (e.g., git log -1 --pretty=%B | brg seam win -).
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., "@bridge-mcp show the Bridge context and open decisions for this repo"
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.
bridge-plugin (bridge / brg CLI, MCP Server & Universal Agent Skills)
Zero-dependency, agent-native CLI, Model Context Protocol (MCP) server, and Cross-Agent Skills (agentskills.io) SDK for Bridge (https://bridge.xray.tech).
Works across Claude Code, Claude Desktop, OpenAI Codex, Cursor, Windsurf, and Gemini CLI, as well as CI/CD pipelines (GitHub Actions, GitLab CI, Railway, Vercel).
Key Capabilities
Universal 7-Day Organizational Context Gate (
bridge context/bridge_context_pull):Pulls a single distilled 7-day organizational snapshot from
GET /api/v1/fleet/context:Active & recently verified
Tasks with 1-2 sentence verbatim speaker quotes &FactSourcecitations.Strictly separates Spoken Claims (
SPOKEN_CLAIM_RAIL_2/TIER2_CANDIDATE, never treated as done) from Verified Proof (VERIFIED_PROOF_RAIL_3_5/TIER1_READY&TIER0_AUTO).Pending & recently resolved
Decisions with winning options & weighted criteria (doNotViolate: true).Active
FleetLeaselocks & recentFleetSeams (win,decision,friction,handoff).Latest
ORGandTEAMMorning Briefs (bridge_brief_latest//api/v1/briefs) plus active 72-hourCorrections.Session-Reloaded Organization Custom Instructions (
customInstructions): Automatically pulls organization-wide agent rules configured in Bridge (Settings → Organization Custom Instructions) and caches them locally at.bridge/org_instructions.mdon every session start.
Opens every coding session with a 🟢 Green / 🟡 Yellow / 🔴 Red Alignment Check.
Organization Custom Instructions (
brg instructions):Author once in Bridge (
/settings#custom-instructionsorbrg instructions set --file ...) to customize how AI coding agents behave for every developer and harness in your organization at once.Manage from the CLI with
brg instructions show,brg instructions pull,brg instructions set, andbrg instructions clear.
Cross-Agent Skills Standard (
agentskills.io/npx skills add XRAY-INC/bridge-plugin -g):skills/bridge-context/SKILL.md— Context gate, spoken-claim vs verified-proof rule, custom instructions enforcement, and🟢/🟡/🔴Alignment Check.skills/bridge-cli/SKILL.md— Complete shell guide (bridge/brg,BRIDGE_API_KEY,.bridge.json, semantic exit codes0-4).skills/bridge-api/SKILL.md— Direct REST API guide (https://bridge.xray.tech/api/v1/*withxrkey_v1tokens).skills/bridge-updates/SKILL.md— High-signal write-back protocol (bridge seam win|decision|friction,bridge decide propose,bridge handoff).skills/bridge-afk/SKILL.md— Unattended Away-From-Keyboard (/afk) run protocol with savepoints, frozen files, worktree isolation, scope claims, andAFK_RECEIPT.md.Dual marketplace manifests (
.claude-plugin/marketplace.json,.claude-plugin/plugin.json,.agents/plugins/marketplace.json) andhooks/hooks.json(SessionStartcontext gate +PreToolUsebrg guard).
Local Safety, Savepoints, Frozen Files & Shared-Login Identity:
Shared-Login Teammate Identity (
brg user <alias|email> [--session|--roster|--clear]): Resolves organization roster aliases (synced viabrg contextinto.bridge/roster.jsonor configured viateamRoster/emailDomainin.bridge.json) on shared accounts or machines (~/.config/bridge/credentials.jsonor session-scoped.bridge/session_user.json) and attachesuserEmail,actorEmail, anduserNameto every seam, claim, handoff, scratchpad entry, and decision card.Off-Branch Savepoints, Undo & Automatic GC (
brg savepoint,brg undo,brg rollback,brg savepoint prune): Creates deduplicated off-branch snapshots (refs/bridge-snapshots/<snap-id>with untracked trees stored in.git/objects+.git/bridge/snapshots.json, or content-addressed~/.cache/bridge/snapshotsfor non-Git folders — zero unpacked copies in<repo>/.bridge/snapshots/), automatically prunes evicted refs and legacy.bridge/snapshots/folders, and rewinds step-by-step withoutgit reset --hard(rescuing newly created untracked files into.bridge/rescued/<snap-id>/).Frozen File Locks &
PreToolUseGuard (brg freeze,brg unfreeze,brg guard): Protects sensitive files (.env*,prisma/migrations/**, billing modules) and enforces cross-worktree scope claims and automatic pre-mutation savepoints before agent tool execution.Non-Git Workspace Linking (
brg init --project "<Project>" --client "<Workspace>"/brg link-project): Binds non-Git project folders to Bridge projects.
Dual-Binary Ergonomics (
bridge+brg) & Semantic Exit Codes (0-4):Primary binary
bridge+ zero-collision 3-character aliasbrg.TTY renders aligned tables; non-TTY pipes or
--jsonemit deterministic JSON onstdout.Exit codes:
0(OK),1(Error),2(Concurrency/Decision Block),3(Auth Missing),4(Offline Spooled to.bridge/spool.jsonl).
Related MCP server: mcp-server
Installation
0. One-Command Machine Setup
export PATH="$HOME/.local/bin:$PATH"
export BRIDGE_API_KEY="xrkey_v1..."
curl -fsSL https://bridge.xray.tech/install.sh | sh1. Universal Agent Skills (agentskills.io — Claude Code, Codex, Cursor, Windsurf, Gemini CLI)
npx skills add XRAY-INC/bridge-plugin -g2. Python CLI & MCP Server (uv / pipx / pip)
uv tool install --force git+https://github.com/XRAY-INC/bridge-plugin.git
# or
pipx install --force git+https://github.com/XRAY-INC/bridge-plugin.git3. Claude Code & Codex Plugin Marketplaces
/plugin marketplace add XRAY-INC/bridge-plugin
/plugin install bridge@bridge-plugin4. One-Command Agent & Git Hook Setup
bridge setup
bridge setup claude
bridge setup cursor
bridge setup antigravity
bridge setup codex
bridge setup git-hooksQuickstart
# 1. Authenticate with your Bridge API key (xrkey_v1...)
export BRIDGE_API_KEY="xrkey_v1..."
bridge auth login --api-key "$BRIDGE_API_KEY"
# 2. Bind your repository (.bridge.json)
bridge init
# 3. Pull 7-day organizational context, custom instructions & 🟢/🟡/🔴 Alignment Check
brg context --days 7 --team platform-eng --json
brg instructions show
brg briefs --json
# 4. Start a task branch and reserve file scope globs
bridge tasks start task_104 --slug oauth-pkce
bridge claim "src/auth/*" --ttl 30m --reason "OAuth PKCE flow"
# 5. Propose or check 1-Click Decisions when hitting a trade-off
bridge decide propose \
--title "Token Storage Strategy" \
--context "Choose between HttpOnly cookie session vs Web Worker token" \
--options "HttpOnly Cookie,Web Worker Token" \
--urgency HIGH
# 6. Log high-signal seams and close your turn with a handoff
bridge seam win "Implemented OAuth 2.1 PKCE verifier and unit tests"
bridge release --all
bridge handoff "PKCE verifier merged; next up: token rotation endpoint"License
Bridge Customer SDK License — see LICENSE.
Available Tools
8 toolsbridge_brief_latestC
Fetch latest ORG/TEAM Morning Briefs and 72h Corrections.
Inputs: kind, team.
bridge_contextC
Read or update Bridge status, branch binding, claims, teammate user identity, and scratchpad.
Inputs: user, topic, session, write_body, +1 more.
bridge_context_pullC
Pull 7-day org context: tasks, quotes, citations, decisions, leases, seams, briefs & 72h corrections.
Inputs: days, repo, team.
bridge_decideC
List, propose, score, resolve, or check 1-Click Decisions (--to recipients, blocking/advisory).
Inputs: to, mode, score, title, +10 more.
bridge_factC
Ingest a bounded (<=280 char) verification fact for task reconciliation.
Inputs: statement (required), kind, task_id, confidence.
bridge_jobC
List, dispatch, claim, complete, or compile capsules for Bridge agent jobs.
Inputs: globs, notes, action, job_id, +3 more.
bridge_scopeC
Claim, release, list scope leases, or freeze/unfreeze/savepoint/undo local files.
Inputs: all, ttl, globs, action, +2 more.
bridge_seamC
Log, edit, retract, or list seams (win, decision, friction, handoff).
Inputs: tag, user, action, project, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool is nominally tied to a domain entity (brief, job, seam, scope, decision, fact), but bridge_context vs. bridge_context_pull are easy to confuse, and briefs/72h corrections appear in both. Several tools also multiplex many unrelated actions (list/dispatch/claim/complete/compile in bridge_job), so an agent must read the description carefully rather than relying on the tool name to pick correctly.
All tools share a consistent 'bridge_' namespace prefix, which makes the set instantly recognizable. However, the suffixes are bare nouns with no verb, and bridge_context_pull breaks the noun pattern, so the name alone rarely tells you which operation you are invoking.
Eight tools is a well-scoped count for an agent-coordination bridge, and each maps to a distinct domain concept. The caveat is heavy multiplexing inside single tools, which pushes a lot of surface area into few names rather than splitting cleanly.
The surface covers the core lifecycle: briefs, 7-day context, job dispatch/claim/complete, seams with log/edit/retract, scope leases, decisions with propose/score/resolve, and fact ingestion. Gaps are minor — there is no obvious dedicated messaging or teammate-facing tool beyond identity in bridge_context.
Maintenance
Related MCP Connectors
MCP Server for an Agent Task Marketplace
Guarded MCP server for agent-readable business truth, provenance, readiness, and discovery.
An MCP server that provides bazaarvoic JOLT transformation capabilities.
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that exposes tools for issuing scoped agent credentials, delegating narrower child credentials, handling approvals, revoking task trees, and retrieving audit trails and evidence packets.141Apache 2.0
- FlicenseNot gradedqualityDmaintenanceA universal MCP server for registering internal, external, and OpenAPI-based APIs as MCP tools. It exposes them to MCP clients via Streamable HTTP and provides admin portal, RBAC/session auth, credential injection, and audit logging.-
- AlicenseNot gradedqualityBmaintenanceThis MCP server provides a stateful, resettable, verifiable API runtime that gates every tool call, enabling agents to run long workflows against provider-shaped environments without live provider write access. It records decisions, side effects, and outcome evidence for replayable, verifiable benchmark runs.Apache 2.0
- AlicenseNot gradedqualityNot gradedmaintenanceEnables enterprise agent fleets to register workers, dispatch tasks by capability, monitor continuous heartbeat telemetry, trip automated circuit breakers, and recover from checkpointed state through a zero-dependency MCP server.MIT