Self-hosted Claude Code for teams

Your team's interface for Claude Code

Multi-user web interface that wraps Claude CLI with real-time collaboration, session management, git checkpoints, and a powerful chat UI.

Built with Next.js 16, React 19, SQLite, and PartyKit

magi — acme-project
3 online
alice4 min ago

Refactor the auth module to use JWT tokens and add refresh token rotation.

claudedone

Done. Refactored auth to use JWT with refresh token rotation. All existing tests pass.

Edited src/lib/auth.ts (+47, -23)
Ran pnpm test — 24 passed
bob1 min ago

@alice nice, can you also add rate limiting to the login endpoint?

Claude is thinking...
carol is typing…
Type a message...Enterto send

How it works

Four steps from install to collaborative coding. No external databases, no complex setup — just a Next.js app, Claude CLI, and a YAML file.

01

Configure your projects

Define projects, users, and permissions in a simple YAML config. Multi-project support with per-user token auth out of the box.

02

Invite your team

Share token links with your team. Three permission levels — read, chat, and exec — give you fine-grained control over who can do what.

03

Chat with Claude Code

Send prompts through a polished chat UI. Magi spawns Claude CLI as a subprocess, streams responses in real-time, and saves everything to SQLite.

04

Collaborate in real-time

See who's online, get @mentioned, fork sessions, create checkpoints, and pick up where anyone left off. All synced via WebSockets.

Everything you need to ship with Claude Code as a team

Session forking, git checkpoints, real-time sync, output sanitization, MCP integration — all in a single self-hosted app.

Real-time Sync

PartyKit WebSockets power live presence indicators, typing status, and instant message delivery across all connected clients.

Session Management

Fork any session from any message. Create git-backed checkpoints before each run. Restore code, conversation, or both. Full audit trail.

Git Integration

Auto-checkpoints use git shadow branches to snapshot your codebase. View diffs with syntax highlighting. Roll back with confidence.

AI Suggestions

After each response, a fast Haiku call generates contextual follow-up prompts. Response presets and suggested prompts accelerate workflows.

Output Sanitization

Secrets, API keys, and tokens are automatically redacted from Claude's output stream. Regex-based pattern matching with word-boundary buffering.

MCP Server

Magi exposes itself as an MCP server — list sessions, get history, create sessions, and trigger prompts programmatically from any MCP client.

Real-time chat

magi — acme-project
alice:@claude refactor the auth module to use JWT
claude:I'll refactor the auth module. Let me start by reading the current implementation...
Claude is working...

Session management

Sessions
Auth refactor
alice
API migration
bob
Fix pagination
alice

Git diffs

src/lib/auth.ts
- const token = req.headers.authorization;
+ const token = validateToken(req.headers.authorization);
- if (!token) return null;
+ if (!token) throw new AuthError("Invalid token");

Built for developers who move fast

Keyboard-first navigation, plan mode for safe exploration, @mentions for async handoffs, and a status workflow that keeps sessions organized.

01.
@Mentions & Notifications
@username detection in messages with colored highlights, stored notifications, and real-time broadcast. Claude is instructed to mention users by name.
02.
Plan Mode
The /plan prefix activates read-only mode — Claude can analyze but not modify. Perfect for architecture reviews and code exploration.
03.
Keyboard-First
Cmd+K command palette, Alt+J/K message navigation, Ctrl+C abort, session switching with Ctrl+1-9. Built for developers who live in the terminal.
04.
Web Preview
Embed your dev server in an iframe panel. Clickable URLs in messages navigate the preview. Resizable, persistent state across sessions.
05.
Session Search
Search across all session titles and message content. Filter by participant, status, or action-needed-by. Find anything instantly.
06.
Status Workflow
Five statuses track session lifecycle: in_progress, in_review, completed, reflected, abandoned. Full audit trail of who changed what and when.
Security-first

Defense in depth, not security theater

Three permission tiers, dual-layer tool restrictions, automatic secret redaction, and command injection prevention. Magi is built so teams can give Claude Code access without worrying about what it might leak or break.

3 permission tiers
Read-only, interactive with prompts, or full auto-approve
Tool restrictions
Dual-layer deny rules block dangerous operations
Injection prevention
Array args, no shell interpolation of user input
Secret redaction
AWS, Stripe, GitHub, SSH keys auto-redacted
Safety warnings
System prompt blocks dev server restarts, port listeners
Command filtering
CLI-only slash commands blocked in web UI

Modern stack, zero lock-in

Built on proven open-source tools. SQLite for storage, PartyKit for real-time, Next.js for the frontend. No external databases, no vendor dependencies.

Next.js 16
App Router
React 19
Server Components
SQLite
better-sqlite3 + Drizzle
PartyKit
WebSockets
Zustand
Client state
TanStack Query
Server state
Tailwind CSS 4
Styling
Vitest
Testing

Frequently asked questions

Everything you need to know about running Magi for your team.

Give your team a shared workspace for Claude Code

Self-hosted, open-source, and ready to deploy. Clone the repo, add your config, and start collaborating in minutes.

View on GitHubsoon