# Terminal MCP

> Let AI see and interact with your terminal.

- **URL**: https://followmcp.com/en/servers/terminal-mcp
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 149
- **FMRS Score**: 44/100 (Grade D)
- **Source**: https://github.com/elleryfamilia/terminal-mcp
- **Transports**: stdio (local process)
- **Runtimes**: Node.js 22.12.0+
- **Auth**: No credential needed

## Overview
Terminal MCP exposes a terminal session to AI assistants through MCP. It supports sending input, reading the buffer, capturing terminal state, recording sessions, and managing multiple isolated sessions. It offers interactive, client, and headless modes, with an optional sandbox for filesystem and network restrictions.

## Best for
- Developers who want an AI assistant to observe and operate terminal sessions.
- Workflows that need multiple isolated PTY sessions in one process.
- Automation that needs an MCP server without an interactive TTY.

## Not for
- Users who need only file browsing or database access and do not need terminal control.
- Environments where an AI assistant must not send shell input or read terminal output.
- Running untrusted commands safely without configuring appropriate restrictions.

## Required permissions
- A terminal session starts a shell subprocess and uses the system permissions available to that shell.
- Filesystem and network access depend on the shell, runtime environment, and whether sandbox mode is enabled.
- The sandbox can configure filesystem read-write, read-only, and blocked paths, as well as network mode; Linux sandboxing requires bwrap and socat.

## Risks
- The AI can drive the shell through `type` and `sendKey`, potentially running commands with side effects.
- Terminal output may contain sensitive data; session recordings save output to asciicast files.
- The documented example sandbox configuration permits all network access; restrictions depend on configuration and platform support.
- PNG screenshot output requires `@resvg/resvg-js`.

## Client config (JSON)
```json
{"mcpServers":{"terminal":{"command":"terminal-mcp"}}}
```

## Tools (9)
- `type`: Send text input to the terminal.
- `sendKey`: Send a special key or key combination.
- `getContent`: Get the terminal buffer as plain text.
- `takeScreenshot`: Capture terminal state as plain text, ANSI-colored text, or PNG.
- `startRecording`: Start recording terminal output to an asciicast v2 file.
- `stopRecording`: Stop a recording and finalize the asciicast file.
- `createSession`: Create a terminal session and return its metadata.
- `listSessions`: List active sessions and configured limits.
- `destroySession`: Destroy a session by ID; the default session cannot be destroyed.
