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.4.tar.gz (51.0 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.4-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pty_mcp-0.1.4.tar.gz
  • Upload date:
  • Size: 51.0 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.4.tar.gz
Algorithm Hash digest
SHA256 bdccf505c55792bfb5bb4fd6832a31a946d0e695520f953677ff828c37d70e10
MD5 73fa4e81d8160fa8eef0fbf59c6fca66
BLAKE2b-256 854dd952b1d30d8c8a973b60f2085795b887d9a3e1b926a1c6509eb1855b025b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pty_mcp-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.7 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 953e9641d92647256701c334b413581148bc47931e4136f2cf6ff960c97eb087
MD5 10f5f8a5366b00b3509c00dddc76bedd
BLAKE2b-256 046fb0516dc7e49e0205010f799e547fe81c3701a651723907ba9854c7262385

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