IW

inframcp/win-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

6 stars 3 forks 品質 80 トレンド 34MIT

Gives your AI Agent the ability to interact with windows servers, execute powershell, read system info, etc.

概要

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. - : Uses domain credentials stored in macOS Keychain with TouchID authentication - : Execute arbitrary PowerShell commands on remote Windows hosts - : Get basic system information, running services, and disk space - : Comprehensive error handling with helpful error messages - : Credentials are cleared from memory immediately after use 1. : Ensure target Windows hosts have WinRM enabled and configured. 2. : 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.

README

以下は原文 README の抜粋です。原文を見る。

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

Installation

pip install win-mcp-server

From Source

git clone https://github.com/rorymcmahon/win-mcp-server.git
cd win-mcp-server
pip install -e .

Configuration

Prerequisites

  1. WinRM Configuration: Ensure target Windows hosts have WinRM enabled and configured.

  2. 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-PWD are 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 status
  • message: Confirmation message

execute_powershell(hostname: str, command: str)

Execute arbitrary PowerShell commands on a remote Windows host.

Parameters:

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "winrm": { "command": "winrm-mcp-server" } } }