Skip to main content

mcp-win-stdio-terminal

Workspace Terminal MCP server for mcp-win-stdio (mws).

Provides session-isolated local workspace command execution across PowerShell, pwsh, cmd, Git Bash, and WSL with bounded foreground execution, multi-step pipelines, and MWS Tunnel security integration.

Installation

pip install mcp-win-stdio-terminal
# or via mws CLI:
mws install terminal

Shell Support

  • Windows: powershell (default), pwsh, cmd, bash (Git Bash), wsl
  • POSIX (Linux/macOS): bash (default), sh, zsh, pwsh

Tools

terminal_configure

Establish, update, or clear the active terminal configuration for your authenticated MWS session.

{
  "type": "powershell",
  "workspace": "Z:/projects/youtube",
  "env": { "PYTHONUTF8": "1" }
}
  • type: Optional shell runtime (powershell, pwsh, cmd, bash, wsl).
  • workspace: Workspace directory path (validated to exist and be a directory; never silently falls back to process cwd).
  • env: Optional environment variable overrides (values are never echoed in responses or audit logs).
  • clear: Set true to clear the active session terminal configuration.

terminal_run

Execute a single command or a sequential steps list in the session's configured workspace, shell, and environment.

Single command:

{
  "command": "pytest",
  "args": ["tests/", "-q"]
}

Multi-step execution:

{
  "steps": [
    { "command": "ruff", "args": ["check", "."] },
    { "command": "pytest", "args": ["tests/", "-q"] },
    { "command": "python", "args": ["scripts/build_all.py"] }
  ],
  "continue_on_error": false
}
  • Uses direct process execution (shell: false) with argument arrays by default to preserve argument boundaries and avoid shell injection.
  • Set shell: true only when shell-specific syntax (pipes, redirection, shell builtins) is needed.
  • Stops on the first failed step by default (continue_on_error: false) and reports remaining steps as skipped.
  • Enforces bounded timeouts (timeout_seconds, default 120s, max 600s) and per-stream output caps (max_output_bytes, default 64 KiB, max 1 MiB) with explicit truncation metadata (truncated, max_output_bytes, original_bytes, truncation_notice) and full process-tree cleanup on timeout.
  • Process Model & Limitations: Each terminal_run call executes in a fresh foreground process (cd and shell variables do not persist across separate terminal_run calls; use steps for short multi-command workflows). Long-running development servers or file watchers should not be launched as blocking terminal_run commands.

Environment Precedence

  1. Inherited process environment (including system PATH) is preserved by default.
  2. Session-level overrides from terminal_configure(env=...) overlay the inherited environment. Supplying a new env dictionary replaces previous session overrides; passing {} clears them.
  3. Per-call overrides from terminal_run(env=...) merge on top of session-level overrides for that call only.

Workspace Aliases

Sessions can register named workspace aliases without mutating the active workspace:

  • terminal_workspace_add(alias, path, select=False)
  • terminal_workspace_list()
  • terminal_workspace_remove(alias)
  • terminal_workspace_select(alias)
  • terminal_run(command="...", workspace="frontend") (runs in the alias for that call only)

Security & Session Isolation

  • Session Isolation: Active terminal configuration is stored in the MWS gateway's SessionContext, keyed by transport-derived session identity. Child terminal processes are stateless and never share configuration across agents or tunnel clients.
  • Permission Ceiling: Arbitrary command execution is classified as high-risk/mutating. Both terminal_configure and terminal_run are blocked in read_only mode and blocked on unauthenticated (--auth none) tunnels by default.
  • Scope Filtering: Respects ToolScopeFilter (--allow-servers, --disallow-servers, --allow-tools, --disallow-tools).
  • Workspace Boundaries: Optional MWS_TERMINAL_ALLOWED_ROOTS environment variable restricts allowed workspace directories.
  • Secret Redaction: Environment variable values are never returned by terminal_configure or manage_context, and are redacted from audit logs and diagnostics.

Installation & CLI Usage

pip install mcp-win-stdio-terminal
mws guide terminal     # Print client configuration snippets
mws run terminal       # Launch server over stdio via mws
mws-terminal           # Standalone stdio server
mws-terminal doctor    # Check available shells and health

Metadata

Release files for mcp-win-stdio-terminal 0.5.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-win-stdio-terminal 0.5.7
File Size Uploaded Provenance Actions
mcp_win_stdio_terminal-0.5.7.tar.gz 13.6 kB Without provenance Details for mcp_win_stdio_terminal-0.5.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-win-stdio-terminal 0.5.7
File Interpreter ABI Platform Actions
mcp_win_stdio_terminal-0.5.7-py3-none-any.whl Python 3 none any Details for mcp_win_stdio_terminal-0.5.7-py3-none-any.whl

Total release size: 30.2 kB

Release files / mcp_win_stdio_terminal-0.5.7.tar.gz

Download URL mcp_win_stdio_terminal-0.5.7.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
13c9d44224ff658e3951a24ffe371e83cef3aa01f2e2f34e506132b98c4f3c9e
BLAKE2b-256 checksum
How to use checksums
22f3f843444360afd7f02e3f5e0219369e4ece10b0f3000ee1070021bca0867a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / mcp_win_stdio_terminal-0.5.7-py3-none-any.whl

Download URL mcp_win_stdio_terminal-0.5.7-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20ee2ae30bf07819f7ff1d1cbc9bf2bff0b48e0f0bd8ad6cb7c156bd993f81c3
BLAKE2b-256 checksum
How to use checksums
143b8825b4861fca94a87fb5a777ca22679f14207096bb4ecc63d54ea29167da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for mcp-win-stdio-terminal 0.5.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.7 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page