Skip to main content

A PTY runner for MCP

Project description

pty-mcp

A lightweight PTY runner for MCP (Model Context Protocol).

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.

Features

  • Spawn shell commands in a real PTY
  • Read incremental output from a ring buffer
  • Wait for pattern matching (read_until)
  • Send interactive input (write)
  • Resize terminal (cols / rows)
  • Process control (status, wait, signal, close)

Requirements

  • Python 3.10+

Installation

pip install pty-mcp

CLI Entrypoint

After installation, the package exposes:

pty-mcp

This starts the MCP server over stdio.

MCP Tools

  • pty_spawn
  • pty_read
  • pty_read_until
  • pty_write
  • pty_resize
  • pty_close
  • pty_close_all
  • pty_status
  • pty_wait
  • pty_signal
  • pty_list

Notes

  • PTY sessions are in-memory and have idle timeout cleanup.
  • The server is intended for local trusted environments.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pty_mcp-0.1.3.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pty_mcp-0.1.3-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file pty_mcp-0.1.3.tar.gz.

File metadata

  • Download URL: pty_mcp-0.1.3.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pty_mcp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 159a931ea65f5706b8814d628f4c62830a4b90fc555687e996668ef2de233f3e
MD5 b8e3486f1046235ae5ce0b9c4af227bd
BLAKE2b-256 fe57196bc8e3efdea40e9c93891b57abe156d2fd810e5c410b27d1bf8b2cfd34

See more details on using hashes here.

File details

Details for the file pty_mcp-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pty_mcp-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pty_mcp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cb37a78565f6f7f5a5b81e739fb4e488201b1e88d5a3f9bd5307a85e44a2899c
MD5 de753947c1d7ea306cf6170366d35189
BLAKE2b-256 20170b0ba85f4b71a70e14e6391613476feebb0796196ad12c70a21c758db47e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page