terminal-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.
terminal-mcp
MCP server that executes shell commands and captures terminal output as styled PNG screenshots — perfect for pentest reports, documentation, and any workflow where you need professional-looking terminal captures.
Works with any MCP-compatible client: Claude Code, OpenAI Codex, Antigravity, Cursor, Windsurf, Cline, Continue, and more.
Features
Execute & capture: Run commands with full ANSI color preservation
Terminal-styled screenshots: Renders output as PNG with macOS window chrome, proper colors, and metadata
20 built-in themes: Tokyo Night, Dracula, Nord, Gruvbox, GitHub Dark, Kali, Ubuntu, and more
Report-ready: Watermarks, timestamps, exit codes, custom titles
Full ANSI support: 16 colors, 256-color palette, and 24-bit truecolor
Cross-platform: macOS and Linux support
Session capture management: List, re-render, and manage captures
Related MCP server: mcp2term
Screenshot Examples

Installation
Quick Setup (Recommended)
git clone https://github.com/JoasASantos/terminal-mcp.git
cd terminal-mcp
chmod +x setup.sh
./setup.shThe setup script handles everything: dependency installation, build, and MCP client registration.
Manual Setup
git clone https://github.com/JoasASantos/terminal-mcp.git
cd terminal-mcp
npm install
npm run buildLinux Prerequisites
On Linux, Puppeteer requires some system libraries for Chromium:
Debian/Ubuntu:
sudo apt-get install -y \
libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 \
libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 \
libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2Fedora/RHEL:
sudo dnf install -y \
nss atk at-spi2-atk cups-libs libdrm libxkbcommon \
libXcomposite libXdamage libXrandr mesa-libgbm pango cairo alsa-libArch Linux:
sudo pacman -S nss atk at-spi2-atk cups libdrm libxkbcommon \
libxcomposite libxdamage libxrandr mesa pango cairo alsa-libClient Configuration
Claude Code
Automatic (via setup.sh):
./setup.sh
# Restart Claude Code after setupManual (via CLI):
claude mcp add terminal-mcp --scope user -e TERMINAL_MCP_DIR="$HOME/terminal-screenshots" -- node /path/to/terminal-mcp/dist/index.jsOpenAI Codex
Add to your Codex MCP configuration:
{
"mcpServers": {
"terminal-mcp": {
"command": "node",
"args": ["/path/to/terminal-mcp/dist/index.js"],
"env": {
"TERMINAL_MCP_DIR": "/path/to/screenshots"
}
}
}
}Cursor
Add to .cursor/mcp.json in your project or ~/.cursor/mcp.json globally:
{
"mcpServers": {
"terminal-mcp": {
"command": "node",
"args": ["/path/to/terminal-mcp/dist/index.js"],
"env": {
"TERMINAL_MCP_DIR": "/path/to/screenshots"
}
}
}
}Windsurf
Add to your Windsurf MCP settings (~/.windsurf/mcp.json):
{
"mcpServers": {
"terminal-mcp": {
"command": "node",
"args": ["/path/to/terminal-mcp/dist/index.js"],
"env": {
"TERMINAL_MCP_DIR": "/path/to/screenshots"
}
}
}
}Cline (VS Code)
Add to Cline's MCP server settings in VS Code:
{
"mcpServers": {
"terminal-mcp": {
"command": "node",
"args": ["/path/to/terminal-mcp/dist/index.js"],
"env": {
"TERMINAL_MCP_DIR": "/path/to/screenshots"
}
}
}
}Continue
Add to ~/.continue/config.json:
{
"experimental": {
"mcpServers": {
"terminal-mcp": {
"command": "node",
"args": ["/path/to/terminal-mcp/dist/index.js"],
"env": {
"TERMINAL_MCP_DIR": "/path/to/screenshots"
}
}
}
}
}Antigravity
Add to your Antigravity MCP configuration:
{
"mcpServers": {
"terminal-mcp": {
"command": "node",
"args": ["/path/to/terminal-mcp/dist/index.js"],
"env": {
"TERMINAL_MCP_DIR": "/path/to/screenshots"
}
}
}
}Generic MCP Client
Any client supporting the Model Context Protocol can use terminal-mcp. The server communicates over stdio using JSON-RPC. Configure it with:
Command:
nodeArgs:
["/path/to/terminal-mcp/dist/index.js"]Env (optional):
TERMINAL_MCP_DIR— directory for saved screenshots
Tools
Tool | Description |
| Primary tool. One command = one PNG. Execute any shell command and get a screenshot |
| Execute a command and capture output for later screenshot |
| Render a previously captured output as PNG |
| Render arbitrary text as a terminal PNG |
| List all captures in the current session |
| List saved PNG files |
| List available themes |
Works with any command: nmap, curl, gobuster, nikto, sqlmap, ls, docker, kubectl, git, python, gcc — anything that runs in a shell.
Themes (20)
Theme | Description |
tokyonight | Dark blue, clean and modern (default) |
dracula | Classic purple-accented dark |
monokai | Warm dark with vibrant colors |
catppuccin | Soft pastel dark (Mocha) |
nord | Arctic blue-gray palette |
gruvbox | Retro warm dark with earthy tones |
solarized | Solarized Dark, precision colors |
onedark | Atom One Dark |
material | Material Design dark |
ayu | Ayu Dark, minimal contrast |
github | GitHub Dark |
cobalt | Deep blue with bright accents |
hacker | Green-on-black matrix style |
macos | Native macOS Terminal.app dark |
kali | Kali Linux terminal |
parrot | Parrot OS terminal |
ubuntu | Ubuntu terminal (aubergine) |
powershell | Windows PowerShell blue |
retro | Retro amber phosphor CRT |
light | Light theme for print-friendly reports |
Screenshot Options
Option | Type | Default | Description |
| string |
| Color theme (see list above) |
| boolean |
| macOS window chrome with traffic lights |
| number |
| Font size in pixels |
| string | command name | Window title bar text |
| string |
| Shell prompt prefix |
| boolean |
| Show timestamp in footer |
| string | — | Watermark text (bottom-right) |
| string | auto | Full path for the output PNG |
| number | auto | Fixed terminal width in pixels |
| number |
| Maximum terminal width |
| number | all | Truncate output after N lines |
| number |
| Line spacing multiplier |
| number |
| Resolution: 1 = 1x, 2 = retina, 3 = 3x |
| boolean |
| Reduced padding for smaller screenshots |
Usage Examples
Basic command screenshot
terminal_exec_screenshot({ command: "nmap -sV target.com", theme: "hacker" })Pentest report with watermark
terminal_exec_screenshot({
command: "nikto -h https://target.com",
theme: "tokyonight",
watermark: "CONFIDENTIAL - Pentest Report 2024",
title: "Nikto Web Scanner"
})Screenshot arbitrary text
terminal_screenshot_text({
text: "Finding: SQL Injection in /api/users\nSeverity: Critical\nCVSS: 9.8",
title: "Vulnerability Report",
theme: "dracula"
})Environment Variables
Variable | Default | Description |
|
| Directory for saved screenshots |
Requirements
Node.js 18+
Puppeteer (bundled — downloads Chromium on first run)
On Linux: system libraries for headless Chromium (see Linux Prerequisites)
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Screenshot any URL/HTML as PNG/JPEG/WebP, or read it as clean Markdown/text for LLMs.
Screenshot any URL, HTML or Markdown in a real browser, and read web pages as Markdown.
Generate images and PDFs from HTML/CSS, live websites, and reusable templates.
Capture website screenshots (viewport or full page) with local Chrome, or on OpenScreenShot Cloud.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to interact with terminal-based TUI applications by capturing visual terminal output as PNG screenshots and simulating keyboard input through a virtual X11 display.42Apache 2.0
- FlicenseBqualityDmaintenanceEnables safe execution of system shell commands with real-time streaming output and rich metadata capture. Provides configurable command execution with timeout controls, environment management, and extensible plugin architecture for monitoring command lifecycles.4-
- FlicenseNot gradedqualityDmaintenanceProvides secure execution of terminal commands (PowerShell, CMD, shell) with configurable security policies including command blocking, path restrictions, and timeout.1-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to spawn and interact with real terminal sessions, capturing screenshots of rendered TUI output and sharing live sessions for debugging.5 npm1MIT