MCPSERV.CLUB
ianks

Terminal MCP

MCP Server

Real Unix PTY access for AI models

Stale(55)
7stars
1views
Updated 15 days ago

About

Provides AI agents with direct terminal control via true Unix pseudo-terminals, enabling session creation, command execution, streaming output, and multi-session management in a non-blocking, async environment.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Terminal MCP – Real Terminal Access for AI Assistants

Terminal MCP is a lightweight, native MCP server that gives AI models direct control over Unix pseudo‑terminals (PTYs). Instead of abstracted APIs or simulated shells, it hands the assistant a real terminal session that behaves exactly like a human user’s console. This solves the long‑standing problem of bridging conversational AI with low‑level system interaction: developers can now let models execute commands, SSH into servers, or run interactive scripts without leaving the AI environment.

The server exposes a concise set of tools that map to common terminal operations. A model can spawn named sessions (), run commands synchronously or asynchronously, stream live output, list active terminals, and clean up when finished. Because each session persists across calls, the assistant can maintain stateful interactions—e.g., keep an SSH connection open while debugging a remote application. The underlying PTY engine is fully asynchronous, leveraging Tokio for non‑blocking I/O, which keeps the MCP responsive even under heavy load.

Key capabilities include true PTYs (no shell‑hijacking hacks), smart buffering that delivers only new output to avoid duplication, and multi‑session support allowing parallel terminals. The API also provides control character injection () so models can send interrupts or other signals, mimicking real keyboard input. These features give developers fine‑grained, reliable control over command execution while preserving the interactive nature of terminal sessions.

In practice, Terminal MCP is ideal for debugging workflows, automated deployment scripts, or educational tools where an AI assistant needs to execute and observe shell commands. For example, a model can walk through setting up a Docker container, inspect logs in real time, and troubleshoot errors—all within the same conversational thread. The server’s session persistence also enables long‑running tasks like monitoring logs or running continuous integration pipelines, with the AI able to query progress at any point.

Integration is straightforward: add the server to your MCP client scope, and expose its tools as part of the assistant’s capability set. The JSON‑RPC interface keeps the protocol lightweight, while the underlying PTY layer guarantees that command output and terminal behavior match what a human would see. This fidelity is crucial for applications where accuracy of command execution and output interpretation matters, such as security audits or automated system configuration.

Overall, Terminal MCP delivers a direct, high‑fidelity bridge between AI assistants and Unix terminals. By providing persistent, multi‑session PTY access with asynchronous streaming and control character support, it empowers developers to build sophisticated, interactive AI workflows that can manage real systems just as a human operator would.