Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

tmux-mcp

MCP.Pizza Chef: nickgnd

tmux-mcp is a Model Context Protocol server that integrates with the tmux terminal multiplexer, allowing AI assistants like Claude Desktop to view, control, and interact with tmux sessions, windows, and panes. It supports listing sessions, navigating panes, capturing terminal content, executing commands, and creating new sessions, providing real-time terminal context for enhanced AI workflows.

Use This MCP server To

List and search active tmux sessions for terminal management View and navigate tmux windows and panes via AI interface Capture terminal output from any tmux pane for analysis Execute shell commands inside tmux panes and retrieve results Create new tmux sessions and windows programmatically Enable AI assistants to monitor and control terminal workflows Integrate terminal session data into AI-enhanced developer tools

README

Tmux MCP Server

Model Context Protocol server that enables Claude Desktop to interact with and view tmux session content. This integration allows AI assistants to read from, control, and observe your terminal sessions.

Features

  • List and search tmux sessions
  • View and navigate tmux windows and panes
  • Capture and expose terminal content from any pane
  • Execute commands in tmux panes and retrieve results (use it at your own risk ⚠️)
  • Create new tmux sessions and windows

Check out this short video to get excited!


youtube video

Prerequisites

  • Node.js
  • tmux installed and running

Usage

Configure Claude Desktop

Add this MCP server to your Claude Desktop configuration:

"mcpServers": {
  "tmux": {
    "command": "npx",
    "args": ["-y", "tmux-mcp"]
  }
}

MCP server options

You can optionally specify the command line shell you are using, if unspecified it defaults to bash

"mcpServers": {
  "tmux": {
    "command": "npx",
    "args": ["-y", "tmux-mcp", "--shell-type=fish"]
  }
}

The MCP server needs to know the shell only when executing commands, to properly read its exit status.

Available Resources

  • tmux://sessions - List all tmux sessions
  • tmux://pane/{paneId} - View content of a specific tmux pane
  • tmux://command/{commandId}/result - Results from executed commands

Available Tools

  • list-sessions - List all active tmux sessions
  • find-session - Find a tmux session by name
  • list-windows - List windows in a tmux session
  • list-panes - List panes in a tmux window
  • capture-pane - Capture content from a tmux pane
  • create-session - Create a new tmux session
  • create-window - Create a new window in a tmux session
  • execute-command - Execute a command in a tmux pane
  • get-command-result - Get the result of an executed command

tmux-mcp FAQ

How do I install tmux-mcp?
Install Node.js and tmux, then run 'npx -y tmux-mcp' or configure it in Claude Desktop as specified.
Can tmux-mcp execute commands in my terminal?
Yes, it can execute commands in tmux panes and return results, but use this feature cautiously.
What prerequisites are needed for tmux-mcp?
You need Node.js installed and a running tmux environment on your system.
How does tmux-mcp integrate with AI assistants?
It exposes tmux session content and controls via MCP, enabling AI models like Claude, GPT-4, and Gemini to interact with terminal sessions.
Is tmux-mcp limited to any specific shell?
You can optionally specify your command line shell when configuring tmux-mcp for better compatibility.
Can I create new tmux sessions using tmux-mcp?
Yes, the server supports creating new tmux sessions and windows programmatically.
Is it safe to allow AI to execute commands in tmux panes?
While powerful, executing commands carries risk; ensure you trust the AI and environment before enabling this feature.
Does tmux-mcp support multiple tmux sessions simultaneously?
Yes, it can list, search, and interact with multiple tmux sessions concurrently.