Pty MCP Server

A PTY runner for MCP

Local serverstdioPython

What is the Pty MCP Server?

A PTY runner for MCP

What you get

pty-mcp provides terminal session tools over MCP so clients can spawn commands in a pseudo-terminal, read interactive output, send input, resize terminal windows, and manage process lifecycle safely.

  • Spawn shell commands in a real PTY
  • Read incremental output from a ring buffer
  • Wait for pattern matching (read_until)
  • Wait for any pattern (read_until_any)
  • Send interactive input (write)
  • Send input and wait for prompt (prompt)

What the assistant can call

Once Pty is connected, these are the calls the assistant has available:

  • pty_spawn — pty_resume
  • pty_recover — pty_attach
  • pty_detach — pty_handoff
  • pty_takeover — pty_read
  • pty_read_stdout — pty_read_stderr
  • pty_read_at — pty_read_until
  • pty_read_until_any — pty_read_quiescent
  • pty_prompt — confirm_dangerous_command
  • pty_write — pty_resize
  • pty_close — pty_status
  • pty_wait — pty_list
  • confirm_dangerous_command — The confirm_dangerous_command tool exposed by this server

Configuration and credentials

  • Python 3.10+ - tmux 3.x when using backend="tmux"

Recorded tools

  • pty_spawn — pty_resume
  • pty_recover — pty_attach
  • pty_detach — pty_handoff
  • pty_takeover — pty_read
  • pty_read_stdout — pty_read_stderr
  • pty_read_at — pty_read_until
  • pty_read_until_any — pty_read_quiescent
  • pty_prompt — confirm_dangerous_command
  • pty_write — pty_resize
  • pty_close — pty_status
  • pty_wait — pty_list
  • confirm_dangerous_command — The confirm_dangerous_command tool exposed by this server.
  • pty_resume — The pty_resume tool exposed by this server.
  • pty_read_quiescent — The pty_read_quiescent tool exposed by this server.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
pty_spawnpty_resume
pty_recoverpty_attach
pty_detachpty_handoff
pty_takeoverpty_read
pty_read_stdoutpty_read_stderr
pty_read_atpty_read_until
pty_read_until_anypty_read_quiescent
pty_promptconfirm_dangerous_command
pty_writepty_resize
pty_closepty_status
pty_waitpty_list
confirm_dangerous_commandThe confirm_dangerous_command tool exposed by this server.
pty_resumeThe pty_resume tool exposed by this server.
pty_read_quiescentThe pty_read_quiescent tool exposed by this server.

How to install the Pty MCP Server

{
  "mcpServers": {
    "pty": {
      "command": "uvx",
      "args": ["pty-mcp"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Python 3.10+ - tmux 3.x when using backend="tmux"

Example prompts to try

  • “Use Pty to pty spawn.”
  • “Use Pty to pty recover.”
  • “Use Pty to pty detach.”

Frequently asked questions

A PTY runner for MCP Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.