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.

✨ 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

CommandDescription
npm startStart MCP server
npm testRun test suite
npm run devDevelopment mode with PowerShell scripts
npm run setupInitial 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