Home / MCP / Windows CLI MCP Server

Windows CLI MCP Server

Provides a Windows MCP server to securely run PowerShell, CMD, and Git Bash locally and via SSH for MCP clients.

javascript
Installation
Add the following to your MCP client configuration file.

Configuration

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

The Windows CLI MCP Server lets you securely execute commands and manage remote systems from MCP clients. It supports PowerShell, CMD, and Git Bash locally, and can run commands on remote machines via SSH, all under configurable security rules to limit access and exposure.

How to use

Integrate the Windows CLI MCP Server with your MCP client to run Windows shell commands and manage SSH connections. Add a server entry in your client configuration to invoke the MCP server via npx and the package name, then start using the available shells to execute commands, view SSH connections, and manage server configuration from the client.

How to install

Prerequisites: ensure Node.js and npm are installed on your system.

Install or invoke the MCP server using your MCP client workflow. The server is run through npx with the package name shown below.

// Initialize via Claude Desktop config example (no separate install step needed if you use npx directly)

Usage with Claude Desktop

Add this to your Claude Desktop configuration to expose the Windows CLI MCP Server through the client.

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

Alternative config with a specific config file

If you want to point to a dedicated config file, include the --config flag in the startup command.

{
  "mcpServers": {
    "windows-cli": {
      "command": "npx",
      "args": [
        "-y",
        "@simonb97/server-win-cli",
        "--config",
        "path/to/your/config.json"
      ]
    }
  }
}

Available tools

execute_command

Execute a command in the specified shell and return output or error text.

get_command_history

Retrieve the history of previously executed commands with optional limit.

ssh_execute

Run a command on a remote system via an SSH connection.

ssh_disconnect

Disconnect from an active SSH session.

create_ssh_connection

Create a new SSH connection profile with host, port, and credentials.

read_ssh_connections

List all configured SSH connections.

update_ssh_connection

Update an existing SSH connection profile.

delete_ssh_connection

Delete an SSH connection profile.

get_current_directory

Return the current working directory of the server.

read_cli_config

Read and expose the CLI server configuration including security and shells.