windows-terminal-mcp
windows-terminal-mcp
모든 LLM이 Windows 터미널에서 명령을 실행할 수 있게 해주는 MCP (Model Context Protocol) 서버입니다(로컬 셸 및 원격 SSH 연결 포함).
기능
cmd,powershell또는bash(Git Bash)를 통해 명령 실행키 기반 인증을 사용하여 SSH를 통해 원격 명령 실행
3단계 보안 모델 (안전 / 확인 / 차단)
명령별 타임아웃 설정 가능
Claude Desktop 및 모든 MCP 호환 클라이언트와 작동
Related MCP server: Windows CLI MCP Server
설치
git clone https://github.com/marttinm/windows-terminal-mcp.git
cd windows-terminal-mcp
pip install -e .Windows에서 Python 3.11+가 필요합니다.
구성
Claude Desktop 구성 파일(%APPDATA%\Claude\claude_desktop_config.json)에 서버를 추가하세요:
{
"mcpServers": {
"windows-terminal": {
"command": "cmd",
"args": ["/c", "python", "-m", "windows_terminal_mcp.server"]
}
}
}또는 스크립트를 직접 지정하세요:
{
"mcpServers": {
"windows-terminal": {
"command": "cmd",
"args": ["/c", "python", "C:/path/to/windows-terminal-mcp/src/windows_terminal_mcp/server.py"]
}
}
}도구: execute_command
매개변수
매개변수 | 유형 | 기본값 | 설명 |
| string | 필수 | 실행할 명령. SSH의 경우: |
| string |
| 셸: |
| string | — | 작업 디렉터리 (로컬 명령만 해당) |
| integer |
| 밀리초 단위 타임아웃 |
| string | — | SSH 개인 키 경로 (예: |
응답
{
"stdout": "...",
"stderr": "...",
"exit_code": 0,
"execution_time": 0.42
}사용 예시
로컬 명령
Run: dir C:\Users
Shell: cmd
Run: Get-Process | Select-Object -First 5
Shell: powershell
Run: git status
Shell: bashSSH 명령
Run: ubuntu@192.168.1.10 "df -h && uptime"
Shell: ssh
SSH key: ~/.ssh/id_rsaRun: ubuntu@192.168.1.10 "docker ps"
Shell: ssh
SSH key: ~/.ssh/my_key
Timeout: 30000보안
명령은 세 가지 수준으로 분류됩니다:
안전(Safe) — 직접 실행됨
echo, dir, type, git, npm, node, python, pip, curl 및 대부분의 읽기 전용 명령.
위험(Dangerous) — Claude가 실행 전 경고함
del, rmdir, rm, taskkill, net stop, net start, sc delete, reg add 등.
차단(Blocked) — 항상 거부됨
format, del /s /q, rd /s /q, reg delete, regedit, shutdown, net user, rm -rf, mkfs, fdisk 및 이와 유사한 파괴적인 작업.
개발
프로젝트 구조
windows-terminal-mcp/
├── src/windows_terminal_mcp/
│ ├── __init__.py
│ ├── server.py # MCP server (main entry point)
│ ├── executor.py # subprocess execution
│ ├── main.py # simple stdin/stdout handler
│ └── security.py # command safety checks
├── tests/
│ └── test_windows_terminal_mcp.py
├── pyproject.toml
├── LICENSE
└── README.md테스트 실행
pip install pytest
pytest tests/ -vPython 모듈로 사용
from windows_terminal_mcp.server import execute_command
result = execute_command("echo hello", shell="cmd")
print(result)
# {'stdout': 'hello\n', 'stderr': '', 'exit_code': 0, 'execution_time': 0.02}
result = execute_command(
"ubuntu@192.168.1.10 uptime",
shell="ssh",
ssh_key="~/.ssh/id_rsa",
timeout_ms=10000,
)
print(result)변경 로그
v0.2.0
키 기반 인증을 통한 SSH 지원 추가
SSH 명령 구성 수정 (호스트와 원격 명령을 별도의 인수로 전달)
Windows에서 SSH 키 경로의
~확장 문제 수정MCP 서버 프로세스 내에서 SSH가 중단되는 원인이었던 stdin 상속 문제 수정
v0.1.0
cmd, powershell, bash를 통한 기본 명령 실행
stdout/stderr/exit_code 캡처
3단계 보안 모델
단위 테스트
라이선스
MIT — LICENSE 참조
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Related MCP Servers
- AlicenseAqualityFmaintenanceAn MCP server that enables secure terminal command execution, directory navigation, and file system operations through a standardized interface for LLMs.1034 PyPI97MIT
- AlicenseBqualityFmaintenanceA Model Context Protocol server that provides secure command-line access to Windows systems, allowing MCP clients like Claude Desktop to safely execute commands in PowerShell, CMD, and Git Bash shells with configurable security controls.9959 npm268MIT
- FlicenseAqualityDmaintenanceA local Model Context Protocol server that allows LLMs to securely execute shell commands on remote Linux and Windows systems via SSH connections.66 npm2-
- AlicenseBqualityAmaintenanceA secure MCP server for shell operations, terminal management, and process control, enabling AI assistants to safely execute commands and manage interactive sessions.13264 npm6MIT