Skip to main content
Glama

os-control-mcp

Local MCP for persistent terminal sessions. The process keeps Bash, CMD, PowerShell, pwsh, or WSL active and separates input sending from incremental output reading.

It also has persistent goals: the agent can create a goal with acceptance criteria, run multiple steps, verify evidence, and continue until it completes, fails, gets blocked, or reaches the defined limits.

Warning: this server controls processes with the permissions of the user who runs it. Use it locally, do not run as administrator/root by default, and never expose the process directly to the internet.

Transport

The server uses MCP JSONL over stdio. It does not open a network port by default.

Related MCP server: Persistent Terminal MCP Server

Shells

  • bash, sh, zsh on POSIX systems;

  • cmd, powershell, and pwsh on Windows;

  • wsl-bash on Windows, using the distribution defined in OS_CONTROL_WSL_DISTRO or kali-linux by default.

Interactive flow

  1. os_create_session creates a persistent session.

  2. os_send_input writes immediately to the PTY/ConPTY.

  3. os_read_output uses since_seq to fetch only new output.

  4. os_session_status tracks PID, shell, directory, and termination.

Outside of an autonomous goal, potentially destructive commands require explicit confirmation. In an autonomous goal, authorization is continuous within the step and time limits defined by the goal. The server is intended for local use and should remain protected by authentication and scoping when placed behind a remote tunnel.

Autonomous goals

Recommended flow:

  1. os_create_session creates the persistent terminal.

  2. os_goal_start receives the goal, criteria, and session_id.

  3. os_send_input uses the goal_id to run without repetitive confirmation.

  4. os_read_output reads the incremental output.

  5. os_goal_update records action, result, evidence, and next step.

  6. The agent repeats until all criteria are proven.

The server does not invent the next action or call the model on its own; it maintains the state and limits of the goal. The client/agent must keep making calls until the terminal state.

Installation

git clone https://github.com/Willian-2-0-0-1/os-control-mcp.git
cd os-control-mcp
python -m pip install -r requirements.txt

On Windows, pywinpty enables ConPTY for CMD and PowerShell. On Kali/Linux, the backend uses the native PTY. The .mcp.json file can be used by MCP clients that accept local servers over stdio.

Plugin for GPT/Codex

The repository contains the .codex-plugin/plugin.json manifest and the MCP server. This allows distributing the package to clients compatible with MCP plugins.

To use with ChatGPT with a local server, each user must run their own instance and configure a private connection. A GitHub repository, by itself, does not give ChatGPT access to the user's computer.

A
license - permissive license
Not graded
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
    B
    quality
    D
    maintenance
    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 a
    1
    2
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to create and manage persistent terminal sessions that continue running even after disconnection, with features like smart output management, web UI visualization, and automatic bug fixing with Codex integration.
    25
    4
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to create and manage persistent, interactive shell sessions with full terminal emulation and PTY support. It allows for sequential command execution and supports interactive programs like vim or htop through specialized streaming and snapshot output modes.
    4
    MIT

View all related MCP servers

Related MCP Connectors

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/Willian-2-0-0-1/os-control-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server