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: Settrueto 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: trueonly 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 asskipped. - 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_runcall executes in a fresh foreground process (cdand shell variables do not persist across separateterminal_runcalls; usestepsfor short multi-command workflows). Long-running development servers or file watchers should not be launched as blockingterminal_runcommands.
Environment Precedence
- Inherited process environment (including system
PATH) is preserved by default. - Session-level overrides from
terminal_configure(env=...)overlay the inherited environment. Supplying a newenvdictionary replaces previous session overrides; passing{}clears them. - 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. Childterminalprocesses are stateless and never share configuration across agents or tunnel clients. - Permission Ceiling: Arbitrary command execution is classified as high-risk/mutating. Both
terminal_configureandterminal_runare blocked inread_onlymode 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_ROOTSenvironment variable restricts allowed workspace directories. - Secret Redaction: Environment variable values are never returned by
terminal_configureormanage_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)
| 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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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.