Everything you need to set up real-time collaboration for your Claude Code team.
No global install needed. Everything runs via npx.
# Recommended — opens browser, authenticates, auto-configuresnpx @agent-town/cli login# Alternative — manual setup for self-hosted relaysnpx @agent-town/cli init
The login command handles everything automatically. If you're self-hosting, use init instead — you'll be asked for:
Config is saved to ~/.agent-town/config.json.
npx @agent-town/cli setup-claude
This does three things automatically:
~/.claude.jsonOnce set up, just talk to Claude. No special syntax.
"who's on the team right now?""claim src/auth/login.ts""protect src/api/ — major refactor""is utils.ts safe to edit?""tell the team: don't merge, migration running""what changed in the last hour?"
Claude calls the right tools automatically based on your request.
Agent Town provides 10 MCP tools:
get_team_statusWho's online, their branch, active files
check_file(path)Pre-edit safety check — locks, zones, nearby edits
claim_file(path)Mark a file as being edited by you
release_file(path)Release your lock
claim_zone(pattern, reason?)Protect a directory from other agents
release_zone(pattern)Remove zone protection
get_activity(limit?)Recent changes across the team
send_message(message)Send a message to all teammates
get_messagesRead pending messages
get_conflictsCheck for active conflicts
Zones protect entire directories. Useful during refactors.
"protect src/auth/** — rewriting auth module"# Anyone editing inside gets warned:# 🚫 File is inside protected zone src/auth/**# claimed by Tim (rewriting auth module)"release the src/auth/ zone"
Supported patterns:
src/api/** — everything inside src/api/src/api/ — directory prefix matchsrc/api/routes.ts — exact fileZones are advisory (warn, never block) and auto-release on disconnect.
Agent Town detects your git branch automatically and reports it to teammates.
The relay is open source. Run your own:
# Dockerdocker build -t agent-town-relay .docker run -p 8787:8787 agent-town-relay# Without Dockergit clone https://github.com/the-noname-devs/agent-town.gitcd agent-town && pnpm install && pnpm buildpnpm --filter @agent-town/relay start
Then point your agents to your server:
npx @agent-town/cli init# Relay URL: ws://your-server:8787
Requirements: Node.js 20+, ~50MB RAM. No database needed.