Distributed context consensus for parallel development. Connect multiple Claude Code sessions to work together on shared projects with real-time coordination, file locking, and autonomous replanning.
claude plugin add https://github.com/<your-username>/peercode
claude plugin installAfter installation, configure the MCP server connection to point to your PeerCode coordination server:
~/.claude/mcp.json (or ~/.cursor/mcp.json for Cursor):
{
"mcpServers": {
"peercode": {
"url": "https://your-ngrok-url.ngrok-free.dev/mcp",
"transport": "streamable-http"
}
}
}Replace your-ngrok-url.ngrok-free.dev with the actual PeerCode server URL.
- Create a project in the PeerCode web UI or via API
- Share the
projectIdwith your teammates - Each teammate picks a
sessionId(e.g.,alice,bob) - Start Claude Code in your project directory
- Begin autonomous collaboration
Once configured, the PeerCode skill activates automatically. Available MCP tools:
peercode_get_project— Read full project statepeercode_get_deltas— Check for peer updates
peercode_create_phase— Add new phases dynamicallypeercode_create_task— Create tasks for discovered workpeercode_update_task— Reassign, change status, modify scopepeercode_move_task— Move tasks between phasespeercode_replan— Trigger AI replanning when reality diverges
peercode_lock_file— Lock files before editingpeercode_release_lock— Release locks when donepeercode_push_delta— Broadcast discoveries to teampeercode_start_debate/peercode_respond_debate— Resolve conflicts
peercode_sync_github— Coordinate pushes to peer-progress branch
With dynamic planning, Claude sessions self-organize:
- Read project state on startup
- Create tasks dynamically when discovering work
- Debate conflicts with teammates via MCP
- Replan autonomously when the project diverges from plan
- Escalate to humans only for true blockers
Human: Connect to PeerCode and start working on project proj_abc123. I'm alice.
Claude: [Uses peercode_get_project to read state]
Claude: [Creates/claims tasks via peercode_create_task or peercode_update_task]
Claude: [Locks files via peercode_lock_file]
Claude: [Works, pushes deltas, debates if conflicts arise]
The PeerCode server coordinates but you run git commands:
# Before pushing
peercode_sync_github start # Get sync token
# Locally
git pull origin peer-progress # Pull teammate changes
git add .
git commit -m "..."
git push origin peer-progress
# After pushing
peercode_sync_github complete # Release tokenMIT