AgentBridge MCP Server
README.md
# AgentBridge MCP Server
Bridges GitHub webhooks + an AI coding agent's git actions to a mobile app,
via phone-issued approve/commit/push/pull commands.
## Setup
npm install
cp .env.example .env # then edit ALLOWED_REPO_ROOT to point at your repo's parent dir
npm run build
npm start
## Endpoints
- POST /webhooks/github — point your GitHub repo webhook here (same secret as .env)
- POST /action — phone app calls this on Approve/Reject tap: { actionId, decision }
- GET /health — liveness check
- ALL /mcp — MCP endpoint for the AI agent (Claude Code, etc.) to call tools:
git_status, get_diff, request_commit, request_push, request_pull
- WS /ws — phone app connects here to receive live action notifications
## Important: ALLOWED_REPO_ROOT
The server refuses to run git commands outside this directory (path-traversal
guard, tested). Set it to the folder that CONTAINS your demo repo, and pass
the repo's folder name as `repoPath` in tool calls / webhook payloads.
## Tested end-to-end (see conversation log)
- Real git status/diff/commit/push/pull against a live repo
- Path-escape rejection
- GitHub webhook HMAC signature verification (forged + valid cases)
- Full loop: MCP tool call -> phone WebSocket notification -> phone
approves via /action -> real `git push` lands on the remote
test
test
test3
AgentBridge live demo test - 19:21:08
AgentBridge live demo test - 19:22:40
test commit A - 19:29:41
test commit B - 19:30:52
test commit C - 19:32:19
test commit D - 20:10:24
test commit - 23:16:51
test commit - 01:13:38
test commit - 12:25:20
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues