Skip to main content
Glama

claude-tmux

npm version

MCP server for orchestrating multiple Claude Code instances via tmux.

Installation

Add to your Claude Code MCP settings:

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

Requirements

Related MCP server: cmuxlayer

Tools

spawn

Launch a new Claude Code instance in a tmux session.

spawn(name, prompt, workdir)
  • name: Unique session name (e.g., 'refactor-auth', 'debug-api')

  • prompt: Initial prompt to send to Claude

  • workdir: Working directory for Claude to operate in

read

Wait for Claude sessions to finish working and return terminal output.

read(name: "task-name")           // single session
read(names: ["a", "b", "c"])      // parallel wait on multiple sessions

For multiple sessions, use names to wait in parallel - returns all outputs when all complete.

send

Send a follow-up message to a running Claude session.

send("task-name", "do something else")

list

List all active Claude tmux sessions.

list()

kill

Terminate a Claude tmux session and clean up resources.

kill("task-name")

Usage Pattern

spawn(name, prompt, workdir)  → start session
read(name)                    → wait for completion, get output
send(name, text)              → steer with follow-up
read(name)                    → wait again
kill(name)                    → cleanup

For parallel tasks:

spawn("task-a", ...)
spawn("task-b", ...)
spawn("task-c", ...)
read(names: ["task-a", "task-b", "task-c"])  → wait for all

Idle Detection

read detects completion via:

  1. Done indicator - Claude's status line showing ✻ model for Xm

  2. Stability - Output unchanged for 10 seconds (handles sub-minute tasks that don't show the indicator)

Timeout is 15 minutes.

Tips

  • Verify output shows task completion before killing. Idle agents are fine to leave running.

  • Attach manually: tmux attach -t claude-<name>

Available Tools

5 tools
killC

Terminate a session.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesSession name (as provided to spawn)

TDQS

C2.7/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of disclosing side effects, and it fails to do so. 'Terminate a session' reveals the basic action but says nothing about whether the termination is graceful or forceful, whether it affects child processes, whether it requires confirmation, or what happens to the session state. This is essentially a synonym for the tool name and adds no behavioral detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with no fluff or repetitive content. It is front-loaded and every word contributes to the core meaning. The structure is appropriately minimal for the simplicity of the operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite the tool's simplicity, the description lacks essential context such as return behavior, error handling, or side effects. There is no output schema to fill in the gaps, and the description does not address what happens when the session is successfully terminated or if the name is invalid. An agent would have to infer or experiment to understand the full behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'name' clearly documented as 'Session name (as provided to spawn)'. The tool description adds no parameter information, but the schema already provides sufficient meaning. The baseline of 3 applies because the schema handles the semantic load.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Terminate a session' uses a specific verb and a clear resource, which plainly identifies the tool's core action. It distinguishes itself from the siblings (spawn, read, send, list) by indicating destruction rather than creation, inspection, or communication. It is concise and not a tautology, though it does not explicitly name the sibling it contrasts with.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives, such as when a session should be ended gracefully or what to check before killing. The description only states the action, leaving the agent to infer usage from the schema and context. No exclusions, prerequisites, or alternative routing are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

listA

List active sessions.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the burden of behavioral disclosure. 'List active sessions' conveys a read-only enumeration behavior and the filtering to active sessions, but it does not mention output format, whether inactive sessions are omitted, or any side effects. For a simple list tool this is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no wasted words. Every word earns its place and the core behavior is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with no output schema, the description is largely sufficient: an agent knows the action and the target resource. Some ambiguity remains about what 'sessions' refers to and what the return payload looks like, but the sibling names provide enough contextual grounding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and the schema coverage is 100%, so no parameter documentation is needed. The description adds nothing about parameters, but nothing is required; this matches the baseline for a no-parameter tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action (list) and resource (active sessions), making its core purpose clear. It does not explicitly differentiate itself from sibling tools, but the verb 'list' is distinct from spawn/read/send/kill.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool should be used when you need to view currently active sessions, but it provides no explicit conditions, exclusions, or comparison with alternatives. There is no guidance about when list would be inappropriate or when a sibling tool should be used instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

readA

Wait for Claude sessions to finish working and return their terminal output. Use 'names' for parallel waiting on multiple sessions.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNoSession name (as provided to spawn)
namesNoMultiple session names for parallel waiting (preferred for multiple sessions)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description carries the full burden. It discloses the blocking/waiting behavior and that output is returned, but does not mention timeouts, failure modes, or what happens if a session never finishes. This is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences with no filler. The primary behavior is stated first, and the parallel-waiting guidance is added in the second sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-style tool with simple parameters and no output schema, this is mostly complete. It states what the tool returns and how to wait. Minor gaps around error handling and timeout behavior prevent a 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and both parameters are described. The description adds a slight preference for 'names' in parallel scenarios, but that is already implied by the schema's 'preferred for multiple sessions' note. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('wait for Claude sessions to finish working') and the result ('return their terminal output'). It is specific and distinct from siblings like spawn, send, kill, and list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives an explicit usage preference: 'Use \'names\' for parallel waiting on multiple sessions.' It does not explicitly state when to avoid this tool or mention alternatives, but the sibling set is clear enough that no confusion is likely.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sendA

Send a message to a running session.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesSession name (as provided to spawn)
textYesMessage to send to Claude

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Send' indicates an action but does not explain side effects, behavior if the session is not running, whether a response is returned, or whether the message is delivered asynchronously.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that states the action and target with no filler or redundant wording. It earns every word it uses.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple and the schema covers both parameters, but the description omits useful operational context such as what happens when sending to a non-running session, whether output is returned, or how this relates to the session lifecycle managed by sibling tools. It is minimally viable but not complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for name and text. The tool description itself adds no parameter details, but the schema already documents the parameters sufficiently, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: 'send a message to a running session.' This clearly distinguishes it from sibling tools spawn, read, kill, and list, which create, observe, terminate, or enumerate sessions rather than interact with them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'to a running session' implies the session must already exist, so an agent can infer it should be used after spawn and not for creating or killing sessions. However, it gives no explicit when-to-use guidance, exclusions, or pointers to alternative tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

spawnB

Start a Claude Code instance in a tmux session.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesUnique session name (e.g., 'refactor-auth', 'debug-api')
promptYesInitial prompt to send to Claude on startup
workdirYesWorking directory for Claude to operate in

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It does convey a meaningful detail (tmux session), which suggests a detached, long-running process, but it omits important behaviors: whether the call blocks or returns immediately, what happens if the session name is already taken, whether the process runs in the background, and how the agent later knows the session is ready for interaction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, tightly worded sentence that gets straight to the point: verb, resource, and medium. No filler words, no redundant restatement of the tool name, and the key behavior (starting in tmux) is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that launches an external process, the description is too thin. It does not say what the tool returns, whether it is asynchronous, how to confirm startup, or how the session is subsequently managed. The rich parameter schema covers only input semantics; the absence of an output schema and annotations makes these gaps more significant.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. Each parameter already has a clear schema description (unique session name, initial prompt, working directory). The tool description adds nothing beyond what the schema provides, but it does not need to since the schema is already explicit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Start'), a concrete resource ('a Claude Code instance'), and a distinct delivery mechanism ('in a tmux session'). It clearly distinguishes itself from the sibling tools (read, send, kill, list), which all operate on already-running sessions rather than creating one.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance is given on when to use this tool versus the siblings. The description implies it is the entry point for creating a session, but it never states that send/read/kill/list are for interacting with the spawned session, nor does it mention any prerequisites or conditions that would make an alternative preferable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv1.0.18
    • First observedkill
    • First observedlist
    • First observedread
    • First observedsend
    • First observedspawn

TDQS

A3.7/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct lifecycle role: spawn creates, send communicates, read collects output, kill terminates, and list enumerates sessions. There is no overlap or ambiguity between their purposes.

Naming Consistency5/5

All tool names are simple, lowercase imperative verbs following a consistent one-word pattern. This is internally coherent and easy to predict.

Tool Count5/5

Five tools cover the essential operations for managing tmux-based Claude Code sessions without redundancy. The scope is tight and each tool earns its place.

Completeness5/5

The set covers the complete session lifecycle: create, interact, read output, enumerate, and terminate. There are no obvious gaps for the stated domain of managing Claude Code instances in tmux.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Terminal multiplexer MCP server for orchestrating parallel AI agents. Manages workspaces, panes, surfaces with send_input/read_screen/spawn_agent/stop_agent tools. Supports Claude Code, Codex, Gemini, Cursor CLI agents with lifecycle management, browser automation, and agent status push via Claude --channels.
    20
    26
    Apache 2.0
  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that gives orchestrator agents fine-grained control over interactive Claude Code sessions running inside tmux, enabling mid-session steering, interruption, and token-efficient result extraction.
    15
    MIT