Windows Command Line MCP Server
The Windows Command Line MCP Server provides a secure interface for AI models to interact with Windows system operations:
Execute Windows CLI commands: Run safe, allowed commands like
dirandechoRun PowerShell scripts: Execute allowed PowerShell scripts with configurable settings
System monitoring:
Retrieve system information (OS, hardware, user details)
Get network configuration details (IPs, adapters, DNS)
List running processes with optional filtering
Query scheduled tasks and services
Development support: Create new projects (React, Node.js, Python) in a sandboxed directory
Customizable execution: Set working directories and execution timeouts
Enhanced security: Command allowlisting, input validation, and blocking dangerous operations
Provides access to Git commands for version control within the allowlist of permitted operations
Allows project creation and management for Node.js applications in a sandboxed environment
Allows execution of npm commands for package management within the security constraints
Supports creation and management of Python projects in a secure development environment
Enables creation and setup of React applications with proper security controls
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Windows Command Line MCP Server create a new React project called 'my-app'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Windows Command Line MCP Server
A secure Model Context Protocol (MCP) server that enables AI models to interact with Windows command-line functionality safely and efficiently.
Overview
The Windows Command Line MCP Server provides a robust, secure bridge between AI models and Windows system operations. It allows controlled execution of commands, project creation, and system information retrieval while maintaining strict security protocols.
Related MCP server: Windows CLI MCP Server
Key Features
🔒 Enhanced Security
Comprehensive command allowlist
Strict input validation
Prevention of destructive system operations
Configurable security levels
🛠 Development Tools Support
Project creation for React, Node.js, and Python
Safe development environment interactions
Expanded command support for development workflows
🖥 System Interaction Capabilities
Execute Windows CLI commands
Run PowerShell scripts
Retrieve system and network information
Manage processes and services
Installation
Installing via Smithery
To install Windows Command Line MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @alxspiker/Windows-Command-Line-MCP-Server --client claudePrerequisites
Node.js 16 or later
npm or yarn
Windows operating system
Setup
git clone https://github.com/alxspiker/Windows-Command-Line-MCP-Server.git
cd Windows-Command-Line-MCP-Server
npm install
npm run buildUsage
Command Line Options
Default mode: Uses predefined safe commands
--allow-all: Run in extended mode (with additional precautions)Custom command lists can be specified as arguments
Project Creation
Create new projects safely with the built-in project creation tool:
Supported project types: React, Node.js, Python
Projects created in a sandboxed
~/AIProjectsdirectory
Available Tools
execute_command: Run Windows CLI commands
execute_powershell: Execute PowerShell scripts
create_project: Safely create new development projects
list_running_processes: Retrieve active system processes
get_system_info: Collect system configuration details
get_network_info: Retrieve network adapter information
get_scheduled_tasks: List and query system tasks
get_service_info: Manage and query Windows services
list_allowed_commands: List all commands that can be executed by the server
Using with Claude for Desktop
To use this server with Claude for Desktop:
Build the server using the setup instructions above
Add it to your
claude_desktop_config.json:
{
"mcpServers": {
"windows-cmd": {
"command": "node",
"args": ["/path/to/dist/index.js"]
}
}
}Replace /path/to/dist/index.js with the absolute path to the built index.js file in the dist directory.
Restart Claude for Desktop
You can now use the tools by asking Claude to perform Windows system operations
Security Considerations
Allowed Commands
By default, only safe commands are permitted:
System information retrieval
Network configuration
Process management
Development tool interactions
Blocked Operations
Dangerous commands are always blocked, including:
Disk formatting
User management
System shutdown
Critical registry modifications
Configuration
Customize the server's behavior by specifying allowed commands or using configuration flags.
Example
# Run with default safe commands
node dist/index.js
# Run with specific allowed commands
node dist/index.js dir echo npm git
# Run in extended mode (use with caution)
node dist/index.js --allow-allContributing
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
Inspired by the Model Context Protocol specification
Developed with security and flexibility in mind
Version History
0.3.0: Implemented all tools mentioned in README (system info, network info, process management, service info)
0.2.0: Added project creation, expanded development tools
0.1.0: Initial release with basic command execution capabilities
Support
For issues, questions, or suggestions, please open an issue on GitHub.
Available Tools
8 toolsexecute_commandB
Execute a Windows command and return its output. Only commands in the allowed list can be executed. This tool should be used for running simple commands like 'dir', 'echo', etc.
Inputs: command (required), workingDir, timeout.
execute_powershellB
Execute a PowerShell script and return its output. This allows for more complex operations and script execution. PowerShell must be in the allowed commands list.
Inputs: script (required), workingDir, timeout.
get_network_infoB
Retrieve network configuration information including IP addresses, adapters, and DNS settings. Can be filtered to a specific interface.
Inputs: networkInterface.
get_scheduled_tasksB
Retrieve information about scheduled tasks on the system. Can query all tasks or get detailed status of a specific task.
Inputs: action, taskName.
get_service_infoB
Retrieve information about Windows services. Can query all services or get detailed status of a specific service.
Inputs: action, serviceName.
get_system_infoB
Retrieve system information including OS, hardware, and user details. Can provide basic or full details.
Inputs: detail.
list_allowed_commandsA
List all commands that are allowed to be executed by this server. This helps understand what operations are permitted.
Inputs: no named parameters.
list_running_processesA
List all running processes on the system. Can be filtered by providing an optional filter string that will match against process names.
Inputs: filter.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose with no overlap: execute_command for basic commands, execute_powershell for scripts, get_network_info for networking, get_scheduled_tasks for tasks, get_service_info for services, get_system_info for system details, list_allowed_commands for permissions, and list_running_processes for processes. The descriptions clearly differentiate them, preventing misselection.
The naming is mostly consistent with a verb_noun pattern (e.g., execute_command, get_network_info, list_allowed_commands), but there is a minor deviation with 'list_running_processes' using 'running' as an adjective instead of a simple noun like 'processes'. This slight inconsistency does not significantly hinder readability.
With 8 tools, the count is well-scoped for a Windows command line server, covering essential operations like command execution, system queries, and permissions. Each tool earns its place without feeling excessive or insufficient for the domain.
The tool set provides good coverage for querying system state (e.g., network, services, tasks) and executing commands, but there are minor gaps such as no tools for managing or modifying these elements (e.g., starting/stopping services, creating tasks). Agents can work around this by using execute_powershell for such operations.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
A Model Context Protocol server for Wix AI tools
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides programmatic access to the Windows terminal, enabling AI models to interact with the Windows command line through standardized tools for writing commands, reading output, and sending control signals.320 npmMIT
- 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.9444 npm266MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that allows secure execution of pre-approved commands, enabling AI assistants to safely interact with the user's system.17 npm22ISC
- FlicenseCqualityDmaintenanceA Model Context Protocol server that enables AI assistants to execute PowerShell commands, retrieve system information, manage modules, and run scripts on Windows systems.62-