MCP Terminal Server

Python-based MCP endpoint that executes terminal commands in bash, cmd, or PowerShell with runtime limits and metrics.
  • python

0

GitHub Stars

python

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "magadsm-terminal-mcp": {
      "command": "python",
      "args": [
        "-m",
        "TMCP.mcp_terminal.server"
      ]
    }
  }
}

You can run terminal commands through the MCP protocol with this Python-based Terminal Server. It lets you execute commands in multiple shells (bash, cmd, PowerShell) under controlled limits and metrics, and you can integrate it with Cursor AI for seamless remote command execution and monitoring.

How to use

You will run the MCP Terminal Server as a local stdio MCP endpoint. From your MCP client, you can issue commands that are executed by the server in a chosen shell. The server supports restricting command length, stdout/stderr size, concurrent processes, and includes a grace period to finish running processes. Use PowerShell by default on Windows, or switch to cmd or bash as needed.

How to install

Prerequisites: Python 3.8+ and a Python virtual environment tool (venv is included with Python). Install dependencies and prepare a local environment, then run the MCP server.

python -m venv .venv
source .venv/bin/activate  # Linux/macOS
# or .venv\Scripts\activate  # Windows PowerShell
pip install -r requirements.txt

Run the MCP server locally

Start the MCP Terminal Server manually to verify everything works during development.

python -m TMCP.mcp_terminal.server

Configure Cursor to use the MCP server

Create a Cursor configuration to expose the MCP server via stdio. Place the following in your Cursor config under the mcpServers section.

{
  "mcpServers": {
    "terminal_mcp": {
      "command": "python",
      "args": ["-m", "TMCP.mcp_terminal.server"]
    }
  }
}

Usage examples

From your MCP client, you can run commands using the available shells and optional parameters like working directory and timeout.

{
  "command": "Get-ChildItem"
}
{
  "shell": "cmd",
  "command": "dir"
}
{
  "cwd": "C:\\CursorProjects\\TMCP",
  "timeout_seconds": 60
}
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational