Win MCP Server
Click on "Deploy 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., "@Win MCP Server Get system info and disk space for server01.domain.local"
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.
Win MCP Server
A Model Context Protocol (MCP) server that provides AI agents with the ability to interact with Windows servers using Windows Remote Management (WinRM). This server enables secure remote PowerShell execution and system management tasks on Windows hosts.
Features
Secure Authentication: Uses domain credentials stored in macOS Keychain with TouchID authentication
PowerShell Execution: Execute arbitrary PowerShell commands on remote Windows hosts
System Information: Get basic system information, running services, and disk space
Error Handling: Comprehensive error handling with helpful error messages
Memory Safety: Credentials are cleared from memory immediately after use
Related MCP server: Windows Admin MCP
Installation
From PyPI (Recommended)
pip install win-mcp-serverFrom Source
git clone https://github.com/rorymcmahon/win-mcp-server.git
cd win-mcp-server
pip install -e .Configuration
Prerequisites
WinRM Configuration: Ensure target Windows hosts have WinRM enabled and configured.
Credential Setup: The server will prompt for credentials on first use and cache them securely in macOS Keychain with 4-hour expiration.
For non-interactive/CI environments you can skip the prompt entirely by setting environment variables. When both are present they take precedence over any cached Keychain entry:
export WINRM_USER="myuser" export WINRM_PWD="mypassword"The hyphenated names
WINRM-USER/WINRM-PWDare also accepted if your launcher can set them.
MCP Configuration
Add to your MCP settings file (e.g., ~/.config/mcp/settings.json):
{
"mcpServers": {
"winrm": {
"command": "winrm-mcp-server"
}
}
}Available Tools
setup_credentials(hostname: str)
Setup credentials for a Windows host (interactive mode).
Parameters:
hostname: The target Windows hostname (FQDN)
Returns:
status: Success or error statusmessage: Confirmation message
execute_powershell(hostname: str, command: str)
Execute arbitrary PowerShell commands on a remote Windows host.
Parameters:
hostname: The target Windows hostname (FQDN)command: PowerShell command to execute
Returns:
status: Exit code of the commandstdout: Standard output from the commandstderr: Standard error from the command
get_system_info(hostname: str)
Get basic system information from a Windows host.
Returns: JSON with Windows product name, total physical memory, and processor information.
get_running_services(hostname: str)
Get list of running services from a Windows host.
Returns: JSON array of running services with name, status, and start type.
get_disk_space(hostname: str)
Get disk space information from a Windows host.
Returns: JSON array of logical disks with device ID, total size, and free space in GB.
Usage Examples
Initial Setup
"Setup credentials for server01.domain.local"Basic System Check
"Get system info and disk space for server01.domain.local"Service Management
"Check if IIS is running on webserver.domain.local"
"Get running services on server01.domain.local"Custom PowerShell Commands
"Run 'Get-EventLog -LogName System -Newest 10' on server01.domain.local"
"Execute 'Get-Process | Sort-Object CPU -Descending | Select-Object -First 10' on server01.domain.local"Security
Credential Storage: Domain credentials are securely stored in macOS Keychain
TouchID Authentication: Credentials require TouchID authentication for access
Memory Safety: Passwords are immediately cleared from memory after use
Transport Security: Uses NTLM authentication over HTTP (configurable for HTTPS)
Automatic Expiration: Cached credentials expire after 4 hours
Secure Prompting: Password input is hidden and never logged
Development
Setup Development Environment
git clone https://github.com/rorymcmahon/winrm-mcp-server.git
cd winrm-mcp-server
pip install -e ".[dev]"Running Tests
pytestCode Formatting
black src/
isort src/Requirements
Python 3.10+
macOS (for Keychain integration)
Target Windows hosts with WinRM enabled
License
MIT License - see LICENSE file for details.
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
Support
For issues and questions:
Available Tools
6 toolswin_clear_credentialsC
Clear cached credentials for a Windows host
Inputs: hostname (required).
win_execute_powershellC
Execute PowerShell command on remote Windows host
Inputs: command (required), hostname (required).
win_get_disk_spaceC
Get disk space information from Windows host
Inputs: hostname (required).
win_get_running_servicesC
Get running services from Windows host
Inputs: hostname (required).
win_get_system_infoC
Get basic system information from Windows host
Inputs: hostname (required).
win_setup_credentialsC
Setup credentials for a Windows host using GUI prompts
Inputs: hostname (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct role: credentials setup/clear, targeted system queries, and PowerShell execution. The only overlap is that win_execute_powershell could also retrieve system, service, or disk information, but the dedicated getters are clearly named and scoped.
All tools share a consistent win_ prefix followed by a verb_noun pattern such as win_get_system_info or win_execute_powershell. The convention is predictable throughout.
Six tools is well-scoped for basic remote Windows host management. Each tool covers a distinct operational need without excessive fragmentation.
The surface covers command execution, system information, services, disk space, and credential lifecycle. Minor gaps exist around service/process mutation and file transfer, though arbitrary PowerShell execution provides a workaround.
Maintenance
Related MCP Connectors
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Windows computers for AI agents. Office, desktop apps, browser tasks, testing and file transfer.
Execute PowerShell commands securely with controlled timeouts and input validation. Retrieve syste…
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI assistants to manage remote servers via SSH with agentless command execution, file operations, and service management.9MIT
- FlicenseNot gradedqualityDmaintenanceEnables remote Windows server administration and troubleshooting via WinRM and SSH PowerShell protocols.8-
- AlicenseBqualityBmaintenanceEnables AI agents to run PowerShell commands and manage Windows services without intrusive console windows, while also supporting remote execution via SSH and WinRM.20187 npm1MIT
- AlicenseAqualityDmaintenanceEnables AI agents to securely connect to and manage remote servers via SSH, with tools for running commands, file operations, log inspection, service management, and system monitoring under configurable access controls and audit logging.127 npm1MIT