pty-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
pty-mcp
An MCP server for interactive PTY sessions — end-to-end testing of CLI apps, REPLs and TUIs by driving a real pseudo-terminal and reading a clean rendered screen back. Exposed to any MCP client (built for Claude Code) over stdio.
Stack
Python 3.14 + venv
pexpect— PTY spawn, text/key injectionpyte— terminal emulator (clean screen rendering, ANSI stripped)mcp— Python MCP SDK
Related MCP server: ptywright
Tools
Tool | Description |
| Start a PTY session (command, cwd, env, cols, rows) |
| Send raw text |
| Send a special key (enter, ctrl+c, arrows…) |
| Wait for a regex pattern in the output (with timeout) |
| Current screen state, cleanly rendered (no ANSI) |
| Last N lines of the scrollback buffer |
| Close the session and kill the process |
| List all active sessions |
Example — E2E test
pty_start(session_id="myapp", command="python myapp.py", cwd="/path/to/myapp")
pty_expect(session_id="myapp", pattern="Enter your name:", timeout_ms=5000)
pty_send(session_id="myapp", text="Chris\r")
pty_expect(session_id="myapp", pattern="Welcome, Chris", timeout_ms=3000)
pty_screen(session_id="myapp") # terminal screenshot
pty_close(session_id="myapp")Run
The server is registered in the MCP client and starts with each session. To test standalone: ./start.sh. Transport is stdio, no network port. Logs in logs/mcp_server.log.
This server cannot be deployed
Maintenance
Related MCP Connectors
Termalin's hosted MCP server. Claude, ChatGPT or any MCP client runs commands, moves files over SFTP, queries databases and reads server metrics and monitoring alerts on your servers, keylessly through Termalin Connectors: no SSH key is handed over and no inbound port is opened. Per-host command policy and an audit log. Needs a termal.in Pro or Team account (new accounts start with a 14-day Pro trial).
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
MEOK MCP Test MCP — golden-file + schema-drift + tool-failure tests for any MCP server. Drop-in
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Related MCP Servers
- AlicenseBqualityDmaintenanceLocal + remote terminal interaction control MCP Server. Lets AI agents control interactive TUI programs the way a human would.295 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to launch and interact with terminal/TUI programs, providing tools to inspect and control live CLI/TUI sessions.8 npm1Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables 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.62MIT
- AlicenseNot gradedqualityAmaintenanceEnables users to inspect, run, interact with, and debug React/Ink terminal applications locally through MCP by starting processes in a pseudoterminal, sending keystrokes, resizing, waiting for conditions, and inspecting the emulated screen and output.MIT