MCP-Mirror/SimonB97_win-cli-mcp-server
If you are the rightful owner of SimonB97_win-cli-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
MCP server for secure command-line interactions on Windows systems, enabling controlled access to PowerShell, CMD, Git Bash shells, and remote systems via SSH.
Tools
Functions exposed to the LLM to take actions
execute_command
Execute a command in the specified shell (powershell, cmd, or gitbash)
Example usage (PowerShell):
{
"shell": "powershell",
"command": "Get-Process | Select-Object -First 5",
"workingDir": "C:\Users\username"
}
Example usage (CMD):
{
"shell": "cmd",
"command": "dir /b",
"workingDir": "C:\Projects"
}
Example usage (Git Bash):
{
"shell": "gitbash",
"command": "ls -la",
"workingDir": "/c/Users/username"
}
get_command_history
Get the history of executed commands
Example usage:
{
"limit": 5
}
Example response:
[
{
"command": "Get-Process",
"output": "...",
"timestamp": "2024-03-20T10:30:00Z",
"exitCode": 0
}
]
ssh_execute
Execute a command on a remote host via SSH
Example usage:
{
"connectionId": "raspberry-pi",
"command": "uname -a"
}
Configuration required in config.json:
{
"ssh": {
"enabled": true,
"connections": {
"raspberry-pi": {
"host": "raspberrypi.local",
"port": 22,
"username": "pi",
"password": "raspberry"
}
}
}
}
ssh_disconnect
Disconnect from an SSH server
Example usage:
{
"connectionId": "raspberry-pi"
}
Use this to cleanly close SSH connections when they're no longer needed.
create_ssh_connection
Create a new SSH connection
read_ssh_connections
Read all SSH connections
update_ssh_connection
Update an existing SSH connection
delete_ssh_connection
Delete an existing SSH connection
get_current_directory
Get the current working directory
Prompts
Interactive templates invoked by user choice
No prompts
Resources
Contextual data attached and managed by the client
Current Working Directory
URI: cli://currentdir
MIME: text/plain
The current working directory of the CLI server
SSH Configuration
URI: ssh://config
MIME: application/json
All SSH connection configurations
CLI Server Configuration
URI: cli://config
MIME: application/json
Main CLI server configuration (excluding sensitive data)