Workaround for kiro-cli shell tool bug on Windows.
TypeScript MCP server that runs bash commands via Git Bash natively on Windows — no container needed.
- Node.js
- Git Bash (
C:\Program Files\Git\bin\bash.exe) - kiro-cli running natively on Windows
npm install
npm run bundle
# outputs dist/index.js (standalone, no node_modules needed)cp dist/index.js %USERPROFILE%\.kiro\settings\win-gitbash-mcp.jsCopy from kiro/mcp.json and replace <username> with your Windows username:
{
"mcpServers": {
"win-gitbash-mcp": {
"command": "node",
"args": ["C:\\Users\\<username>\\.kiro\\settings\\win-gitbash-mcp.js"],
"env": {
"LOG_ENABLED": "true"
},
"autoApprove": ["execute_bash"]
}
}
}Set "LOG_ENABLED": "false" to disable logging (FATAL errors are always logged). Logs are at %USERPROFILE%\.kiro\logs\win-gitbash-mcp.log.
Copy from kiro/gitbash.md:
---
inclusion: always
---
- When running shell commands, always use the `execute_bash` tool from the `win-gitbash-mcp` MCP server instead of the built-in shell tool.
- Use Unix-style paths in commands (e.g. `/c/Users/foo/project` not `C:\Users\foo\project`).- kiro-cli spawns
node win-gitbash-mcp.jsas a persistent stdio MCP server process - Each
execute_bashcall spawnsbash.exe -c <command>via Git Bash win-gitbash-mcp.jsis a standalone bundle — copy it anywhere with Node.js installed
| Tool | Description |
|---|---|
execute_bash |
Run any bash command via Git Bash on Windows |