npm mcp-server-terminalstdioMITupdated 8mo ago
MCP server enabling AI agents to interact with terminal applications through structured Terminal State Tree representation. Works with any AI assistant that supports the Model Context Protocol.
¿Qué puedes hacer con Terminal MCP Server?
Terminal MCP Server
MCP server enabling AI agents to interact with terminal applications through structured Terminal State Tree representation. Works with any AI assistant that supports the Model Context Protocol.
Installation
Via npm (Recommended)
npx mcp-server-terminal
Via GitHub Releases
Download pre-built binaries from Releases.
Build from Source
git clone https://github.com/aybelatchane/mcp-server-terminal.git
cd mcp-server-terminal
cargo build --release
# Binary: ./target/release/terminal-mcp
Configuration
Claude
Claude Code (CLI)
claude mcp add terminal -- npx mcp-server-terminal
Claude Desktop
Add to ~/.claude.json (macOS/Linux) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"]
}
}
}
OpenAI Codex
Codex CLI
codex mcp add terminal -- npx mcp-server-terminal
Codex Configuration File
Add to ~/.codex/config.toml:
[mcp_servers.terminal]
command = "npx"
args = ["mcp-server-terminal"]
Google Gemini
Gemini CLI
gemini mcp add terminal npx mcp-server-terminal
VS Code / GitHub Copilot
VS Code 1.101+ supports MCP. Add to your VS Code settings (settings.json):
{
"mcp.servers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"]
}
}
}
Cursor
Add to ~/.cursor/mcp.json or .cursor/mcp.json in your project:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"]
}
}
}
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"]
}
}
}
Zed
Add to your Zed settings (Preferences → Settings):
{
"context_servers": {
"terminal": {
"command": {
"path": "npx",
"args": ["mcp-server-terminal"]
}
}
}
}
Cline (VS Code Extension)
Click MCP Servers icon → Configure → Advanced MCP Settings, then add:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"]
}
}
}
AWS Bedrock
Add to your Bedrock agent MCP configuration:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"]
}
}
}
Other MCP Clients
For any MCP-compatible client, configure the server with:
- Command:
npx - Args:
["mcp-server-terminal"]
Or if using the binary directly:
- Command:
terminal-mcp
Usage
Ask your AI agent:
- "Create a terminal session running htop"
- "Take a snapshot of the terminal"
- "Press the down arrow key"
- "Type 'ls -la' and press Enter"
MCP Tools
| Tool | Description |
|---|---|
terminal_session_create |
Start a terminal session |
terminal_session_list |
List active sessions |
terminal_session_close |
Close a session |
terminal_session_resize |
Resize terminal dimensions |
terminal_snapshot |
Capture terminal state with UI elements |
terminal_type |
Type text into terminal |
terminal_press_key |
Press keys (arrows, F-keys, Ctrl+X) |
terminal_click |
Click on detected UI element |
terminal_wait_for |
Wait for text, element, or idle state |
terminal_read_output |
Read raw terminal output |
Visual Mode
By default, sessions spawn a visible terminal window (xterm). For headless operation:
npx mcp-server-terminal --headless
Or in your MCP config:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal", "--headless"]
}
}
}
X11 Setup (Linux/WSL)
Visual mode requires X11. Add the DISPLAY environment variable to your MCP config:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"],
"env": {
"DISPLAY": ":0"
}
}
}
}
Logging
Set the RUST_LOG environment variable:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": ["mcp-server-terminal"],
"env": {
"RUST_LOG": "info"
}
}
}
}
Log levels: error, warn, info, debug, trace
Logs go to stderr (stdout is reserved for MCP protocol).
Platform Support
| Platform | Architecture | Status | Visual Mode |
|---|---|---|---|
| Linux | x64, arm64 | ✅ Full support | xterm + tmux |
| macOS | x64, arm64 | ✅ Full support | Terminal.app / iTerm2 |
| Windows (WSL) | x64, arm64 | ✅ Full support | xterm + tmux (via X11) |
| Windows (native) | x64 | ⚠️ Headless only | Not supported |
Windows users: Use WSL for full functionality including visual mode.
License
MIT
Instalación
Añade Terminal MCP Server a tu cliente. Elige el que uses.
claude mcp add mcp-server-terminal -- npx -y mcp-server-terminalcodex mcp add mcp-server-terminal -- npx -y mcp-server-terminalamp mcp add mcp-server-terminal -- npx -y mcp-server-terminal{
"mcpServers": {
"mcp-server-terminal": {
"command": "npx",
"args": [
"-y",
"mcp-server-terminal"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp-server-terminal": {
"command": "npx",
"args": [
"-y",
"mcp-server-terminal"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"mcp-server-terminal","command":"npx","args":["-y","mcp-server-terminal"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"mcp-server-terminal": {
"command": "npx",
"args": [
"-y",
"mcp-server-terminal"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"mcp-server-terminal": {
"command": "npx",
"args": [
"-y",
"mcp-server-terminal"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"mcp-server-terminal": {
"command": "npx",
"args": [
"-y",
"mcp-server-terminal"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"mcp-server-terminal": {
"type": "local",
"command": "npx",
"args": [
"-y",
"mcp-server-terminal"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"mcp-server-terminal": {
"command": {
"path": "npx",
"args": [
"-y",
"mcp-server-terminal"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y mcp-server-terminalRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
Puntuación
39 / 100
Incompleta
- Documentación21/25
- Mantenimiento9/25
- Confianza13/20
- Capacidad0/15
- Instalación12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 242 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Historial de versiones
| Versiones | Publicada |
|---|---|
| 1.0.3Última | 9 dic 2025 |