Skip to main content
Glama

Windows CLI MCP Server

execute_command

Run commands in PowerShell, CMD, or Git Bash shells directly on Windows systems using a secure CLI interface. Specify the command, shell type, and working directory for targeted execution.

Instructions

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"
}

Input Schema

NameRequiredDescriptionDefault
commandYesCommand to execute
shellYesShell to use for command execution
workingDirNoWorking directory for command execution (optional)

Input Schema (JSON Schema)

{ "properties": { "command": { "description": "Command to execute", "type": "string" }, "shell": { "description": "Shell to use for command execution", "enum": [ "powershell", "cmd", "gitbash" ], "type": "string" }, "workingDir": { "description": "Working directory for command execution (optional)", "type": "string" } }, "required": [ "shell", "command" ], "type": "object" }

Other Tools from Windows CLI MCP Server

Related Tools

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/simon-ami/win-cli-mcp-server'

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