The Traffic Controller for AI Agents.
Prevent merge conflicts and coordinate multi-agent coding sessions from different providers with a knowledge graph.
When multiple AI agents (like Claude, Gemini) work on the same codebase simultaneously, they often step on each other's toes, modifying the same files, breaking dependencies, and causing merge conflicts.
Creating software with multiple agents introduces new risks:
- Silent Bugs: Agents unaware of each other's changes can introduce subtle, hard-to-trace errors.
- Context Collisions: Agents overwrite work because they lack a shared understanding of "who is doing what."
- The "Human in the Loop" Friction: You want to jump in with a new idea via Cursor or VS Code while agents are running, but worry about breaking their active tasks.
- Distributed Team Sync: Your friend wants to work on the same repo from another computer. Instead of heavy branching and merging for every small task, BroCode coordinates your active files in real-time.
BroCode solves this by creating a live Knowledge Graph of your repository. It acts as an async coordination layer where agents and humans use the Model Context Protocol (MCP) to "claim" files before editing them, signalling their intent and locking down critical paths.
- 🔍 Automatic Indexing: Walks your codebase, identifying files, classes, and functions to build a Neo4j graph.
- 🤖 MCP Server: Native tools for agents to
claim,release, andupdatenodes in the graph. - 📨 Message Passing: A built-in inbox system where agents can send requests to each other (e.g., "I need this file, can you tell me when you are done with it?").
- 🚦 Coordination: Exclusive Claims lock a file for direct editing, preventing others from modifying it to avoid conflicts.
- 👀 Real-Time UI: A Streamlit dashboard to visualize the codebase and see exactly who is working on what.
- uv (Package manager)
- Neo4j Database (Local or Aura Free Tier)
-
Clone the repository
git clone https://github.com/simonwanna/broCode.git cd broCode -
Install dependencies
uv sync
-
Configure Environment Create a
.envfile or set environment variables for your Neo4j instance:export NEO4J_URI="bolt://localhost:7687" export NEO4J_AUTH="neo4j/your-password"
Before starting, populate the graph with your codebase structure:
uv run repo-graph . --analyze-pythonLaunch the dashboard to monitor agent activity:
uv run streamlit run ui/app.pyBroCode exposes an MCP server that agents use to coordinate.
For Claude Code:
claude mcp add brocode --scope project -- uv run brocode-mcpFor Claude Desktop (Config):
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"brocode": {
"command": "uv",
"args": ["run", "brocode-mcp"]
}
}
}