Skip to main content
Glama

Parley Term

Peer-to-peer Model Context Protocol (MCP) server for orchestrating interactive coding CLI agents across native terminal tabs.

Parley lets any MCP-capable coding agent (Codex, Claude Code, Antigravity, OpenCode, Grok Build) open real interactive tabs in your terminal, delegate tasks, read structured replies directly from local session logs instead of screen-scraping, and collaborate peer-to-peer while you watch every turn live and step in whenever you want.

NOTE

Parley imposes no forcedgit worktree layout, no hardcoded default "leader" agent, and no model overrides. Any agent can orchestrate any other agent in your active working directory, passing custom CLI arguments through verbatim.

Why Parley

  • Visible, interactive collaboration: Agents run inside real terminal tabs you can click into at any moment rather than hidden background subprocesses.

  • Structured session log reading: wait_for_reply and read_history read native local session files (JSONL / structured storage) instead of parsing ANSI terminal scrollback.

  • Multi-terminal native drivers: Auto-detects your host terminal and supports Ghostty 1.3+, iTerm2, WezTerm, Kitty, and tmux.

  • Safe by default: Uses bracketed/paste input with calibrated pre-Enter delays, blocks self-loop messages, and refuses to close pre-existing tabs you opened yourself.

Related MCP server: termcp

Supported Terminals

Terminal

Platform

Control Mechanism

Auto-Detection Signal

Ghostty (1.3+)

macOS

Native AppleScript (Ghostty.sdef)

TERM_PROGRAM=ghostty

iTerm2

macOS

Native AppleScript

TERM_PROGRAM=iTerm.app

WezTerm

macOS / Linux / Windows

wezterm cli JSON + stdin

WEZTERM_PANE

Kitty

macOS / Linux

kitty @ remote control

KITTY_WINDOW_ID

tmux

macOS / Linux / SSH

load-buffer + paste-buffer -p

TMUX

TIP

Override auto-detection anytime withPARLEY_DRIVER=ghostty|iterm2|wezterm|kitty|tmux or parley-term --driver <name>.

Supported CLI Agents

Agent

Default Command

Session Log Source

codex

codex

~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl

claude

claude

~/.claude/projects/<project-slug>/*.jsonl

antigravity

agy

~/.gemini/antigravity-cli/brain/<id>/.system_generated/logs/transcript.jsonl

opencode

opencode

~/.local/share/opencode/storage/

grok

grok

$GROK_HOME or ~/.grok/sessions/

custom

User-specified

Tab control only (send_message, send_key)

Quick Start

CC Switch / Standard MCP Client Config

Add parley-term as a standard stdio MCP server in CC Switch, Claude Code, Codex, Antigravity (~/.gemini/config/mcp_config.json), OpenCode, or Grok:

{
  "mcpServers": {
    "parley": {
      "command": "npx",
      "args": ["-y", "parley-term@latest"]
    }
  }
}

To force a specific terminal driver:

{
  "mcpServers": {
    "parley": {
      "command": "npx",
      "args": ["-y", "parley-term@latest", "--driver", "ghostty"]
    }
  }
}
# Claude Code
claude mcp add parley -- npx -y parley-term@latest

# Codex CLI
codex mcp add parley -- npx -y parley-term@latest

Tools Reference

Tool

Purpose

Key Parameters

list_agents

Discover active terminal tabs and bound session files

—

open_agent

Open a new tab running a CLI agent without touching existing tabs

agent, cwd, label?, command?, args?, env?

send_message

Paste a prompt safely and press Enter after calibrated delay

target, message, sender?, includeHeader?, pressEnter?

wait_for_reply

Wait on local session logs until turn completion, stall, exit, or timeout

target, timeoutSeconds?, stallWarningSeconds?, sessionPath?

read_history

Read recent structured user/assistant messages from session logs

target, limit?, sessionPath?

send_key

Send a control key (enter, escape, ctrl-c, ctrl-d, tab, up, down)

target, key

close_agent

Close a Parley-opened tab (external tabs require allowExternal: true)

target, allowExternal?

Development

npm install
npm run validate

Environment Variables

Variable

Description

PARLEY_DRIVER

Override detected terminal driver (ghostty, iterm2, wezterm, kitty, tmux)

PARLEY_TMUX_SOCKET

Custom tmux socket path

PARLEY_SELF_TAB_ID

Override caller tab ID for self-loop protection

PARLEY_DEBUG=1

Emit diagnostic logs to stderr (never stdout)

Available Tools

7 tools
close_agentA

Close a terminal tab opened by Parley. Refuses to close pre-existing external tabs unless allowExternal is explicitly true.

Inputs: target (required), allowExternal.

list_agentsA

List active terminal tabs and any tracked or auto-discovered coding CLI agents (Codex, Claude Code, Antigravity, OpenCode, Grok).

Inputs: no named parameters.

open_agentB

Open a new terminal tab running a coding CLI agent without altering existing tabs or creating git worktrees.

Inputs: cwd (required), agent (required), env, args, +2 more.

read_historyB

Read recent structured conversation messages from the target agent local session log.

Inputs: target (required), limit, sessionPath.

send_keyB

Send a control or navigation key (enter, escape, ctrl-c, ctrl-d, tab, up, down) to a target agent tab.

Inputs: key (required), target (required).

send_messageA

Send a prompt or instruction to a target agent tab using safe bracketed/paste input and a calibrated pre-Enter delay.

Inputs: target (required), message (required), sender, pressEnter, +1 more.

wait_for_replyB

Wait for the target agent to finish its current turn by monitoring its structured local session log (no screen scraping).

Inputs: target (required), sessionPath, timeoutSeconds, stallWarningSeconds.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 7 tools

    Disambiguation4/5

    Each tool maps to a distinct action on the agent-tab resource: discovery, creation, teardown, text input, key input, waiting, and history reading. The only potential overlap is send_message vs send_key, since both inject input into the same tab, but the descriptions clearly separate text prompts from control/navigation keys.

    Naming Consistency5/5

    All seven names follow a strict snake_case verb_noun pattern (list_agents, open_agent, send_message, wait_for_reply, read_history, send_key, close_agent). The verb choice is also semantically precise (send vs read vs wait vs open/close), so the pattern is both consistent and informative.

    Tool Count5/5

    Seven tools is a tight, well-scoped surface for driving a set of terminal agent tabs, with no redundant or filler operations. Each tool covers a necessary step in the interaction loop (discover → open → prompt → wait → read → clean up).

    Completeness4/5

    The full lifecycle is covered: listing, spawning, prompting, key input, polling for completion, history retrieval, and guarded teardown. Minor gaps remain—no broadcast/multi-agent fan-out, no tool to inspect whether a tab is idle without waiting on a turn, and no explicit way to query raw screen state if the session log is unavailable.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      A
      maintenance
      The terminal AI agents can drive: a cross-platform desktop terminal (macOS/Linux/Windows, MIT) that runs a local MCP server. Spawn tabs/panes, run commands with structured output, read screens and full scrollback, take scrolling screenshots, record sessions with secret redaction, switch identity profiles. Auto-registers with Claude Code / Codex / Gemini CLI on install.
      29
      -
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to interact with real terminal sessions across local and remote hosts, driving multi-turn interactive programs like TUIs, REPLs, and SSH prompts through MCP.
      76
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables any MCP host to delegate work to multiple coding-agent CLIs such as Codex, Claude Code, and Antigravity as subagents, preserving native sessions and supporting team-based supervision and agent-to-agent messaging.
      17
      19 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to drive real terminal sessions — starting, typing, reading the screen, waiting on prompts and killing processes — while a human watches and can type into the same live session from a browser. Exposes twelve MCP tools for session control, snapshotting, finding text and sharing viewer links.
      1,366 npm
      Apache 2.0