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 "Install 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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.Last updated166Do 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.Last updated841MIT
- Flicense-qualityDmaintenanceExposes 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.Last updated
- Alicense-qualityDmaintenanceAllows AI assistants to create, manage, and interact with tmux sessions, windows, and panes programmatically.Last updatedMIT
Related MCP Connectors
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Create and manage AI agents that collaborate and solve problems through natural language interacti…
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mohamedmagdy21/terminal-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server