pty-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pty-mcpStart a bash PTY session, run 'ls', and show me the output"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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: terminal-use-mcp
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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Run commands and read/write files on your servers over Termalin's keyless tunnels (hosted MCP).
MEOK MCP Test MCP — golden-file + schema-drift + tool-failure tests for any MCP server. Drop-in
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server that gives AI agents real interactive terminal sessions for running REPLs, SSH, database clients, and any interactive CLI with clean text output and smart completion detection.78418MIT
- AlicenseBqualityBmaintenanceLocal + remote terminal interaction control MCP Server. Lets AI agents control interactive TUI programs the way a human would.2913MIT
- AlicenseNot gradedqualityCmaintenanceEnables spawning, interacting with, and capturing screen output from terminal-based programs for debugging PTY/TTY/TUI applications.157MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to launch and interact with terminal/TUI programs, providing tools to inspect and control live CLI/TUI sessions.111Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Chrlstopher-c/pty-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server