Feedback

Windows CLI MCP Server

@simonamie Claim

Basic information

Runtime
JavaScript
Version
1.0.0
Category
License
MIT
Transports
stdio
Author
simonamie
Submitted by
Community
Quality
10
Stars
267

About Windows CLI MCP Server

Securely control Windows command-line interfaces with Windows CLI. Supports mobaxterm, dism commands, cmd command, and more.

Windows CLI is a MCP server in the Developer Tools category listed in the AddMCP.net directory, published by simonamie. It exposes 9 tools, including execute_command, get_command_history, ssh_execute, ssh_disconnect and more. Supported transport: stdio. Runtime: JavaScript. License: MIT. The repository has 267 GitHub stars. Source code is hosted on github.com. Related topics: command-line, community, developer-tools, mcp-server, windows-cli.

Setup

{
    "mcpServers": {
        "windows-cli": {
            "command": "npx",
            "args": [
                "-y",
                "@simonb97/server-win-cli"
            ]
        }
    }
}

Windows CLI MCP Server config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "windows-cli": {
            "command": "npx",
            "args": [
                "-y",
                "@simonb97/server-win-cli"
            ]
        }
    }
}

Windows CLI MCP Server tools

  • execute_command — Execute a command in the specified shell (powershell, cmd, or gitbash) Example usage (PowerShell): ```json { "shell": "powershell", "command": "Get-Process | Select-Object -First 5", "workingDir": "C:\Users\username" } ``` Example usage (CMD): ```json { "shell": "cmd", "command": "dir /b", "workingDir": "C:\Projects" } ``` Example usage (Git Bash): ```json { "shell": "gitbash", "command": "ls -la", "workingDir": "/c/Users/username" } ```
  • get_command_history — Get the history of executed commands Example usage: ```json { "limit": 5 } ``` Example response: ```json [ { "command": "Get-Process", "output": "...", "timestamp": "2024-03-20T10:30:00Z", "exitCode": 0 } ] ```
  • ssh_execute — Execute a command on a remote host via SSH Example usage: ```json { "connectionId": "raspberry-pi", "command": "uname -a" } ``` Configuration required in config.json: ```json { "ssh": { "enabled": true, "connections": { "raspberry-pi": { "host": "raspberrypi.local", "port": 22, "username": "pi", "password": "raspberry" } } } } ```
  • ssh_disconnect — Disconnect from an SSH server Example usage: ```json { "connectionId": "raspberry-pi" } ``` Use this to cleanly close SSH connections when they're no longer needed.
  • create_ssh_connection — Create a new SSH connection
  • read_ssh_connections — Read all SSH connections
  • update_ssh_connection — Update an existing SSH connection
  • delete_ssh_connection — Delete an existing SSH connection
  • get_current_directory — Get the current working directory

Overview

What is Windows CLI?

Windows CLI MCP Server is an MCP server for secure command-line interactions on Windows systems, enabling controlled access to PowerShell, CMD, Git Bash shells, and remote systems via SSH. It allows MCP clients like Claude Desktop to perform operations on your system.

How to use Windows CLI?

Add the server to your claude_desktop_config.json using npx -y @simonb97/server-win-cli. Optionally specify a config file with the --config flag. Create a default config by copying config.json.example or running npx @simonb97/server-win-cli --init-config ./config.json.

Key features of Windows CLI

  • Multi-Shell Support: PowerShell, CMD, and Git Bash
  • SSH Support: Execute commands on remote systems
  • Security Controls: command blocking, path validation, injection protection
  • Configurable: custom security rules, shell settings, SSH profiles
  • Command logging and history tracking
  • Working directory restrictions and command length limits

Use cases of Windows CLI

  • Run scripts and commands on local Windows machines via AI assistants
  • Manage remote Linux/Windows servers through SSH from an MCP client
  • Automate system administration tasks with strict security constraints
  • Execute shell commands in a controlled, audited environment

Frequently asked questions

1 What shells are supported?

PowerShell, Command Prompt (CMD), and Git Bash are supported. Each can be enabled or disabled in the configuration.

2 How do I restrict which commands can run?

Blocked commands and arguments are defined in the security section of the config file. Blocked commands apply to both direct use and full paths, case-insensitively.

3 Does this server allow remote SSH connections?

Yes, SSH is supported but disabled by default. You can enable it and configure connection profiles (password or key authentication) in the ssh config section.

4 Where is the configuration file stored?

The server looks for config in order: path specified by --config flag, ./config.json, or ~/.win-cli-mcp/config.json.

5 What are the default security settings?

Default settings include command length limit (2000 chars), blocked dangerous commands (rm, del, format, etc.), restricted working directory to user's home and current directory, command logging, and injection protection enabled.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬