home / mcp / terminusai mcp server

TerminusAI MCP Server

Execute terminal commands locally or remotely via SSH with session persistence and environment variable support. Manage terminal sessions that maintain state for up to 20 minutes, enabling efficient command execution workflows. Connect using stdio or SSE for flexible integration with AI models and applications.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "gorav22-terminusai": {
      "url": "http://localhost:8080/sse"
    }
  }
}

TerminusAI MCP Server lets you execute commands on your local machine or on remote hosts via SSH, all through a simple Model Context Protocol interface. It supports persistent sessions, environment variables, and multiple connection methods, making it easy for AI models and other applications to run shell commands securely and efficiently.

How to use

You interact with the TerminusAI MCP Server by connecting through an MCP client in either stdio (local) mode or SSE (remote) mode. In practice, you send a command you want to run, optionally target a remote host, and provide a session name to reuse the same terminal environment for related tasks. The server returns the command’s output and any errors. Use a session name to keep the same environment for related operations, and be aware that sessions time out after 20 minutes of inactivity.

How to install

Prerequisites: Node.js and npm must be installed on your system. You will also need a compatible MCP client to interact with the server.

# Clone the TerminusAI MCP server repository
git clone https://github.com/Gorav/TerminusAI.git
cd TerminusAI

# Install dependencies
npm install

# Build the project
npm run build

# Start the server in stdio mode (local connection)
npm start

# Or start the server in SSE mode (remote connection)
npm run start:sse

Additional steps for SSE mode and testing

If you want to expose the server over HTTP via Server-Sent Events, you can run it in SSE mode. The server defaults to port 8080 and endpoint /sse, but you can customize these values.

# Start SSE server on a custom port and endpoint
node build/index.js --sse --port 3000 --endpoint /mcp --host 0.0.0.0

Available tools

execute_command

Core function to run a shell command on a local or remote host. You provide the command to execute, an optional host and user for SSH, a session name to reuse the environment, and optional environment variables. The tool returns stdout and stderr from the command execution.