Skip to main content
Glama
Mohamedmagdy21

Terminal MCP Server

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_session

Create a new isolated tmux terminal session

session_id (optional string)

send_keys

Send a command to a specific tmux session

session_id (string), command (string)

get_screen

Return the current screen output of a tmux session

session_id (string)

interrupt

Send Ctrl+C to a running tmux session

session_id (string)

close_session

Kill a tmux terminal session

session_id (string)

Requirements

  • Python 3.10+

  • tmux

  • mcp package (mcp>=1.28.0)

Installation

pip install -r requirements.txt

Usage

Run the server

python Server.py

Configure 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>
F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to manage local tmux sessions, including creating and controlling sessions, windows, and panes, sending commands, and capturing terminal output.
    Last updated
    16
    6
    Do What The F*ck You Want To Public
  • A
    license
    A
    quality
    D
    maintenance
    Enables 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 updated
    8
    4
    1
    MIT

View all related MCP servers

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…

View all MCP Connectors

Latest Blog Posts

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