mcp-based tmux session enumeration and introspection
Exposes tmux session hierarchy through MCP resource protocol, allowing AI assistants to discover and inspect all active sessions with metadata including session names, window counts, creation timestamps, and attachment status. Implements resource subscription pattern via @modelcontextprotocol/sdk to enable real-time session state synchronization and dynamic resource updates when sessions are created or destroyed.
Unique: Implements MCP resource protocol for tmux introspection rather than simple command wrapping, enabling Claude Desktop to maintain a persistent view of session state through resource subscriptions and change notifications. Uses tmux list-sessions with format strings to extract structured metadata without parsing text output.
vs alternatives: Provides standardized MCP integration for Claude Desktop whereas shell scripts or REST APIs require custom integration work; resource-based architecture enables real-time state awareness vs polling-based alternatives.
asynchronous command execution with deferred result retrieval
Executes shell commands in tmux panes without blocking the MCP server, returning a command ID immediately and allowing result retrieval via separate resource lookup. Implements fire-and-forget execution pattern with optional polling via tmux://command/{commandId}/result resources, supporting both synchronous workflows (wait for completion) and asynchronous patterns (fire and check later). Handles shell-specific exit code detection through configurable --shell-type parameter to correctly identify command success/failure across bash, zsh, and fish.
Unique: Decouples command execution from result retrieval through MCP resource protocol, enabling non-blocking execution patterns where the AI assistant can fire commands and poll results independently. Uses shell-specific exit code markers (e.g., echo $? for bash) to reliably detect command completion and success status across different shell environments.
vs alternatives: Provides true asynchronous execution with deferred result retrieval vs synchronous SSH/exec alternatives that block until completion; shell-type configuration ensures accurate exit code detection across heterogeneous environments vs generic command wrappers that assume single shell type.
interactive pane content capture with color preservation
Captures the current visible content of a tmux pane with optional ANSI color code preservation, enabling AI assistants to read terminal output including colored text, syntax highlighting, and styled formatting. Implements configurable capture modes via capture-pane tool that can preserve raw ANSI escape sequences or strip them for plain text, supporting both human-readable colored output and machine-parseable plain text depending on use case. Handles pane history buffer retrieval to capture scrollback content beyond the visible viewport.
Unique: Provides dual-mode capture (colored vs plain text) via single tool interface, allowing AI assistants to choose between human-readable colored output and machine-parseable plain text. Uses tmux capture-pane with -p (print) and -S (start line) flags to efficiently retrieve both visible viewport and scrollback history without spawning separate processes.
vs alternatives: Preserves ANSI color codes for semantic understanding vs plain text alternatives that lose formatting context; supports scrollback history retrieval vs simple screen capture that only shows visible content.
pane lifecycle management with split and kill operations
Creates, splits, and destroys tmux panes within windows through MCP tools, enabling AI assistants to dynamically manage terminal layout and organize command execution across multiple panes. Implements split-pane operation with configurable split direction (horizontal/vertical) and target pane selection, allowing creation of new panes for parallel execution. Supports pane destruction via kill-pane tool with optional confirmation to prevent accidental data loss.
Unique: Exposes tmux pane splitting and killing as MCP tools with structured input/output, enabling AI assistants to programmatically manage terminal layout without shell command knowledge. Uses tmux split-window and kill-pane commands with format string parsing to return new pane identifiers for subsequent operations.
vs alternatives: Provides structured pane management vs manual tmux commands that require shell knowledge; enables dynamic layout creation during AI workflows vs static pre-configured layouts.
raw mode command execution for interactive applications
Executes commands in tmux panes with raw mode enabled, allowing interactive applications like REPLs, text editors, and TUI tools to receive input and maintain state across multiple interactions. Implements key injection without automatic Enter appending, enabling navigation of interactive menus and TUI applications through arrow keys and special characters. Maintains pane state between command invocations, allowing AI assistants to interact with long-running interactive sessions (Python REPL, Node REPL, vim, etc.).
Unique: Supports raw mode execution with key injection without Enter, enabling stateful interaction with interactive applications vs simple command execution that assumes line-based input. Maintains pane state across multiple invocations, allowing AI assistants to build multi-turn conversations with REPLs and interactive tools.
vs alternatives: Enables interactive REPL workflows vs batch command execution that cannot maintain state; key injection without Enter supports TUI navigation vs line-based alternatives limited to simple commands.
window lifecycle management with creation and destruction
Creates and destroys tmux windows within sessions through MCP tools, enabling AI assistants to organize command execution across multiple windows within a single session. Implements window creation with optional command execution in the new window, allowing immediate setup of new windows for specific tasks. Supports window destruction via kill-window tool with proper cleanup of all contained panes.
Unique: Exposes tmux window creation and destruction as MCP tools with structured input/output, enabling AI assistants to organize workflows across multiple windows without shell command knowledge. Uses tmux new-window and kill-window commands with format string parsing to return window identifiers.
vs alternatives: Provides structured window management vs manual tmux commands; enables dynamic window creation during workflows vs static pre-configured layouts.
session lifecycle management with creation, discovery, and termination
Creates, discovers, and destroys tmux sessions through MCP tools and resources, enabling AI assistants to manage the top-level session hierarchy. Implements session creation with optional initial command and window setup, session discovery via list-sessions and find-session tools with metadata extraction, and session termination via kill-session. Uses tmux list-sessions with format strings to extract structured metadata (session name, window count, creation time, attachment status) without text parsing.
Unique: Implements MCP resource protocol for session discovery with structured metadata extraction via format strings, enabling AI assistants to maintain awareness of session state without text parsing. Supports session creation with initial command setup, allowing immediate task execution in new sessions.
vs alternatives: Provides structured session management vs manual tmux commands; format string-based metadata extraction is more reliable than text parsing for session discovery.
mcp protocol server implementation with stdio transport
Implements a complete MCP server using @modelcontextprotocol/sdk that exposes tmux functionality through standardized MCP primitives (tools, resources, prompts). Operates as a Node.js process communicating with Claude Desktop via stdio transport, translating MCP protocol requests into tmux commands and returning structured responses. Declares server capabilities including resource subscription support, tool change notifications, and logging, enabling dynamic resource updates and real-time state synchronization.
Unique: Implements full MCP server specification with resource subscription support and capability declaration, enabling Claude Desktop to maintain persistent awareness of tmux state. Uses stdio transport for communication, allowing seamless integration with Claude Desktop's MCP client without network configuration.
vs alternatives: Provides standardized MCP integration vs custom Claude plugins that require separate maintenance; resource subscription enables real-time state awareness vs polling-based alternatives.
+2 more capabilities