Skip to main content
Glama

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

Deploy Server
-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Enables secure SSH command execution on remote servers and local PowerShell automation through Claude Desktop. Features enterprise-grade security with SSH key authentication, network scanning, and comprehensive logging for Windows and Linux system administration.

  1. โœจ Features
    1. ๏ฟฝ๐Ÿš€ Quick Start
      1. ๐Ÿ“ Project Structure
        1. ๐Ÿ› ๏ธ Available Commands
          1. โšก MCP Tools
            1. ๐Ÿ” ssh_execute
            2. ๐Ÿ’ป powershell_execute
            3. ๐ŸŒ ssh_scan
            4. ๐Ÿ” ssh_keyscan
          2. ๐Ÿ”ง Configuration
            1. Environment Setup
            2. Claude Desktop Integration
          3. ๏ฟฝ Security
            1. ๐Ÿ“š Documentation
              1. ๐Ÿงช Testing
                1. ๐Ÿค Contributing
                  1. ๐Ÿ“„ License
                    1. ๐Ÿ™‹โ€โ™‚๏ธ Support
                      1. ๐Ÿ† Acknowledgments

                        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