Skip to main content
Glama
GUEPARD98

SSH-PowerShell MCP Server

by GUEPARD98

SSH-PowerShell MCP Server

πŸš€ Enterprise-grade Model Context Protocol (MCP) server for secure SSH and PowerShell command execution with Claude Desktop.

License: MIT Node.js Version MCP SDK

✨ Features

  • οΏ½ Secure SSH command execution on remote servers

  • ⚑ Local PowerShell integration for Windows automation

  • πŸ›‘οΈ Enterprise security with SSH key authentication

  • 🌐 Network scanning and SSH port discovery

  • πŸ” SSH key verification and host key scanning

  • πŸ“Š Comprehensive logging and error handling

  • 🎯 Claude Desktop optimized for seamless AI integration

οΏ½πŸš€ Quick Start

# Clone repository
git clone https://github.com/GUEPARD98/MCP-POWERSHELL.git
cd MCP-POWERSHELL

# Install dependencies
npm install

# Configure environment
Copy-Item config\.env.example config\.env
# Edit config\.env with your SSH settings

# Start server
npm start

πŸ“ Project Structure

MCP-POWERSHELL/
β”œβ”€β”€ πŸ“ config/           # Environment configurations
β”‚   β”œβ”€β”€ .env.example     # Configuration template
β”‚   β”œβ”€β”€ .env.development # Development settings
β”‚   β”œβ”€β”€ .env.production  # Production settings
β”‚   └── .env.test       # Test settings
β”œβ”€β”€ πŸ“ docs/            # Complete documentation
β”‚   β”œβ”€β”€ README.md       # Detailed guide
β”‚   β”œβ”€β”€ API.md          # API reference
β”‚   β”œβ”€β”€ ARCHITECTURE.md # Technical architecture
β”‚   └── SECURITY.md     # Security best practices
β”œβ”€β”€ πŸ“ scripts/         # PowerShell automation scripts
β”‚   β”œβ”€β”€ start.ps1       # Start server
β”‚   β”œβ”€β”€ stop.ps1        # Stop server
β”‚   β”œβ”€β”€ setup.ps1       # Initial setup
β”‚   └── test.ps1        # Run tests
β”œβ”€β”€ πŸ“ src/             # Source code
β”‚   └── index.js        # Main MCP server
└── πŸ“ tests/           # Automated tests

πŸ› οΈ Available Commands

Command

Description

npm start

Start MCP server

npm test

Run test suite

npm run dev

Development mode with PowerShell scripts

npm run setup

Initial configuration

⚑ MCP Tools

πŸ” ssh_execute

Execute commands on remote SSH servers

// Example: Run 'ls -la' on remote server
{
  "name": "ssh_execute",
  "arguments": {
    "command": "ls -la",
    "host": "192.168.1.100", 
    "user": "root"
  }
}

πŸ’» powershell_execute

Execute PowerShell commands locally

// Example: Get Windows processes
{
  "name": "powershell_execute",
  "arguments": {
    "command": "Get-Process | Select-Object -First 10"
  }
}

🌐 ssh_scan

Scan network for SSH services

// Example: Scan local network
{
  "name": "ssh_scan", 
  "arguments": {
    "target": "192.168.1.0/24"
  }
}

πŸ” ssh_keyscan

Verify SSH host keys

// Example: Get host key fingerprint
{
  "name": "ssh_keyscan",
  "arguments": {
    "host": "192.168.1.100"
  }
}

πŸ”§ Configuration

Environment Setup

  1. Copy config/.env.example to config/.env

  2. Configure your SSH settings:

# SSH Configuration
SSH_KEY_PATH=/path/to/your/ssh/key
SSH_DEFAULT_HOST=your.server.ip
SSH_DEFAULT_USER=your_username
SSH_DEFAULT_PORT=22

# Security Settings  
SSH_STRICT_HOST_KEY_CHECKING=no
COMMAND_TIMEOUT=30000
LOG_LEVEL=info

Claude Desktop Integration

The server automatically configures Claude Desktop. Manual setup:

{
  "mcpServers": {
    "ssh-powershell-mcp": {
      "command": "node",
      "args": ["path/to/MCP-POWERSHELL/src/index.js"],
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}

οΏ½ Security

  • βœ… SSH key authentication only (no passwords)

  • βœ… Command sanitization with shell-escape

  • βœ… Environment isolation for different configurations

  • βœ… Comprehensive input validation

  • βœ… Secure credential handling

See SECURITY.md for detailed security practices.

πŸ“š Documentation

πŸ§ͺ Testing

# Run all tests
npm test

# Run specific test types
.\scripts\test.ps1 -TestType unit
.\scripts\test.ps1 -TestType integration
.\scripts\test.ps1 -TestType ssh

🀝 Contributing

  1. Fork the repository

  2. Create feature branch (git checkout -b feature/amazing-feature)

  3. Commit changes (git commit -m 'Add amazing feature')

  4. Push to branch (git push origin feature/amazing-feature)

  5. Open Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™‹β€β™‚οΈ Support

πŸ† Acknowledgments


🏒 Enterprise Ready | πŸ”’ Secure by Design | ⚑ Claude Optimized

Made with ❀️ by GUEPARD98

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GUEPARD98/MCP-POWERSHELL'

If you have feedback or need assistance with the MCP directory API, please join our Discord server