Claude Fleet Monitor
Enables switching to the exact Konsole tab of a monitored session using QDBus, and raising the window on other terminals.
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., "@Claude Fleet Monitorwhat sessions are running?"
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.
Claude Fleet Monitor
Fleet monitoring for Claude Code sessions. See all your running sessions at a glance, get notified when one needs input, and jump to the right terminal tab instantly.
Features
TUI Dashboard -- Textual-based interactive UI with search/filter, status-colored rows, and click-to-focus
tongs Plugin -- embeds as a screen in tongs via the TongsPlugin ABC
Process Discovery -- finds running sessions cross-platform even before hooks fire
MCP Server -- any Claude session can query fleet status programmatically
Terminal Focus -- switch to a session's tab and raise the window, across 8 supported terminals
Desktop Notifications --
notify-sendalerts when a session has been idle for over 2 minutesHooks Integration -- Claude Code hooks emit real-time status (running, idle, waiting, error) per session
Per-Session Terminal Detection -- each session captures its terminal type at hook time, not at focus time
Related MCP server: claude-code-mcp
Supported Terminals
Terminal | Tab Switching | Window Raise | Nested Support |
KDE Konsole | Yes (qdbus) | Yes (KWin) | -- |
tmux | Yes (tmux CLI) | Via parent terminal | Yes |
zellij | Yes (zellij CLI) | Via parent terminal | Yes |
GNOME Terminal | No | Yes (xdotool) | -- |
iTerm2 | Yes (osascript) | Yes (osascript) | -- |
macOS Terminal | Yes (osascript) | Yes (osascript) | -- |
Windows Terminal | No | Yes (pywinctl) | -- |
Generic fallback | No | Best effort | -- |
Nested terminals (e.g. tmux inside Konsole) are handled automatically: the focus command switches the tmux pane, then detects the parent terminal via process tree walking and raises that window too.
Install
pip install claude-fleet-monitor
claude-fleet installOr install from source:
git clone https://github.com/andre-motta/claude-fleet-monitor.git
cd claude-fleet-monitor
pip install .
claude-fleet installRestart your Claude Code sessions after the first install to activate hooks.
tongs Integration
To use the fleet monitor as a plugin inside tongs:
pip install claude-fleet-monitor[tongs]Then launch tongs and open the command palette (Ctrl+P) to find "Fleet Monitor".
Upgrading
pip install --upgrade claude-fleet-monitorNo need to re-run claude-fleet install or restart sessions. Hooks and MCP server point to pip-installed entry points, so upgrades take effect immediately.
Dependencies
python3>= 3.10textual>= 1.0
Optional (for terminal focus):
qdbus-- Konsole tab switching (KDE)xdotool-- GNOME Terminal / X11 window focuspywinctl-- Windows Terminal window focusnotify-send-- desktop notifications (Linux)
Usage
TUI Dashboard
claude-fleet monitor # default 2s refresh
claude-fleet monitor --refresh 5 # 5s refreshNavigate with arrow keys or mouse. Press Enter or click a row to focus that session's terminal. Press / to search/filter by repo name, detail, or status. Press q to quit.
Focus a Session
claude-fleet focus autofix # by repo name
claude-fleet focus 2467709 # by PID
claude-fleet focus abc123 # by session ID prefixThe focus command reads the session's stored terminal type and uses the right API. Works across Konsole, tmux, iTerm2, and others.
Quick Status (no TUI)
claude-fleet statusMCP Tools
Any Claude Code session with the fleet MCP server can use these tools:
Tool | Description |
| All sessions with summary counts |
| Single session detail by ID or prefix |
| Sessions idle over 2 minutes or waiting for input |
| Focus terminal tab for a session |
| Remove stale ended session files |
Just ask Claude: "what sessions are running?" or "focus on the autofix session".
How It Works
<-- MCP server
Claude Code sessions --\ <-- TUI monitor
(hooks per event) |-- write --> ~/.claude/fleet/*.json <-- tongs plugin
/ <-- CLI status
(process discovery) - <-- focus commandHooks fire on Claude Code events (start, prompt, tool use, stop, permission request, end)
Each hook captures the session's terminal type and PID, writes to
~/.claude/fleet/Process discovery scans for
claudeprocesses cross-platform to find sessions without hooksConsumers (TUI, MCP, tongs plugin, CLI, focus) read the JSON files
Focus reads the session's
terminalfield and dispatches to the right terminal API
Terminal Detection Flow
Hook fires inside session
--> detect terminal via env vars (TMUX, KONSOLE_VERSION, ITERM_SESSION_ID, ...)
--> capture terminal-specific env (socket paths, DBus service, session IDs)
--> store in fleet JSON: {"terminal": "tmux", "terminal_env": {"TMUX": "..."}}
Focus command reads session JSON
--> get_terminal_api("tmux") --> TmuxAPI
--> find_tab(pid) --> switch_tab() --> raise_window()
--> for nested terminals: detect parent terminal, chain to parent APISession States
State | Meaning |
| Session just began |
| Processing a prompt or using tools |
| Finished responding, waiting for next prompt |
| Blocked on permission request or user input |
| Turn failed (API error) |
| Session closed |
| Found via process scan, no hook data yet |
Architecture
src/claude_fleet_monitor/
models.py # SessionStatus enum, FleetSession dataclass
hook.py # Claude Code hook handler
discovery.py # Process discovery, session file I/O
tui.py # Textual standalone app (FleetMonitorApp)
cli.py # claude-fleet CLI entry point
focus.py # Session lookup + terminal focus dispatch
mcp_server.py # FastMCP server
tongs_plugin.py # TongsPlugin ABC implementation
widgets/
session_table.py # SessionTable(DataTable) widget
views/
fleet_screen.py # FleetScreen(Screen) for tongs
terminal_apis/
base.py # TerminalAPI ABC
konsole.py # KDE Konsole
tmux.py # tmux
zellij.py # zellij
gnome.py # GNOME Terminal
iterm2.py # iTerm2
macos_terminal.py # macOS Terminal.app
windows_terminal.py # Windows Terminal
generic.py # FallbackKnown Limitations
Same-name tabs in different windows (Konsole/KDE): When multiple sessions share the same repo name and live in different Konsole windows, the focus command will switch to the correct tab but may raise the wrong window. Workaround: keep same-name sessions grouped in the same Konsole window.
Wayland window activation: On Wayland/KDE, window raising uses KWin scripting via DBus. Other Wayland compositors may not support programmatic window activation.
GNOME Terminal / Windows Terminal: No tab switching API available; window raise only.
Configuration
Environment Variables
Variable | Default | Description |
|
| Directory for session status files |
Uninstall
claude-fleet uninstall # removes everything including data
claude-fleet uninstall --keep-data # keeps ~/.claude/fleet/Contributing
See CONTRIBUTING.md for development setup, code style, and PR process.
License
MIT
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-qualityCmaintenanceEnables running interactive terminals inside Claude Code and Claude Desktop, supporting multiple sessions for different tasks.Last updated1
- AlicenseAqualityDmaintenanceWraps Claude Code as tools for MCP clients, enabling autonomous coding tasks via a 4-tool lifecycle with session management, async polling, and permission controls.Last updated415617MIT
- Alicense-qualityCmaintenanceEnables MCP clients to spawn and control Codex CLI and Claude Code sessions on the host machine, with session management and filesystem access.Last updated4MIT
- Flicense-qualityDmaintenanceEnables interactive terminal sessions within Claude Code and Desktop, allowing users and AI to execute commands and manage multiple tabs.Last updated2
Related MCP Connectors
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
Manage SRG+ hubs, channels, content, assets, users, and workspaces from any MCP-aware AI agent.
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/andre-motta/claude-fleet-monitor'
If you have feedback or need assistance with the MCP directory API, please join our Discord server