convez.ai
MCP ServerDevOps & InfraestruturaAvançado
andrey-n-safonov

MCP SSH WinRM

andrey-n-safonov/mcp-ssh-winrm

Administração Windows de Linux via SSH e WinRM

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP que permite administração de Windows a partir de um host Linux via SSH e WinRM/PSRemoting. Executa scripts PowerShell remotamente em máquinas Windows através de um servidor de gerenciamento intermediário, eliminando complexidades de escape de shell e transporte.

Instalação

$npx convez-ai andrey-n-safonov/mcp-ssh-winrm

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
28%
Último commit
há 1 mês
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Executar scripts PowerShell em múltiplas máquinas Windows de um host Linux
  • Gerenciar Active Directory e serviços Windows remotamente
  • Testar conectividade WinRM antes de executar comandos remotos
  • Automação de infraestrutura Windows através de jump hosts/bastion

Veredito

Ferramenta especializada e bem arquitetada para cenários legítimos de administração cross-platform (Linux→Windows). Requer conhecimento técnico em redes, SSH, PowerShell e WinRM; ausência de autenticação ou controle de acesso integrado implica segurança delegada ao ambiente host.

README

A tradução para o português deste README ainda está na fila.

mcp-ssh-winrm

MCP server for Windows administration from a Linux host.

How it works:

Claude Code (Linux) → SSH → Windows Management Server → PSRemoting (WinRM) → Target hosts

You write PowerShell — the server handles SSH transport, script upload, execution, and returns clean output. No shell escaping, no quoting nightmares.

Tools

ToolDescription
run_powershell(script, computer?)Run PS script on the management server, or via Invoke-Command on a remote host
check_winrm(computer)Test WinRM connectivity (TCP 5985) to a target computer

Requirements

  • Linux host with SSH access to a Windows management server
  • Windows management server with PowerShell and C:\Temp\ (or configured temp dir)
  • Target computers must have WinRM enabled (port 5985) if using computer parameter
  • Python 3.11+

Installation

pip install mcp-ssh-winrm

Or from source:

git clone https://github.com/yourusername/mcp-ssh-winrm
cd mcp-ssh-winrm
pip install -e .

Configuration

mkdir -p ~/.config/mcp-ssh-winrm
cp config.example.ini ~/.config/mcp-ssh-winrm/config.ini
# edit config.ini

The [ssh] section supports any host reachable from your Linux machine, including SSH aliases with ProxyJump defined in ~/.ssh/config.

Set the domain account password via environment variable (never in the config file):

export WINRM_MCP_PASSWORD='your-domain-password'

Claude Code integration

Add to ~/.claude.json (or per-project .claude/settings.json):

{
  "mcpServers": {
    "winrm": {
      "command": "mcp-ssh-winrm",
      "env": {
        "WINRM_MCP_PASSWORD": "your-domain-password"
      }
    }
  }
}

Or if running from source:

{
  "mcpServers": {
    "winrm": {
      "command": "python",
      "args": ["-m", "winrm_mcp.server"],
      "env": {
        "WINRM_MCP_PASSWORD": "your-domain-password",
        "WINRM_MCP_CONFIG": "/path/to/config.ini"
      }
    }
  }
}

Usage examples

Check AD user on a domain controller:

run_powershell(
  script="Get-ADUser -Identity jsmith -Properties PasswordLastSet, MemberOf",
  computer="dc01.domain.local"
)

Run script locally on management server:

run_powershell(script="Get-Service | Where-Object Status -eq 'Stopped'")

Test WinRM before running remote commands:

check_winrm(computer="server01.domain.local")

ProxyJump / bastion hosts

If your management server is only reachable via a bastion/jump host, configure it in ~/.ssh/config:

Host mgmt-server
    HostName 10.0.0.100
    User administrator
    ProxyJump bastion.example.com
    IdentityFile ~/.ssh/id_ed25519

Then set host = mgmt-server in config.ini. The MCP server reads ~/.ssh/config automatically via asyncssh.

License

MIT

Ver o original no GitHub

Bom para

Relacionados