Terminal MCP
Click on "Deploy 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., "@Terminal MCP create a terminal named 'backend' and run 'npm start'"
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.
Terminal MCP
Cross-platform MCP server for managing visible terminal sessions.
Features
Cross-platform: Supports macOS, Windows, Linux, and WSL
Visible terminals: Opens real terminal windows that users can see and interact with
Multiple sessions: Manage multiple terminal sessions simultaneously
Auto-cleanup: Automatically closes terminals when MCP server stops
Related MCP server: MCP Terminal Server
Installation
Since this package is not published on PyPI, install it directly from the repository:
Option 1: Install from GitHub (recommended)
uv pip install "git+https://github.com/Hor1zonZzz/terminal-mcp.git"Option 2: Install from a local clone
git clone https://github.com/Hor1zonZzz/terminal-mcp.git
cd terminal-mcp
uv pip install -e .Usage
Claude Desktop Configuration
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"terminal": {
"command": "uv",
"args": ["run", "terminal-mcp"]
}
}
}Or if installed globally:
{
"mcpServers": {
"terminal": {
"command": "terminal-mcp"
}
}
}Available Tools
terminal_create_or_get
Create a new visible terminal window or get an existing one by name.
Parameters:
name(optional): Name for the terminal sessionworking_dir(optional): Working directory for the terminal
Returns: Session ID, name, platform, and status message
terminal_send_input
Send input (command or text) to a terminal.
Parameters:
session_id: The terminal session IDtext: The command/text to send
terminal_get_output
Get the output from a terminal.
Parameters:
session_id: The terminal session IDlines(optional): Number of lines to retrieve (default: 100, max: 1000)
terminal_list
List all active terminal sessions.
terminal_close
Close a terminal session.
Parameters:
session_id: The terminal session ID to close
Platform Support
Platform | Terminal Used |
macOS | Terminal.app (via AppleScript) |
Windows | Windows Terminal (wt.exe) or cmd.exe |
Linux | gnome-terminal, konsole, xfce4-terminal, xterm, etc. |
WSL | Windows Terminal from WSL |
How It Works
Terminal Creation: Opens a real terminal window using platform-specific methods
Communication: Uses named pipes (Unix) or file polling (Windows) for bidirectional communication
Output Capture: Logs terminal output to temporary files for retrieval
Cleanup: Automatically closes all terminals when the MCP server stops (via atexit and signal handlers)
License
MIT
Available Tools
5 toolsterminal_closeADestructiveIdempotent
Close a terminal session.
Closes the terminal window and cleans up associated resources.
Args:
session_id: The terminal session ID to close.
Returns:
dict: Contains success status and message.
Inputs: session_id (required).
terminal_create_or_getAIdempotent
Create a new visible terminal window or get an existing one by name.
The terminal opens in a visible window that the user can interact with directly.
Commands sent to this terminal will be executed in that visible window.
Args:
name: Optional name for the terminal. If a terminal with this name
already exists and is still alive, it will be returned instead
of creating a new one.
working_dir: Optional working directory for the terminal.
If not specified, uses the current working directory.
Returns:
dict: Contains session_id, name, platform, and a status message.
Use the session_id for subsequent operations.
Examples:
- Create unnamed terminal: terminal_create_or_get()
- Create named terminal: terminal_create_or_get(name="dev-server")
- Get existing terminal: terminal_create_or_get(name="dev-server")
Inputs: name, working_dir.
terminal_get_outputARead-onlyIdempotent
Get the output from a terminal.
Retrieves the recent output from the terminal's history. This includes
both command inputs and their outputs.
Args:
session_id: The terminal session ID returned by terminal_create_or_get.
lines: Number of lines to retrieve from the end (default: 100, max: 1000).
Returns:
dict: Contains success status, session_id, and the output text.
Examples:
- Get last 100 lines: terminal_get_output(session_id="abc123")
- Get last 50 lines: terminal_get_output(session_id="abc123", lines=50)
Note:
Output may have a slight delay as it's captured asynchronously from
the terminal process.
Inputs: session_id (required), lines.
terminal_listARead-onlyIdempotent
List all active terminal sessions.
Returns information about all terminal sessions that are currently
open and active.
Returns:
dict: Contains a list of terminal sessions with their details.
Inputs: no named parameters.
terminal_send_inputADestructive
Send input (command or text) to a terminal.
The input is sent to the visible terminal window and executed there.
The user can see the command being executed in real-time.
Args:
session_id: The terminal session ID returned by terminal_create_or_get.
text: The text/command to send. This will be executed as a shell command.
Returns:
dict: Contains success status, session_id, and the sent text.
Examples:
- Run a command: terminal_send_input(session_id="abc123", text="ls -la")
- Start a server: terminal_send_input(session_id="abc123", text="npm start")
- Run Python: terminal_send_input(session_id="abc123", text="python script.py")
Note:
The command is executed asynchronously. Use terminal_get_output to
retrieve the results after the command completes.
Inputs: session_id (required), text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose with no ambiguity. terminal_create_or_get creates/retrieves sessions, terminal_send_input sends commands, terminal_get_output retrieves output, terminal_list shows active sessions, and terminal_close terminates sessions. The boundaries between these operations are well-defined and non-overlapping.
All tools follow a perfect verb_noun pattern with 'terminal_' prefix and snake_case throughout. The naming is highly predictable: terminal_create_or_get, terminal_send_input, terminal_get_output, terminal_list, terminal_close. This consistency makes the tool set immediately understandable.
Five tools is ideal for this terminal management domain. The set covers the complete lifecycle: create/retrieve, send input, get output, list sessions, and close sessions. Each tool earns its place with no redundancy, and the count is neither too sparse nor overwhelming for the scope.
The tool surface provides complete CRUD/lifecycle coverage for terminal management. It supports creating/retrieving terminals, sending commands, getting output, listing active sessions, and closing sessions. There are no obvious gaps or dead ends for agents working with terminal operations.
Maintenance
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with terminal environments through multiple concurrent PTY sessions. Supports cross-platform terminal operations including command execution, session management, and real-time communication.2MIT
- AlicenseNot gradedqualityDmaintenanceProvides cross-platform terminal access through MCP, enabling AI assistants to create and manage interactive terminal sessions, execute commands, and capture visual snapshots on Windows, Linux, and macOS.1MIT
- FlicenseNot gradedqualityCmaintenanceEnables running interactive terminals inside Claude Code and Claude Desktop, supporting multiple sessions for different tasks.-
- FlicenseNot gradedqualityDmaintenanceEnables interactive terminal sessions within Claude Code and Desktop, allowing users and AI to execute commands and manage multiple tabs.2-