Trinity Git Orchestrator β Dual-MCP + Vision bridge for AI agents to control Git & GitButler through BrowserOS
trios is a dual-layer MCP system that allows AI agents (BrowserOS, Claude Code, Cursor) to control Git repositories and GitButler virtual branches through natural language + vision.
| Layer | Stack | Port | Purpose |
|---|---|---|---|
| trios-server (Rust) | Axum + git2-rs + but CLI | 9005 |
Core git operations, stable & fast |
| trios-mcp-bridge (TypeScript) | Bun + Hono + MCP SDK | 9200 |
Vision + high-level GitButler workflows |
The agent can use either or both:
- Rust server for pure git operations (no UI needed)
- TypeScript bridge for vision-enhanced workflows (sees GitButler UI, understands context)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TRIOS DUAL-MCP + VISION β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββ
β BrowserOS (Chromium fork) β
β + Agent Extension (React + Vision)β
ββββββββββββββββββββ¬ββββββββββββββββββ
β
MCP + Vision (screenshots, DOM)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
β trios-mcp-bridge (Bun/Hono) :9200 β
β β’ MCP client β BrowserOS MCP (screenshots) β
β β’ MCP client β GitButler MCP (`but mcp`) β
β β’ 10 high-level tools: β
β gitbutler_analyze_ui() β
β gitbutler_commit_visible() β
β gitbutler_create_branch() β
β gitbutler_push_stack() β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββΌββββββββββββββββββββββββ
β β β
ββββββββΌβββββββ βββββββββββΌβββββββββββ ββββββββββΌββββββββββ
β BrowserOS β β trios-server β β GitButler MCP β
β MCP Server β β (Rust/Axum) :9005 β β (`but mcp`) β
β (CDP) β β git2-rs + but CLI β β virtual branches β
β screenshots β β stage, commit, β β stacks, absorb β
β snapshots β β branch, push, pull β β undo β
βββββββββββββββ ββββββββββββββββββββββ ββββββββββββββββββββ
β β
βββββββββ¬ββββββββββββββββ
βΌ
.git/ + GitButler state
(UI updates automatically)
# Clone
git clone https://github.com/gHashTag/trios
cd trios
# Build & Run
cargo build
cargo run -p trios-server
# Server starts at http://localhost:9005
# Test
cargo test# Located at: packages/browseros-agent/apps/trios-mcp-bridge/
cd packages/browseros-agent/apps/trios-mcp-bridge
# Install & Run
bun install
bun run src/index.ts
# Bridge starts at http://localhost:9200
# With options
bun run src/index.ts --port 9200 --browseros-url http://127.0.0.1:9105/mcp --working-dir /path/to/repo| Tool | Crate | Description |
|---|---|---|
git_status |
trios-git | List changed files |
git_stage_files |
trios-git | Stage files for commit |
git_commit |
trios-git | Create a commit |
git_branch_list |
trios-git | List branches |
git_branch_create |
trios-git | Create a branch |
git_push |
trios-git | Push to remote |
git_pull |
trios-git | Pull from remote |
| Tool | Description |
|---|---|
gitbutler_analyze_ui |
Screenshot GitButler UI + analyze state (branch, files, stacks) |
gitbutler_screenshot |
Raw screenshot of GitButler tab |
gitbutler_workspace_status |
Detailed file/branch status from CLI |
gitbutler_bridge_health |
Health check for all connections |
| Tool | Description |
|---|---|
gitbutler_commit_visible |
Commit changed files with a message |
gitbutler_create_branch |
Create a new virtual branch |
gitbutler_push_stack |
Push current stack/branch to remote |
gitbutler_stage |
Stage specific files |
gitbutler_absorb |
Smart absorb changes into appropriate commits |
gitbutler_pull |
Pull latest changes |
# Stage files
curl -X POST http://localhost:9005/mcp/tools/call \
-H 'Content-Type: application/json' \
-d '{"name": "git_stage_files", "input": {"repo_path": "/path/to/repo", "paths": ["src/main.rs"]}}'
# Commit
curl -X POST http://localhost:9005/mcp/tools/call \
-H 'Content-Type: application/json' \
-d '{"name": "git_commit", "input": {"repo_path": "/path/to/repo", "message": "feat: add feature"}}'# Health check
curl http://localhost:9200/
# MCP tools via Streamable HTTP
curl -X POST http://localhost:9200/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'Add as a custom MCP server in BrowserOS settings:
{
"name": "trios-mcp-bridge",
"url": "http://127.0.0.1:9200/mcp",
"transport": "streamable-http"
}{
"mcpServers": {
"trios-bridge": {
"url": "http://127.0.0.1:9200/mcp",
"transport": "streamable-http"
},
"trios-server": {
"url": "http://127.0.0.1:9005/mcp",
"transport": "streamable-http"
}
}
}User: "See what's changed in GitButler and commit the auth changes"
Agent:
1. gitbutler_analyze_ui() β Sees: branch "feature/auth", 3 changed files
2. gitbutler_stage(["auth.ts", "auth.test.ts"])
3. gitbutler_commit_visible("feat: add auth validation")
4. gitbutler_push_stack()
| Crate | Purpose |
|---|---|
trios-core |
Traits, types, shared abstractions |
trios-git |
Git operations via libgit2 |
trios-gb |
GitButler CLI wrapper with fallback |
trios-server |
Axum MCP HTTP server on port 9005 |
trios/ # Rust MCP server (this repo)
βββ crates/
β βββ trios-core/ # Shared types & traits
β βββ trios-git/ # git2-rs operations
β βββ trios-gb/ # GitButler CLI wrapper
β βββ trios-server/ # Axum MCP server :9005
βββ CLAUDE.md # Development laws
βββ README.md # This file
BrowserOS/packages/browseros-agent/apps/trios-mcp-bridge/ # TypeScript bridge
βββ src/
β βββ index.ts # Main entry β Hono HTTP server :9200
β βββ config.ts # Config from env vars + CLI args
β βββ types.ts # Shared types
β βββ bridge-server.ts # MCP server with 10 tools
β βββ clients/
β βββ browseros-client.ts # BrowserOS MCP client (HTTP)
β βββ gitbutler-client.ts # GitButler MCP client (stdio) + CLI fallback
βββ package.json
βββ README.md
See CLAUDE.md for full rules. Summary:
- NO
.shfiles cargo clippy -- -D warnings= 0cargo testbefore merge- Every PR closes an issue
| Variable | Default | Description |
|---|---|---|
TRIONS_BRIDGE_PORT |
9200 |
Bridge server port |
TRIONS_BROWSEROS_MCP_URL |
http://127.0.0.1:9105/mcp |
BrowserOS MCP URL |
TRIONS_GITBUTLER_CLI |
but |
GitButler CLI path |
TRIONS_GITBUTLER_INTERNAL |
true |
Use GitButler internal MCP tools |
TRIONS_WORKING_DIR |
cwd |
Working directory for git |
TRIONS_LOG_LEVEL |
info |
Log level |
IGLA RACE training pipeline for pushing language model performance.
git clone https://github.com/gHashTag/trios-trainer-igla.git
cd trios-trainer-igla
cargo run --release --bin trios-train -- \
--config configs/champion.toml --seed 43| Phase | Status | Scope |
|---|---|---|
| PR-0 | β done | Skeleton compiles, anchor test passes |
| PR-1 | π‘ next | Migrate model + optimizer + tokenizer |
| PR-2 | β¬ | Migrate JEPA + objective; merge trios-igla-trainer::jepa_runner |
| PR-3 | β¬ | Champion-config full run reproduces β 2.2393 Β± 0.01 |
| PR-4 | β¬ | DELETE phase in gHashTag/trios (consolidation PR) |
| PR-5 | β¬ | Push image to ghcr.io + wire 3-seed Railway deployment |
- HybridAttn (L-h2) with INV-13 validation (qk_gain must be ΟΒ² or ΟΒ³)
- Multi-objective loss: 0.5NTP + 0.25JEPA + 0.25*NCA
- Muon optimizer with Newton-Schulz orthogonalization
- GF16 (Golden Float) quantization
- Champion baseline: BPB=2.2393 @ 27K steps
- Target BPB: 1.50 for Gate-2 victory
When built with --features trios-integration:
- INV-8 (Ο-LR band):
lr β [1e-3, 1e-2] - R8 (Gate-2 floor): step β₯ 4000 to emit ledger row
- embargo: HEAD SHA must not appear in
.embargo
- gHashTag/trios-trainer-igla β Canonical IGLA training pipeline
- Local crate:
crates/trios-trainer/β CPU training foundation
- gHashTag/t27 β Trinity math research
- gHashTag/BrowserOS β Agent that uses trios
- gHashTag/gitbutler β GitButler fork