Windows CLI MCP Server
The Windows CLI MCP Server enables secure, controlled command-line interactions across multiple shell environments on Windows and Unix systems, allowing AI clients like Claude Desktop to execute shell commands with configurable safety controls.
Core Capabilities:
Multi-Shell Command Execution: Execute commands in PowerShell, CMD, Git Bash, Bash, and WSL, with shell-specific path formats, timeouts, and security settings
Full Output Retrieval: Use
get_command_outputto retrieve complete or truncated command output, with support for line ranges and regex filteringWorking Directory Management: Get, set, and validate working directories against allowed paths before command execution
Server Configuration Inspection: Access enabled shells, global defaults, and active security settings via
get_configas an MCP resourceDirectory Validation: Check whether specified paths fall within configured allowed paths (globally or per-shell) via
validate_directories
Security & Control Features:
Restrict commands to configured allowed directories (
restrictWorkingDirectory)Block dangerous commands, arguments, and operators
Injection protection against common shell injection characters
Per-command output line limits (default: 20 lines, up to 10,000) and timeout overrides (up to 3,600 seconds)
Shell-specific security overrides configurable per shell type
Configuration & Architecture:
Inheritance-based configuration with global defaults and shell-specific overrides via JSON files or CLI flags
Modular architecture allowing shell-specific builds for 30–65% bundle size reduction
Cross-platform support (Windows, macOS, Linux) with appropriate shell configurations
Testing support via MCP Inspector and Dev Container setup for consistent development environments
Supports development using Docker containers through the included Dev Container configuration for consistent testing and development environments.
Provides command execution capabilities through Git Bash shell, allowing interaction with Git repositories and Unix-style commands on Windows systems.
Integrates with GitHub Actions for continuous integration testing, with test environments that mirror the CI pipeline using Dev Containers.
Enables execution of Linux commands on Windows through WSL (Windows Subsystem for Linux) integration with configurable mount points and path mapping.
Built on Node.js runtime (requires version 18+) and distributed via npm, providing command-line tools for Windows system operations.
Distributed as an npm package (wcli0) with modular build options, allowing installation and execution through npx for immediate use.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Windows CLI MCP Serverlist files in the current directory using PowerShell"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Windows CLI MCP Server (Enhanced)
MCP server for secure command-line interactions on Windows systems, enabling controlled access to PowerShell, CMD, Git Bash, and Bash shells. It allows MCP clients (like Claude Desktop) to perform operations on your system, similar to Open Interpreter.
This enhanced version includes advanced configuration management, improved security features, and comprehensive testing capabilities.
This MCP server provides direct access to your system's command line interface. When enabled, it grants access to your files, environment variables, and command execution capabilities.
Review and restrict allowed paths
Enable directory restrictions
Configure command blocks
Consider security implications
See Configuration for more details.
Features
Multi-Shell Support: Execute commands in PowerShell, Command Prompt (CMD), Git Bash, Bash, and WSL
Modular Architecture: Build only the shells you need for smaller bundle sizes (30-65% reduction)
Inheritance-Based Configuration: Global defaults with shell-specific overrides
Shell-Specific Validation: Each shell can have its own security settings and path formats
Flexible Path Management: Different shells support different path formats (Windows/Unix/Mixed)
Resource Exposure: View configuration and security settings as MCP resources
Explicit Working Directory State: The server maintains an active working directory used when
execute_commandomitsworkingDir. If the launch directory isn't allowed, this state starts unset and must be set viaset_current_directory.Optional Initial Directory: Configure
initialDirto start the server in a specific directory.Security Controls:
Command blocking (full paths, case variations)
Working directory validation
Maximum command length limits
Smart argument validation
Shell-specific timeout settings
Configurable:
Inheritance-based configuration system
Shell-specific security overrides
Dynamic tool descriptions based on enabled shells
See the API section for more details on the tools and resources the server provides to MCP clients.
Note: The server will only allow operations within configured directories, with allowed commands.
Related MCP server: Terminal MCP Server
VS Code Extension
A companion VS Code extension in vscode-extension/ simplifies
configuring this server. It exposes every CLI option as ordinary VS Code settings
(scoped per User and per Workspace) and registers the MCP server with
VS Code automatically via the MCP Server Definition Provider API — no hand-edited
mcp.json required. It can also generate a config.json or a .vscode/mcp.json
on demand. See vscode-extension/README.md.
Modular Shell Architecture
WCLI0 now supports a modular architecture that allows you to build specialized versions containing only the shells you need. This results in significantly smaller bundle sizes and faster startup times.
Build Options
Choose from several pre-configured builds:
# Full build (all shells) - default
npm run build
# Windows-only shells (PowerShell, CMD, Git Bash)
npm run build:windows
# Git Bash only (smallest Windows build)
npm run build:gitbash
# CMD only
npm run build:cmd
# Unix/Linux only (Bash)
npm run build:unix
# Custom combination
INCLUDED_SHELLS=gitbash,powershell npm run build:customBundle Size Comparison
Build | Size Reduction | Shells Included |
Full | Baseline | All 5 shells |
Windows | ~40% smaller | PowerShell, CMD, Git Bash |
Git Bash Only | ~60% smaller | Git Bash |
CMD Only | ~65% smaller | CMD |
Unix | ~60% smaller | Bash |
Documentation
For detailed information about the modular architecture:
Architecture Overview - System design and module structure
User Guide - How to build and use specialized versions
API Documentation - Complete API reference for shell plugins
Migration Guide - Upgrading from previous versions
Testing Guide - Testing strategies for modular shells
Quick Start with Specialized Builds
If you only need Git Bash:
# Build
npm run build:gitbash
# Use in Claude Desktop config
{
"mcpServers": {
"windows-cli": {
"command": "node",
"args": ["/path/to/wcli0/dist/index.gitbash-only.js"]
}
}
}macOS and Unix/Linux Support
While wcli0 is primarily designed for Windows, it also supports Unix-based systems (macOS, Linux) with Bash shell integration.
Building for Unix Systems
To build wcli0 for Unix-based systems (macOS, Linux):
# Unix-only build (Bash shell)
npm run build:unix
# The output will be: dist/index.unix-only.jsStarting the Server on macOS
Start the server using npx:
# Start with default settings
npx wcli0 --shell bash
# Start with a configuration file
npx wcli0 --config ./config.mac.json
# Start with specific allowed directories
npx wcli0 --shell bash \
--allowedDir "/Users/$(whoami)" \
--allowedDir "/tmp"macOS Configuration Example
Here's a sample configuration for macOS:
{
"global": {
"security": {
"commandTimeout": 30,
"enableInjectionProtection": true,
"restrictWorkingDirectory": true
},
"restrictions": {
"blockedCommands": ["rm -rf /", "dd", "mkfs"],
"blockedArguments": ["--force", "-rf"],
"blockedOperators": ["&&", "||", ";", "|"]
},
"paths": {
"allowedPaths": ["/Users/$(whoami)", "/tmp"],
"initialDir": "/Users/$(whoami)"
}
},
"shells": {
"bash_auto": {
"type": "bash_auto",
"enabled": true
}
}
}Using with Claude Desktop on macOS
Configure Claude Desktop to use wcli0 on macOS:
{
"mcpServers": {
"macos-cli": {
"command": "npx",
"args": [
"-y",
"wcli0",
"--config",
"/path/to/config.mac.json"
]
}
}
}Important Notes for Unix Systems
Path Formats: Unix systems use forward slashes (
/) and do not support Windows drive lettersShell Type: Use
bashorbash_autoshell types on Unix systemsHome Directory: Use
$(whoami)or your actual username in pathsSecurity Commands: Some blocked commands in the default configuration are Windows-specific (e.g.,
regedit,format)
CLI Options for macOS
When running on Unix systems, use these CLI options:
Option | Type | Description |
| string | Shell to use (use |
| string | Add an allowed directory (can be used multiple times) |
| string | Path to configuration file |
| string | Initial working directory |
| flag | Disable directory restrictions |
| flag | Disable all safety checks (not recommended) |
| flag | Disable safety except directory restrictions |
Log Management
wcli0 automatically stores command execution logs and provides MCP resources for querying historical output with advanced filtering capabilities.
Output Truncation
By default, command responses show only the last 20 lines to prevent overwhelming long outputs. Full output is always stored and accessible via:
File-based storage: When
logDirectoryis configured, logs are saved to files for persistent storageIn-memory storage: Default behavior using MCP log resources (e.g.,
cli://logs/commands/{id})The
get_command_outputtool (fallback for hosts that cannot read resources)
Configure truncation settings:
{
"global": {
"logging": {
"maxOutputLines": 20,
"enableTruncation": true
}
}
}File-Based Log Storage
For persistent logging, configure a log directory:
{
"global": {
"logging": {
"logDirectory": "./logs",
"exposeFullPath": false
}
}
}Or via CLI:
npx wcli0 --shell gitbash --logDirectory ./logsWhen file-based logging is enabled:
Truncation messages show the file path directly (simpler output)
Logs persist across server restarts
No in-memory storage limits apply
Starting the server with
--debugautomatically enables file-based logging to your OS temp directory (<temp>/wcli0-debug-logs) when nologDirectoryis set, so every command and its output are persisted during debugging sessions.
Security Note: Log files may contain sensitive command output. Ensure the log directory has appropriate permissions.
Log Resources
Access stored command output via MCP resources (in-memory mode):
cli://logs/list- List all stored command execution logscli://logs/recent?n=10- Get the N most recent logscli://logs/commands/{id}- Access full output from a specific commandcli://logs/commands/{id}/range?start=1&end=100- Query specific line rangescli://logs/commands/{id}/search?q=error&context=3- Search logs with context
See API Documentation for detailed resource specifications and query parameters.
Example Configuration
{
"global": {
"logging": {
"maxOutputLines": 20,
"enableTruncation": true,
"maxStoredLogs": 50,
"maxLogSize": 1048576,
"enableLogResources": true,
"logRetentionMinutes": 1440,
"logDirectory": "./logs"
}
}
}Usage with Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"windows-cli": {
"command": "npx",
"args": ["-y", "wcli0"]
}
}
}For use with a specific config file, add the --config flag:
{
"mcpServers": {
"windows-cli": {
"command": "npx",
"args": [
"-y",
"wcli0",
"--config",
"path/to/your/config.json"
]
}
}
}Configuration Setup
To get started with configuration:
Use a sample configuration:
Copy
config.examples/config.sample.jsonfor basic setupCopy
config.examples/config.development.jsonfor development environmentsCopy
config.examples/config.secure.jsonfor high-security environmentsCopy
config.examples/emptyRestrictions.jsonto remove all default restrictions
Create your own configuration:
# Copy and customize a sample cp config.examples/config.sample.json my-config.json # Or generate a default config npx wcli0 --init-config ./my-config.jsonThe server also accepts an
--initialDirflag to override the initial working directory defined in your configuration file:npx wcli0 --config ./my-config.json --initialDir /path/to/startYou can override global command limits directly from the CLI:
npx wcli0 --config ./my-config.json \ --maxCommandLength 5000 --commandTimeout 60You can configure output truncation and logging via CLI:
npx wcli0 --shell gitbash \ --maxOutputLines 50 \ --enableTruncation \ --enableLogResources \ --maxReturnLines 1000 \ --logDirectory ./logsOption
Type
Default
Description
--maxOutputLinesnumber
20
Maximum output lines before truncation
--enableTruncationboolean
true
Enable output truncation
--enableLogResourcesboolean
true
Enable log resources for
get_command_output--maxReturnLinesnumber
500
Maximum lines returned by
get_command_output--logDirectorystring
-
Directory for file-based log storage (instead of in-memory)
When
--logDirectoryis configured, command output logs are saved to files instead of in-memory storage. Truncation messages will show the file path for easy access to full output.Security Note: Log files may contain sensitive data from command output. Ensure the log directory has appropriate permissions and consider implementing log rotation.
You can override blocked restrictions directly from the CLI. Pass the option with an empty string to clear defaults:
npx wcli0 --blockedCommand "" --blockedArgument "" --blockedOperator ""Provide the flag multiple times to specify values:
npx wcli0 --blockedCommand rm --blockedCommand delYou can also start the server with a specific shell and allowed directories without a configuration file:
npx wcli0 --shell powershell \ --allowedDir C:\safe --allowedDir D:\projectsFor WSL shells, you can specify a custom mount location:
npx wcli0 --shell wsl \
--wslMountPoint /windows/To disable directory restrictions entirely when no allowed paths are configured, start the server with:
npx wcli0 --allowAllDirs When started this way, restrictWorkingDirectory is forced on and
enableInjectionProtection is disabled to ensure the allowed paths apply
without shell injection checks.
If you need to disable safety checks that block command execution for experimentation, you can start the server in unsafe or YOLO modes (not recommended for production):
# YOLO disables all safety checks except allowed working directories
npx wcli0 --yolo
# Fully unsafe removes all safety checks, including directory limits
npx wcli0 --unsafeBoth modes clear blocked commands/arguments/operators and turn off injection protection. YOLO mode leaves working directory restrictions active, while fully unsafe mode disables those restrictions as well. These two flags are mutually exclusive; using both at once will fail.
You can start the server with an HTTP-based transport instead of the default stdio transport, so remote and web-based MCP clients can connect over HTTP. Two HTTP transports are available:
http-- the modern Streamable HTTP transport (MCP protocol revision 2025-03-26), serving a single/mcpendpoint. This is what current MCP clients default to and is the recommended HTTP transport.sse-- the legacy HTTP+SSE transport (MCP protocol revision 2024-11-05), using two endpoints (GET /sse,POST /messages). It is deprecated by the MCP spec in favor of Streamable HTTP and is kept only for compatibility with older clients.The modes are mutually exclusive (selected by
--transport) and use separate bind settings (--http-*forhttp,--sse-*forsse).# Streamable HTTP on the default host/port (127.0.0.1:9444), serving /mcp npx wcli0 --transport http # Custom port, still bound to localhost npx wcli0 --transport http --http-host 127.0.0.1 --http-port 3000 # Legacy HTTP+SSE transport npx wcli0 --transport sse --sse-host 127.0.0.1 --sse-port 3000Option
Type
Default
Description
--transportstring
stdio
Transport protocol:
stdio,http(Streamable HTTP), orsse(legacy HTTP+SSE)--http-hoststring
127.0.0.1
Host address for the Streamable HTTP transport (
httpmode)--http-portnumber
9444
Port for the Streamable HTTP transport (
httpmode)--http-allowed-originsstring
(none)
Comma-separated browser origins allowed for
httpmode, in addition to loopback hosts and the bind host (e.g.https://app.example.com,192.168.1.10). Only the host component is compared. Required for browser clients on a wildcard (0.0.0.0) bind.--sse-hoststring
127.0.0.1
Host address for the legacy SSE transport (
ssemode)--sse-portnumber
9444
Port for the legacy SSE transport (
ssemode)--sse-allowed-originsstring
(none)
Comma-separated browser origins allowed for
ssemode, in addition to loopback hosts and the bind host. Only the host component is compared. Required for browser clients on a wildcard (0.0.0.0) bind.When
httpmode is active, clients use a single/mcpendpoint:POST /mcpcarries client-to-server JSON-RPC messages. Aninitializerequest with no session id starts a new session; the server returns the assigned id in theMcp-Session-Idresponse header, and the client must send that header on every subsequent request.GET /mcpopens the optional server-to-client SSE stream for an existing session.DELETE /mcpterminates an existing session.Sessions are stateful and isolated: each session has its own active working directory, so one client's
set_current_directorycannot affect another. Requests carrying an unknown or terminatedMcp-Session-Idare rejected with404 Not Found. The server logs the bind address and port on startup (with--debug).When
ssemode is active, clients instead connect viaGET /sseto open an SSE stream and send messages viaPOST /messages?sessionId=<id>.Configuring Streamable HTTP entirely with CLI parameters (no config file). Every transport and operational setting can be supplied as an input parameter, so the server can run as a Streamable HTTP server without any config file:
npx wcli0 \ --transport http \ --http-host 127.0.0.1 \ --http-port 9444 \ --http-allowed-origins "https://app.example.com,192.168.1.10" \ --shell gitbash \ --allowedDir "D:/work/project" \ --commandTimeout 60 \ --debugCLI parameters also take precedence over a config file, so the same
--http-*flags override the correspondingtransportfields when a--configfile is also passed (see the transport config section).Both HTTP transports validate the request
Originheader to mitigate DNS-rebinding attacks: requests whoseOriginis not a loopback host, the configured bind host, or one of the configured allowed origins (--http-allowed-origins/--sse-allowed-origins) are rejected with403 Forbidden, while non-browser clients that send noOriginare allowed. Allowed browser origins receive CORS headers, andOPTIONSpreflight requests are answered with204.Security: Neither HTTP transport has built-in authentication, and both expose command-execution tools. Keep the server bound to
127.0.0.1(the default) for local use. Binding to0.0.0.0or any non-loopback address exposes those tools to every host that can reach the port; only do so behind an authenticated reverse proxy or equivalent access control. Origin validation alone does not authenticate non-browser clients.Wildcard binds and browser origins: When binding to a wildcard address (
0.0.0.0/::), the bind host is not a usable origin to compare against, so browser clients reaching the server through its real LAN address (or a reverse proxy whose public hostname differs from the bind host) are rejected unless their origin is listed in--http-allowed-origins/--sse-allowed-origins(or thetransport.httpAllowedOrigins/transport.sseAllowedOriginsconfig arrays). Non-browser clients are unaffected, since they send noOrigin.
Update your Claude Desktop configuration to use your config file:
{ "mcpServers": { "windows-cli": { "command": "npx", "args": [ "-y", "wcli0", "--config", "./my-config.json" ] } } }
After configuring, you can:
Execute commands directly using the available tools
View server configuration and security settings in the Resources section
Access shell-specific configurations and capabilities
Configuration
The server uses an inheritance-based configuration system where global defaults can be overridden by shell-specific settings.
Configuration Structure
{
"global": {
"security": {
"maxCommandLength": 2000,
"commandTimeout": 30,
"enableInjectionProtection": true,
"restrictWorkingDirectory": true
},
"restrictions": {
"blockedCommands": ["format", "shutdown"],
"blockedArguments": ["--exec", "-e"],
"blockedOperators": ["&", "|", ";", "`"]
},
"paths": {
"allowedPaths": ["/home/user", "/tmp"],
"initialDir": "/home/user"
}
},
"shells": {
"powershell": {
"type": "powershell",
"enabled": true,
"executable": {
"command": "powershell.exe",
"args": ["-NoProfile", "-NonInteractive", "-Command"]
},
"overrides": {
"security": {
"commandTimeout": 45
},
"restrictions": {
"blockedCommands": ["Remove-Item", "Format-Volume"]
}
}
},
"wsl": {
"type": "wsl",
"enabled": true,
"executable": {
"command": "wsl.exe",
"args": ["-e"]
},
"wslConfig": {
"mountPoint": "/mnt/",
"inheritGlobalPaths": true
}
}
}
}Configuration Locations
The server looks for configuration files in the following order:
Path specified via
--configcommand line argumentwin-cli-mcp.config.jsonin the current working directory~/.win-cli-mcp/config.jsonin user's home directory
If no configuration file is found, the server will use a default (restricted) configuration.
Default Configuration
Note: The default configuration is designed to be restrictive and secure. Find more details on each setting in the Configuration Settings section.
For a complete reference of all default values, see docs/defaults.md.
{
"global": {
"security": {
"maxCommandLength": 2000,
"commandTimeout": 30,
"enableInjectionProtection": true,
"restrictWorkingDirectory": true
},
"restrictions": {
"blockedCommands": [
"rm", "del", "rmdir", "format", "shutdown", "restart",
"reg", "regedit", "net", "netsh", "takeown", "icacls"
],
"blockedArguments": [
"--exec", "-e", "/c", "-enc", "-encodedcommand",
"-command", "--interactive", "-i", "--login", "--system"
],
"blockedOperators": ["&", "|", ";", "`"]
},
"paths": {
"initialDir": null
}
},
"shells": {
"powershell": {
"type": "powershell",
"enabled": true,
"executable": {
"command": "powershell.exe",
"args": ["-NoProfile", "-NonInteractive", "-Command"]
}
},
"cmd": {
"type": "cmd",
"enabled": true,
"executable": {
"command": "cmd.exe",
"args": ["/c"]
}
},
"gitbash": {
"type": "gitbash",
"enabled": true,
"executable": {
"command": "C:\\Program Files\\Git\\bin\\bash.exe",
"args": ["-c"]
}
}
}
}Configuration Settings
The configuration file uses an inheritance system with two main sections: global and shells.
Global Settings
Global settings provide defaults that apply to all shells unless overridden.
Security Settings
{
"global": {
"security": {
// Maximum allowed length for any command
"maxCommandLength": 2000,
// Command execution timeout in seconds
"commandTimeout": 30,
// Enable protection against command injection
"enableInjectionProtection": true,
// Restrict commands to allowed working directories
"restrictWorkingDirectory": true
}
}
}Restriction Settings
{
"global": {
"restrictions": {
// Commands to block - blocks both direct use and full paths
"blockedCommands": ["rm", "format", "shutdown"],
// Arguments to block across all commands
"blockedArguments": ["--exec", "-e", "/c"],
// Operators to block in commands
"blockedOperators": ["&", "|", ";", "`"]
}
}
}Path Settings
{
"global": {
"paths": {
// Directories where commands can be executed
"allowedPaths": ["/home/user", "/tmp", "C:\\Users\\username"],
// Initial working directory (null = use launch directory)
"initialDir": "/home/user",
// Whether to restrict working directories
"restrictWorkingDirectory": true
}
}
}If the allowedPaths array is omitted from your configuration file, no default
directories are automatically allowed. When restrictWorkingDirectory is
enabled, only the initialDir (if specified) will be added to the allowed paths
list.
Use the --allowAllDirs flag when launching the server to automatically
disable restrictWorkingDirectory if no allowed paths or initialDir are set.
Shell Configuration
Each shell can be individually configured and can override global settings.
Each shell entry must include a type field indicating the shell. Valid values are powershell, cmd, gitbash, bash, and wsl.
Basic Shell Configuration
{
"shells": {
"powershell": {
"type": "powershell",
"enabled": true,
"executable": {
"command": "powershell.exe",
"args": ["-NoProfile", "-NonInteractive", "-Command"]
}
}
}
}Shell-Specific Overrides
{
"shells": {
"powershell": {
"type": "powershell",
"enabled": true,
"executable": {
"command": "powershell.exe",
"args": ["-NoProfile", "-NonInteractive", "-Command"]
},
"overrides": {
"security": {
"commandTimeout": 45,
"maxCommandLength": 3000
},
"restrictions": {
"blockedCommands": ["Remove-Item", "Format-Volume"],
"blockedOperators": ["|", "&"]
}
}
}
}
}WSL Configuration
WSL shells have additional configuration options for path mapping:
{
"shells": {
"wsl": {
"type": "wsl",
"enabled": true,
"executable": {
"command": "wsl.exe",
"args": ["-e"]
},
"wslConfig": {
"mountPoint": "/mnt/",
"inheritGlobalPaths": true
}
}
}
}You can override the mount point at startup using the --wslMountPoint CLI flag.
Configuration Inheritance
The transport section can also be set in the config file. For the Streamable
HTTP transport (http mode):
{
"transport": {
"mode": "http",
"httpHost": "127.0.0.1",
"httpPort": 9444,
"httpAllowedOrigins": ["https://app.example.com", "192.168.1.10"]
}
}For the legacy HTTP+SSE transport (sse mode):
{
"transport": {
"mode": "sse",
"sseHost": "127.0.0.1",
"ssePort": 9444,
"sseAllowedOrigins": ["https://app.example.com", "192.168.1.10"]
}
}Field | Type | Default | Applies to | Description |
| string |
| all |
|
| string |
|
| Bind host for the Streamable HTTP transport |
| number |
|
| Bind port for the Streamable HTTP transport (integer |
| string[] |
|
| Browser origins allowed in addition to loopback hosts and |
| string |
|
| Bind host for the legacy SSE transport |
| number |
|
| Bind port for the legacy SSE transport (integer |
| string[] |
|
| Browser origins allowed in addition to loopback hosts and |
The *AllowedOrigins lists are optional and default to an empty list. Each
entry is an origin URL or a bare host; only the host component is compared
(case-insensitively).
CLI flags override config-file values: --transport, --http-host,
--http-port, --http-allowed-origins, --sse-host, --sse-port, and
--sse-allowed-origins.
The inheritance system works as follows:
Global defaults are applied to all shells
Shell-specific overrides replace or extend global settings
Array settings (like
blockedCommands) override defaults when provided. Specifying an empty array removes all default entries for that setting.Object settings are deep-merged
Primitive settings are replaced
Example of inheritance in action:
{
"global": {
"security": { "commandTimeout": 30 },
"restrictions": { "blockedCommands": ["rm", "format"] }
},
"shells": {
"powershell": {
"type": "powershell",
"overrides": {
"security": { "commandTimeout": 45 },
"restrictions": { "blockedCommands": ["Remove-Item"] }
}
}
}
}Results in PowerShell having:
commandTimeout: 45 (overridden)blockedCommands: ["Remove-Item"] (overrides defaults)
To completely remove defaults for a given restriction, provide an empty array:
{
"global": {
"restrictions": {
"blockedCommands": [],
"blockedArguments": [],
"blockedOperators": []
}
},
"shells": {
"powershell": {
"type": "powershell",
"overrides": {
"restrictions": { "blockedCommands": [] }
}
}
}
}Environment Profiles
Named environment profiles let a single server instance run the same CLI tool under different environment variable sets, selected per call via the optional profile parameter on execute_command. A common use case is testing the same SQL against different sqlplus versions, where each version needs its own ORACLE_HOME, TNS_ADMIN, and a PATH that points at that version's bin.
Profiles are defined under an optional top-level profiles map. Each entry accepts:
Field | Type | Required | Description |
| object | Yes | Map of environment variable names to string values. Values support |
| string | No | Human-readable summary surfaced in the |
| string[] | No | Shells this profile may be used with ( |
{
"profiles": {
"ora19": {
"description": "Oracle 19c sqlplus client",
"allowedShells": ["cmd", "powershell"],
"env": {
"ORACLE_HOME": "C:\\oracle\\product\\19.0.0\\client",
"TNS_ADMIN": "C:\\oracle\\product\\19.0.0\\client\\network\\admin",
"PATH": "C:\\oracle\\product\\19.0.0\\client\\bin;${PATH}"
}
}
}
}Behavior:
When a profile is selected, its
envmap is merged over the server's environment ({ ...process.env, ...profileEnv }) before the command runs.${VAR}is replaced with the server environment value ofVAR; an undefined reference resolves to an empty string. This is howPATHis prepended ("C:\\oracle\\product\\19.0.0\\client\\bin;${PATH}").Profiles are validated at load time:
envmust be a non-empty string-to-string map and everyallowedShellsentry must be a known shell. Invalid profiles abort startup with a descriptive error.Selecting an unknown profile, or a profile whose
allowedShellsexcludes the requested shell, returns anInvalidParamserror.When no
profilesare configured, behavior is unchanged and theprofileparameter is not exposed.
A complete example is provided in config.examples/profiles.json. See Configuration Examples for more.
API
Tools
execute_command
Execute a command in the specified shell
Inputs:
shell(string): Shell to use ("powershell", "cmd", "gitbash", "bash", or "wsl")command(string): Command to executeworkingDir(optional string): Working directorymaxOutputLines(optional number): Maximum output lines to return (1-10,000). Overrides global setting.timeout(optional number): Command timeout in seconds (1-3,600). Overrides global setting.profile(optional string): Named environment profile to apply for this command. Must name a configured profile (see Environment Profiles). Only present in the schema when profiles are configured; omit to run with the server's default environment.
Returns command output as text, or error message if execution fails
If
workingDiris omitted, the command runs in the server's active working directory. If this has not been set, the tool returns an error.
get_current_directory
Get the server's active working directory
If the directory is not set, returns a message explaining how to set it
set_current_directory
Set the server's active working directory
Inputs:
path(string): Path to set as current working directory
Returns confirmation message with the new directory path, or error message if the change fails
get_config
Get the windows CLI server configuration
Returns the server configuration as a JSON string (excluding sensitive data)
validate_directories
Check if specified directories are within allowed paths
Only available when
restrictWorkingDirectoryis enabled in configurationInputs:
directories(array of strings): List of directory paths to validate
Returns success message if all directories are valid, or error message detailing which directories are outside allowed paths
Resources
cli://config
Returns the main CLI server configuration (excluding sensitive data like blocked command details if security requires it).
cli://logs/list
List all stored command execution logs with metadata
cli://logs/recent?n={count}
Get the N most recent command logs (default: 5)
cli://logs/commands/{id}
Access full output from a specific command execution
cli://logs/commands/{id}/range?start={n}&end={m}
Query specific line ranges from a log (supports negative indices)
cli://logs/commands/{id}/search?q={pattern}&context={n}&occurrence={n}
Search logs with regex patterns and context lines
Security Considerations
This server allows external tools to execute commands on your system. Exercise extreme caution when configuring and using it.
Built-in Security Features
Path Restrictions: Commands can only be executed in specified directories (
allowedPaths) ifrestrictWorkingDirectoryis true.Command Blocking: Defined commands and arguments are blocked to prevent potentially dangerous operations (
blockedCommands,blockedArguments).Injection Protection: Common shell injection characters (
;,&,|,`) are blocked in command strings ifenableInjectionProtectionis true.Timeout: Commands are terminated if they exceed the configured timeout (
commandTimeout).Input validation: All user inputs are validated before execution
Shell process management: Processes are properly terminated after execution or timeout
Configurable Security Features (Active by Default)
Working Directory Restriction (
restrictWorkingDirectory): HIGHLY RECOMMENDED. Limits command execution to safe directories.Injection Protection (
enableInjectionProtection): Recommended to prevent bypassing security rules.
Best Practices
Minimal Allowed Paths: Only allow execution in necessary directories.
Restrictive Blocklists: Block any potentially harmful commands or arguments.
Regularly Review Logs: Check the command history for suspicious activity.
Keep Software Updated: Ensure Node.js, npm, and the server itself are up-to-date.
Using the MCP Inspector for Testing
Use the Inspector to interactively test this server with a custom config file. Pass any server flags after --:
# Inspect with built server and test config
npx @modelcontextprotocol/inspector -- node dist/index.js --config tests/config.json
# Or test the published package
npx @modelcontextprotocol/inspector wcli0 -- --config tests/config.jsonDevelopment and Testing
This project requires Node.js 18 or later.
Running Tests
# Install dependencies
npm install
# Run all tests
npm test
# Run specific test suites
npm run test:validation # Path validation tests
npm run test:wsl # WSL emulation tests
npm run test:integration # Integration tests
npm run test:async # Async operation tests
# Run tests with coverage
npm run test:coverage
# Debug open handles
npm run test:debugCross-Platform Testing
The project uses a Node.js-based WSL emulator (scripts/wsl-emulator.js) to enable testing of WSL functionality on all platforms. This allows the test suite to run successfully on both Windows and Linux environments.
Acknowledgments
This project is based on the excellent work by SimonB97 in the win-cli-mcp-server repository. Due to significant configuration differences and architectural changes that made merging back to the source repository challenging, this has been maintained as a separate fork with enhanced features and extensive modifications.
Key enhancements in this version:
Enhanced inheritance-based configuration system
Improved WSL support with cross-platform testing
Advanced security features and path validation
Comprehensive test coverage with Node.js-based WSL emulation
Extended documentation and configuration examples
We gratefully acknowledge SimonB97's foundational work that made this project possible.
Development Environment using Dev Containers
This project includes a Dev Container configuration, which allows you to use a Docker container as a fully-featured development environment. This ensures consistency and makes it easy to get started with development and testing.
Prerequisites
Docker Desktop installed and running.
Visual Studio Code installed.
The Dev Containers extension installed in VS Code.
Getting Started
Clone this repository to your local machine.
Open the repository in Visual Studio Code.
When prompted "Reopen in Container", click the button. (If you don't see a prompt, you can open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P) and select "Dev Containers: Reopen in Container".)
VS Code will build the dev container image (as defined in
.devcontainer/devcontainer.jsonandDockerfile) and start the container. This might take a few minutes the first time.Once the container is built and started, your VS Code will be connected to this environment. The
postCreateCommand(npm install) will ensure all dependencies are installed.
Running Tests in the Dev Container
After opening the project in the dev container:
Open a new terminal in VS Code (it will be a terminal inside the container).
Run the tests using the command:
npm test
This setup mirrors the environment used in GitHub Actions for tests, ensuring consistency between local development and CI.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Available Tools
6 toolsexecute_commandA
Execute a command in the specified shell (powershell, cmd, gitbash, bash, wsl)
IMPORTANT GUIDELINES:
ALWAYS use the
workingDirparameter to specify the working directoryRequest config of this MCP server configuration using tools
Follow limitations taken from configuration
Use validate_directories tool to validate directories before execution
Shell-Specific Settings:
powershell:
Command timeout: 30s
Max command length: 2000 characters
Injection protection: enabled
Blocked operators: &, |, ;, `
Path format: Windows-style (C:\Users...)
cmd:
Command timeout: 30s
Max command length: 2000 characters
Injection protection: enabled
Blocked operators: &, |, ;, `
Path format: Windows-style (C:\Users...)
gitbash:
Command timeout: 30s
Max command length: 2000 characters
Injection protection: enabled
Blocked operators: &, |, ;, `
Path format: Mixed (C:... or /c/...)
bash:
Command timeout: 30s
Max command length: 2000 characters
Injection protection: enabled
Blocked operators: &, |, ;, `
Path format: Unix-style (/home/user, /mnt/c/...)
wsl:
Command timeout: 30s
Max command length: 2000 characters
Injection protection: enabled
Blocked operators: &, |, ;, `
Path format: Unix-style (/home/user, /mnt/c/...)
Inherits global Windows paths (converted to /mnt/...)
Working Directory:
If omitted, uses the server's current directory
Must be within allowed paths for the selected shell
Must use the correct format for the shell type
Output Truncation:
Output is automatically truncated if it exceeds the configured limit
Current limit: 20 lines
Use
maxOutputLinesparameter to override the limit for a specific commandIf truncated, use
get_command_outputtool with the executionId to retrieve full outputWhen file logging is enabled (via
logDirectory), full logs are also saved to disk
Command Timeout:
Each shell has a default command timeout (see Shell-Specific Settings above)
Use
timeoutparameter to override the timeout for a specific commandTimeout must be a positive integer between 1 and 3,600 seconds (1 hour)
If the timeout is exceeded, the command will be terminated
Examples:
Windows CMD:
{
"shell": "cmd",
"command": "dir /b",
"workingDir": "C:\\Projects"
}WSL:
{
"shell": "wsl",
"command": "ls -la",
"workingDir": "/home/user",
"maxOutputLines": 50
}With custom timeout:
{
"shell": "wsl",
"command": "long-running-command",
"workingDir": "/home/user",
"timeout": 120
}Bash:
{
"shell": "bash",
"command": "ls -la",
"workingDir": "/home/user",
"maxOutputLines": 50
}Git Bash:
{
"shell": "gitbash",
"command": "git status",
"workingDir": "/c/Projects/repo" // or "C:\Projects\repo"
}With custom output limit:
{
"shell": "gitbash",
"command": "git log --oneline -50",
"workingDir": "/c/Projects/repo",
"maxOutputLines": 100
}| Name | Required | Description | Default |
|---|---|---|---|
| shell | Yes | Shell to use for command execution | |
| command | Yes | Command to execute. Note: Different shells have different blocked commands and operators. | |
| workingDir | No | Working directory (optional). Format depends on shell type: - Windows shells: Use C:\Path\Format - Unix/WSL shells: Use /unix/path/format - Mixed shells: Both formats accepted | |
| maxOutputLines | No | Maximum number of output lines to return (optional, overrides global setting). Must be a positive integer between 1 and 10,000. | |
| timeout | No | Command timeout in seconds (optional, overrides global setting). Must be a positive integer between 1 and 3,600 (1 hour). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses timeouts, max command length, injection protection, blocked operators, output truncation, working directory behavior, and logging for each shell. Comprehensive behavioral disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with sections, bullet points, and examples. Front-loaded with purpose and guidelines. Every element earns its place; no fluff. Examples illustrate various shells and parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema, description covers all aspects: parameters, shell variations, output truncation, timeout handling, and references to sibling tools. Complete enough for an agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, baseline 3. Description adds extensive semantics: per-shell path formats, blocked operators, timeout/line overrides, and working directory format requirements. Significantly enriches parameter understanding beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it executes a command in a specified shell, lists supported shells, and provides examples. It distinguishes from sibling tools like get_command_output and validate_directories by explaining their specific roles.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit guidelines include always using workingDir, following configuration, using validate_directories, and handling output truncation with get_command_output. The description provides clear when-to-use and when-not-to-use context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_command_outputA
Retrieve the full output from a previous command execution.
Use this tool when command output was truncated and you need to see the complete result. The executionId is provided in the truncation message of the original command.
Parameters:
executionId (required): The execution ID from the truncation message
startLine (optional): 1-based start line (default: 1)
endLine (optional): 1-based end line (default: last line)
search (optional): Regex pattern (case-insensitive) to filter lines
maxLines (optional): Maximum lines to return (default: config value)
Examples:
{ "executionId": "20251125-143022-a8f3" }{ "executionId": "20251125-143022-a8f3", "startLine": 100, "endLine": 150 }{ "executionId": "20251125-143022-a8f3", "search": "error|failed|exception" }| Name | Required | Description | Default |
|---|---|---|---|
| executionId | Yes | Execution ID from a previous command (shown in truncation message) | |
| startLine | No | 1-based start line (optional, default 1) | |
| endLine | No | 1-based end line (optional, default last line) | |
| search | No | Regex pattern to filter lines (case-insensitive) | |
| maxLines | No | Maximum lines to return (default: config maxReturnLines) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, description carries full burden. It explains the retrieval nature and parameters like search and maxLines. Could be more explicit about behavior for large outputs or if it modifies state, but overall good.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with separate sections for description, parameter list, and code examples. Concise yet comprehensive, every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Even without output schema, description explains return nature (lines of output) and covers all parameters. Provides sufficient context for correct usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with good descriptions, but description adds examples, clarifies 1-based line numbers, and explains configurable default for maxLines. Adds clear value beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it retrieves full output from a previous command execution when truncated. Distinguishes from sibling tools like execute_command by focusing on retrieval rather than execution.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states to use when output was truncated and references the execution ID from truncation message. Provides clear context but does not list when not to use or alternative tools for non-truncated scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_configA
Get the windows CLI server configuration
Returns:
global: Default settings applied to all shellsshells: Enabled shells with any overrides applied
Only enabled shells are included and technical fields like executables are omitted.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Description clarifies that only enabled shells are included and technical fields are omitted, providing useful constraints. No annotations, so description carries the burden well for a read-only configuration tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise and well-structured with bullet points for return sections. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with no parameters and no output schema. The description fully covers what is returned and what is omitted, making it complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist (baseline 4). Description adds no parameter info, which is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get the windows CLI server configuration' and elaborates on the return structure, distinguishing it from sibling tools that focus on command execution and directory management.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives, though its purpose is distinct. Agents can infer usage from the description but lack exclusions or context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_current_directoryA
Get the current working directory
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose any behavioral traits beyond the name. There is no mention of side effects, permissions, or return format. The description carries the full burden but adds no extra context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no wasted words. It is appropriately sized for a tool with no parameters and a simple purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no parameters, no output schema, and a straightforward action, the description is complete enough. It explains what the tool does without needing further details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters and schema coverage is 100% (vacuously). The description adds no additional parameter semantics because there are none. Baseline for zero parameters is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action and resource: 'Get the current working directory'. It is a specific verb-noun pair that distinguishes itself from sibling tools like execute_command or set_current_directory.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance is provided. However, the purpose is straightforward and the tool is a simple getter, so implied usage is clear. No alternatives or exclusions are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
set_current_directoryC
Set the current working directory
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to set as current working directory |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It only states the action without explaining side effects, scope (e.g., session persistence), or error conditions. This leaves significant ambiguity for the agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, but it is under-specified. It omits critical context, making it insufficient rather than concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one parameter and no output schema, the description is still incomplete. It does not explain the effect on subsequent operations, return status, or error handling, which is essential for simple state-changing tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The tool description adds no additional meaning beyond what the schema's parameter description already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Set' and the resource 'current working directory', making the purpose understandable. However, it does not differentiate from sibling tools like 'get_current_directory' or 'execute_command'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There are no mentions of prerequisites, when not to use it, or context for invocation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
validate_directoriesA
Check if directories are within allowed paths (only available when restrictWorkingDirectory is enabled)
Validation Modes:
Global: Validates against server-wide allowed paths (default)
Shell-specific: Validates against a specific shell's allowed paths
Shell-Specific Validation: Add the "shell" parameter to validate for a specific shell:
{
"directories": ["/home/user", "/tmp"],
"shell": "wsl"
}| Name | Required | Description | Default |
|---|---|---|---|
| directories | Yes | List of directory paths to validate | |
| shell | No | Optional: Validate against a specific shell's allowed paths instead of global paths |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds context about modes and the restrictWorkingDirectory condition, but it does not disclose the tool's output format or behavior on invalid directories. Since no annotations exist, the description carries the burden, and it partially meets it.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, uses markdown headers and a code block for clarity, and front-loads the main purpose. It is efficient with no wasted sentences.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers input semantics well and explains modes, but it lacks information about the output (e.g., returns boolean or error), which is important for a validation tool with no output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value by explaining the shell parameter's purpose and providing an example JSON, clarifying usage beyond the schema's enum description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: checking if directories are within allowed paths, with a specific availability condition. It distinguishes from sibling tools like execute_command and get_config by focusing on validation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description describes two validation modes (global and shell-specific) and how to use the shell parameter, but it does not explicitly state when to use this tool over siblings or provide when-not-to-use guidance. Usage is implied but not fully explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v1.2.3- Changed
execute_command6 fields changed- changed
Input schema / properties / shell / enumPrevious value: -[ - "powershell", - "cmd", - "gitbash", - "bash", - "wsl" -]New value: +[ + "bash" +] - removed
Input schema / properties / shell / enumDescriptions / cmdRemoved value: -"cmd shell - timeout: 30s - Windows paths" - removed
Input schema / properties / shell / enumDescriptions / gitbashRemoved value: -"gitbash shell - timeout: 30s - Mixed paths" - removed
Input schema / properties / shell / enumDescriptions / powershellRemoved value: -"powershell shell - timeout: 30s - Windows paths" - removed
Input schema / properties / shell / enumDescriptions / wslRemoved value: -"wsl shell - timeout: 30s - Unix paths" - added
Input schema / properties / timeoutAdded value: +{ + "description": "Command timeout in seconds (optional, overrides global setting). Must be a positive integer between 1 and 3,600 (1 hour).", + "type": "number" +}
- Changed
validate_directories1 field changed- changed
Input schema / properties / shell / enumPrevious value: -[ - "powershell", - "cmd", - "gitbash", - "bash", - "wsl" -]New value: +[ + "bash" +]
6 tool updates
v1.0.0- First observed
execute_command - First observed
get_command_output - First observed
get_config - First observed
get_current_directory - First observed
set_current_directory - First observed
validate_directories
TDQS
Each tool has a distinct purpose: executing commands, retrieving truncated output, getting configuration, managing current directory, validating paths. No overlap or ambiguity.
All tools use a consistent verb_noun pattern in snake_case (e.g., execute_command, set_current_directory), making them predictable and easy to understand.
Six tools is appropriate for a CLI execution server. They cover core functionality (command execution, output retrieval, directory management, configuration, path validation) without bloat.
The tool set covers the main workflows: executing commands, retrieving full output, managing the working directory, and validating paths. A minor gap is the lack of a tool to list available shells or see shell-specific settings without calling get_config, but it's not essential.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Scoped, audited SSH exec, sessions, and SFTP on your saved servers without exposing credentials
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Execute PowerShell commands securely with controlled timeouts and input validation. Retrieve syste…
Remote shell and detached long-running jobs on your own machines — no SSH, open ports or VPN.
Related MCP Servers
- AlicenseBqualityFmaintenanceA Model Context Protocol server that provides secure command-line access to Windows systems, allowing MCP clients like Claude Desktop to safely execute commands in PowerShell, CMD, and Git Bash shells with configurable security controls.91,215269MIT
- FlicenseNot gradedqualityDmaintenanceEnables safe execution of terminal commands across different shells (bash, cmd, PowerShell) with configurable timeouts, working directories, and resource limits for command-line operations through AI assistants.-
- AlicenseBqualityDmaintenanceEnables secure command-line interactions on Windows systems through PowerShell, CMD, and Git Bash, with support for SSH remote connections, SFTP file transfers, system monitoring, and configurable security controls including command blocking and path restrictions.342MIT
- AlicenseAqualityDmaintenanceEnables secure terminal command execution, directory navigation, and file system operations through a standardized interface.10MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/s2005/wcli0'
If you have feedback or need assistance with the MCP directory API, please join our Discord server