Get the FREE Ultimate OpenClaw Setup Guide →

win-cli

Model Context Protocol server for secure command-line interactions on Windows systems

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio simon-ami-win-cli-mcp-server npx -y @simonb97/server-win-cli

How to use

This MCP server provides secure, controlled access to Windows command-line environments (PowerShell, CMD, and Git Bash) and can optionally manage remote systems via SSH. It exposes a set of shells and security rules to MCP clients, allowing you to execute permitted commands, view server resources (like current directory and SSH connections), and manage command execution under configurable restrictions. The server is designed to work with clients such as Claude Desktop and similar MCP clients by presenting a structured mcpServers configuration in your client config. You can enable or disable shells, configure allowed paths, and tailor security settings to restrict dangerous operations while offering a productive command-line experience.

To use it, configure the MCP client to start the server via npx using the package @simonb97/server-win-cli. For example, in Claude Desktop you would reference windows-cli with command npx -y @simonb97/server-win-cli and optionally pass a --config path to a JSON configuration file. Once started, you can issue commands through the available tools (PowerShell, CMD, and Git Bash shells) and, if SSH is enabled, run commands on remote hosts. The API includes resources such as current directory and SSH connections, and security controls allow you to block or allow specific commands and arguments, enforce working directory restrictions, and log command usage.

How to install

Prerequisites:

  • Node.js and npm installed on your system

Installation steps:

  1. Install Node.js from https://nodejs.org/ (npm is included with Node.js).

  2. Use NPX to run the MCP server directly from the npm registry without a global install:

    npx -y @simonb97/server-win-cli

  3. (Optional) Initialize a default configuration file if you want to customize settings:

    npx @simonb97/server-win-cli --init-config ./config.json

  4. Point your MCP client to the server using the following configuration (example):

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

  5. If you created a custom config file, start the server with the --config option as described in your client config example.

Additional notes

Notes and tips:

  • This server is part of a deprecated project line. Consider migrating to a newer solution such as DesktopCommanderMCP for similar functionality.
  • The default configuration is restrictive by design. Review security settings (blockedCommands, blockedArguments, allowedPaths, restrictWorkingDirectory, and SSH options) before enabling broader use.
  • If you enable SSH support, manage connections carefully and review readiness and timeouts to avoid stale sessions.
  • Configuration locations follow a priority order: explicit --config path, ./config.json, then ~/.win-cli-mcp/config.json. If no file is found, the server uses a secure default configuration.
  • The server exposes direct access to command shells on Windows; ensure appropriate network and local security controls are in place to prevent misuse.
  • When using the MCP client, always verify the paths and allowed commands to minimize risk.

Related MCP Servers

Sponsor this space

Reach thousands of developers