A command-line interface server that provides unrestricted system access to Windows environments with SYSTEM-level privileges, allowing complete control over files, processes, and configuration settings.
An enhanced fork of the Windows CLI MCP Server providing unrestricted system access to Windows environments via a command-line interface (MCP).
Based on: win-cli-mcp-server by SimonB97.
This server is designed to run with SYSTEM-level privileges on Windows. This grants it complete and unrestricted access to the entire operating system, including all files, processes, and configuration settings.
allowedPaths
, blockedCommands
, and other security settings in config.json
. A misconfiguration can easily expose your system.Use this software responsibly and at your own risk. The maintainers assume no liability for misuse or security breaches resulting from its use.
config.json
).config.json
).Before you begin, ensure you have the following installed:
This method installs the server as a persistent Windows service that runs with SYSTEM privileges and starts automatically.
Clone or Download:
git clone
.zip
and extract it to a suitable location (e.g., C:\Servers\SuperWinCLIServer
). Avoid user profile folders.Place NSSM:
nssm.exe
file from the appropriate architecture folder (win32
or win64
) into the root directory of this project (the same folder as install-service.ps1
).Install Dependencies & Build:
npm install
npm run build
to compile the TypeScript code into the dist
folder.Configure config.json
:
config.sample.json
and name it config.json
in the project's root directory.config.json
and carefully review and modify the settings:
security.allowedPaths
: CRITICAL! Change this from the sample paths to the actual directories the server needs access to. For security, be as specific as possible. Start with the project directory itself if unsure (e.g., "C:\\Servers\\SuperWinCLIServer"
- remember double backslashes \\
). The service runs as SYSTEM, so paths must be valid for that account.security.blockedCommands
/ blockedArguments
: Review the default lists. Add or remove commands/arguments based on your security policy.shells
: Enable/disable shells (PowerShell, CMD, Git Bash) and verify the command
path (especially for Git Bash).ssh
: Configure if you intend to use the SSH execution feature (disabled by default).config.json
file.Run Installation Script:
cd C:\Servers\SuperWinCLIServer
)..\install-service.ps1
MCPServer
service to run node.exe dist/index.js
as LocalSystem
, starting automatically.Verify Service Status:
Get-Service MCPServer
Running
. If it's Stopped
, check the NSSM logs or Windows Event Viewer (Application and System logs) for errors.config.json
) Detailssecurity
:
maxCommandLength
: Max characters allowed in a command string.blockedCommands
: Array of command names (without extension) to block (case-insensitive).blockedArguments
: Array of exact arguments to block (case-insensitive).allowedPaths
: Crucial setting. Array of absolute paths. If restrictWorkingDirectory
is true, commands can only be executed if their working directory starts with one of these paths. Paths are compared case-insensitively after normalization. Use double backslashes (e.g., "C:\\Tools\\Scripts"
).restrictWorkingDirectory
: Boolean. If true, enforce the allowedPaths
check for the working directory. Highly recommended to keep true
.logCommands
: Boolean. If true, executed commands and their output (truncated) are stored in memory (up to maxHistorySize
).maxHistorySize
: Max number of commands to keep in the in-memory history.commandTimeout
: Seconds before a running command is killed automatically.enableInjectionProtection
: Boolean. If true, attempts to block shell operators (&
, |
, ;
, etc. defined per shell) in commands.shells
: Configure available local shells (powershell, cmd, gitbash).
enabled
: Boolean. Allow use of this shell.command
: Path to the shell executable.args
: Array of default arguments passed to the shell before the user's command.blockedOperators
: Array of strings/characters to block within commands for this specific shell (used if enableInjectionProtection
is true).ssh
: Configure remote command execution via SSH.
enabled
: Boolean. Enable the ssh_execute
and ssh_disconnect
tools.connections
: Object containing named connection configurations (host, port, username, password/privateKeyPath).config.json
is loaded, if it contains a security
or shells
section, that entire section replaces the default configuration for that section. It does not merge individual fields within security
or shells
. The ssh
section is merged more granularly. Ensure your config.json
includes all necessary fields for these sections if you customize them.Once installed via install-service.ps1
, you can manage the service using standard Windows tools or NSSM commands from an administrative PowerShell/CMD in the project directory:
Start-Service MCPServer
or . ssm.exe start MCPServer
Stop-Service MCPServer
or . ssm.exe stop MCPServer
Restart-Service MCPServer
or . ssm.exe restart MCPServer
Get-Service MCPServer
or . ssm.exe status MCPServer
. ssm.exe edit MCPServer
(Opens the NSSM GUI editor). ssm.exe dump MCPServer
.\uninstall-service.ps1
MCPServer
service.You can run the server directly without installing it as a service for testing or debugging purposes:
npm install
.config.json
exists and is configured.npm run start
Ctrl + C
to stop it.This project is licensed under the MIT License - see the LICENSE file for details.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!