MCP.so
Sign In
Servers

MCP Terminal Server

@cwmoore-ai

A lightweight FastAPI server that can run as a Windows service and exposes an endpoint to execute shell commands and stream their output

Overview

What is MCP Terminal Server?

A lightweight FastAPI server that runs as a Windows service and exposes an endpoint to execute shell commands and stream their output in real-time. It includes API key authentication, rate limiting, and configurable logging.

How to use MCP Terminal Server?

Install via the provided PowerShell script (install_service.ps1) with optional parameters for API key, port, host, and log level. Configure through environment variables or a JSON config file. Manage the service using service.py commands (install, start, stop, restart, remove, debug). Use the test client (test_client.py) or call the API endpoints directly (POST /run, GET /health) with the API key in the X-API-Key header.

Key features of MCP Terminal Server?

  • Run as a Windows service or in debug mode
  • Execute shell commands and stream output in real-time
  • API key authentication and rate limiting
  • Configurable via environment variables or configuration file
  • Robust error handling and logging
  • Automatic process restart on failure

Use cases of MCP Terminal Server?

  • Remotely execute shell commands on a Windows server via API
  • Automate administrative tasks using scripted API calls
  • Interactive command-line access through the test client with command history
  • Monitor server health and active sessions with the /health endpoint
  • Integrate terminal command execution into larger applications or workflows

FAQ from MCP Terminal Server

What are the prerequisites to install MCP Terminal Server?

Windows operating system, Python 3.7 or higher, and administrator privileges (for service installation).

How do I configure the API key?

Set the API key via the -ApiKey parameter during installation, the MCP_TERMINAL_API_KEY environment variable, or in the client configuration file (client_config.json).

How can I run the server temporarily without installing a service?

Use debug mode by running python service.py debug from the terminal.

What API endpoints are available?

POST /run executes a command (requires API key, returns streaming output), and GET /health returns server health status.

Are dangerous commands blocked?

The server blocks potentially dangerous commands, but additional security measures are recommended in production.

Tags

More from Developer Tools