zswarm-mcp
Provides tools for managing git worktrees, including spawning panes with worktrees, listing/removing worktrees, and inspecting diffs or creating checkpoints.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@zswarm-mcpspawn a codex agent in a new worktree called feature-login"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
zSwarm
Coordinate CLI AI crews across Zellij terminal panes. Control agents, pass prompts between panes, manage git worktrees, inspect outputs, and sync crew tasks via CLI or Model Context Protocol (MCP).
you ──▶ any agent ──┐
│ zswarm({op:"send", to:"reviewer"})
▼
every pane can call zswarm ──▶ ┌─────────┐
so agents drive each other │ zswarm │
│ cli/mcp │
└────┬────┘
paste + Enter ┌────┴────┐ read screen / pushed state
▼ ▼
══ this machine ══════════════════════════════╗ ══ ssh user@build-01 ═════════╗
zellij "crew" ║ zellij "ci" ║
║ ║
┌────────────┐ send ┌────────────┐ ║ ┌────────────┐ ║
│ codex │────────▶│ claude │───────╫──▶│ opencode │ ║
│ builder │◀────────│ reviewer │ send ║ │ test-runner│ ║
│ wt:feat-a │ signal │ wt:rev-a │ ║ │ wt:feat-a │ ║
└────────────┘ └────────────┘ ║ └──────┬─────┘ ║
┌────────────┐ ┌────────────┐ ║ ┌──────▼─────┐ ║
│ cursor │ │ agy │ ║ │ pi │ ║
│ refactor │ │ docs │ ║ │ deploy │ ║
│ wt:feat-b │ │ wt:docs │ ║ │ cwd:/srv │ ║
└────────────┘ └────────────┘ ║ └────────────┘ ║
═══════════════════════════════════════════════╝ ══════════════════════════════╝
one pane = one agent + one role + optionally its own worktree
any pane can drive any other, on this machine or across the ssh boundary⚡ Quick Start
Requirements
Zellij ≥ 0.42 on
PATH(or setZSWARM_BIN/ZSWARM_PATH)Node.js ≥ 20
Installation
npm i -g zswarm
zswarm listEnable the optional Zellij event-bus plugin once per machine for zero-polling state updates:
zswarm bus --installMCP Server Setup
Configure zswarm-mcp (stdio MCP server bundled with the package) in your MCP host:
{
"mcpServers": {
"zswarm": {
"command": "/absolute/path/to/zswarm-mcp",
"env": {
"ZSWARM_SESSION": "my-zellij-session"
}
}
}
}Note: Use the absolute path to
zswarm-mcpand specifyZSWARM_SESSIONto prevent ambiguous session errors when multiple Zellij sessions run.
Related MCP server: multi-agent-mcp
Usage & Quick Syntax
Every operation is supported both via CLI (zswarm <op> [flags]) and MCP (zswarm({ op: "<op>", ... })).
Essential Examples
# 1. Inspect Panes & Status
zswarm list # List active panes
zswarm status # Check status: busy | waiting | idle | exited
# 2. Spawn Panes & Worktrees
zswarm spawn --command "claude" --name reviewer # Spawn agent pane
zswarm spawn --command "codex" --worktree feature-auth --name auth-dev # Isolated git worktree pane
# 3. Pass Prompts & Input
zswarm send --to reviewer --body "Review changes in src/" --submit auto
zswarm keys --to reviewer --key "Ctrl c" # Send special keys / interrupts
# 4. Read Outputs & Wait
zswarm dump --to reviewer --max 4000 # Read recent screen tail
zswarm tail --to reviewer # Incremental read since last check
zswarm wait --to reviewer --match "DONE" # Block until pattern matched or pane idle
# 5. Coordinate Crew & Sync Signals
zswarm broadcast --all --group builder --body "Run test suite" # group matches pane title or command
zswarm signal --channel tests --payload ok # Send signal to durable channel
zswarm await --channel tests --count 3 # Wait for 3 worker signals📋 Operations Reference
Operation | Purpose | Key Parameters / Flags |
| List panes or live Zellij sessions |
|
| Panes classified by state ( |
|
| Launch command in new pane, tab, or git worktree |
|
| Send text / prompt into a pane |
|
| Read screen content (screen tail) |
|
| Incremental screen read since last cursor |
|
| Block until quiet, pattern match, or idle |
|
| Send one prompt to multiple panes |
|
| Send key combos ( |
|
| Close a pane |
|
| Durable message channels & barrier sync |
|
| List or remove managed git worktrees |
|
| Inspect peer worktree patch or autocommit WIP |
|
| Retitle pane/tab or focus pane |
|
| Inspect tabs, layout KDL, or stack panes |
|
| Event bus plugin management & delivery log |
|
🛡️ Safety & Policy Guards
Self-Target Guard: Operations refuse to modify zSwarm's own pane (
allowSelf: trueto override).Execution & Exited Guards: Prevents writing to exited panes (
force: trueto override).Prompt Safety (
expect):send --expect <text>ensures target pane screen contains<text>before writing (prevents accidental shell execution).Submission Verification (
submit):autoverifies text submission into TUI composers and retries Enter if unsubmitted.
Environment Security Controls
Env Variable | Effect |
| Disable all write ops ( |
| Comma-separated list/patterns of allowed/denied pane titles |
| Disable spawning new panes |
| Disable closing panes |
| Disable removing git worktrees |
⚙️ Environment Variables
Variable | Description |
| Path to |
| Default Zellij session name |
| Active Zellij session (set automatically inside Zellij panes) |
| Directory for linked worktrees (default: |
| State storage directory for logs, signals, and cursors (default: |
|
|
📦 Monorepo Structure
Package | Purpose |
| Main meta-package ( |
| Core Zellij client and shared dispatch engine |
|
|
| Stdio MCP server ( |
| Precompiled Rust event-bus WASM plugin |
| Extension bridge for harnesses without native MCP support |
📜 License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceEnables comprehensive management of Zellij terminal workspace sessions, including session, pane, tab, plugin, layout operations, and LLM completion detection.22
- AlicenseBqualityBmaintenanceManages multiple AI CLI instances (Claude Code, Codex, Gemini, Cursor) in tmux sessions for parallel task execution, with optional git worktree support.90MIT
- Flicense-qualityDmaintenanceEnables AI agents to spawn, interact with, and orchestrate multiple concurrent terminal sessions via tmux.
- Flicense-qualityDmaintenanceEnables orchestration of multiple AI coding agents (Claude Code, Gemini CLI, etc.) in isolated Wezterm panes, allowing one agent to spawn, monitor, and communicate with others across projects.251
Related MCP Connectors
Git-backed platform for skills, tools, and context for AI agents
Cross-agent artifact workspace with provenance across Claude Code, Codex, Cursor, LangGraph.
Create and manage AI agents that collaborate and solve problems through natural language interacti…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/brandonkramer/zswarm'
If you have feedback or need assistance with the MCP directory API, please join our Discord server