Terminal MCP Server
Allows AI agents to create and interact with isolated tmux terminal sessions, enabling execution of shell commands, capturing output, sending interrupts, and managing session lifecycle.
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 ServerCreate a terminal session and run 'pwd'"
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 Server
An MCP (Model Context Protocol) server that allows AI agents to create and interact with isolated tmux terminal sessions in real time.
Features
Create sessions — spin up isolated tmux terminals on demand
Send commands — execute shell commands in any session
Read output — capture live terminal screen content
Interrupt — send Ctrl+C to running processes
Close sessions — clean up when done
Related MCP server: Persistent Shell MCP
Tools
Tool | Description | Parameters |
| Create a new isolated tmux terminal session |
|
| Send a command to a specific tmux session |
|
| Return the current screen output of a tmux session |
|
| Send Ctrl+C to a running tmux session |
|
| Kill a tmux terminal session |
|
Requirements
Python 3.10+
tmux
mcppackage (mcp>=1.28.0)
Installation
pip install -r requirements.txtUsage
Run the server
python Server.pyConfigure in opencode
Add to your opencode.json:
{
"mcp": {
"terminal": {
"type": "local",
"command": ["python", "/path/to/Server.py"],
"enabled": true
}
}
}Test manually
from mcp import StdioClient
import asyncio
async def test():
async with StdioClient("python Server.py") as client:
result = await client.call_tool("create_session", {"session_id": "test-1"})
print(result)
result = await client.call_tool("send_keys", {"session_id": "test-1", "command": "echo hello"})
screen = await client.call_tool("get_screen", {"session_id": "test-1"})
print(screen)
asyncio.run(test())How it works
Each session is backed by a tmux window. Commands are sent via tmux send-keys, output is captured via tmux capture-pane. Sessions persist until explicitly closed.
You can attach to any running session to watch the AI interact in real time:
tmux attach -t <session_id>This server cannot be deployed
Maintenance
Related MCP Connectors
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Docs for agent-manager, the terminal UI that runs AI coding agents as live tmux sessions.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to manage local tmux sessions, including creating and controlling sessions, windows, and panes, sending commands, and capturing terminal output.1610 npmDo What The F*ck You Want To Public
- AlicenseAqualityDmaintenanceEnables AI assistants to execute shell commands and manage long-running processes within persistent tmux sessions across isolated workspaces. It features a dual-window architecture to separate raw command execution from interactive terminal output.85 npm1MIT
- FlicenseNot gradedqualityCmaintenanceExposes tmux features to AI agents for managing sessions, windows, and panes with built-in command execution. It includes comprehensive guardrails to prevent destructive system operations, file deletions, and unauthorized network changes.-
- AlicenseAqualityDmaintenanceAllows AI assistants to create, manage, and interact with tmux sessions, windows, and panes programmatically.19MIT