Integrations
Enables execution of Chocolatey commands for Windows package management through the remote command interface
Provides ability to execute Git commands remotely with support for repository operations like status checks and working directory specification
Supports execution of Linux-specific commands with automatic command normalization between Windows and Unix-like systems
Remote Command MCP Server
A Model Context Protocol (MCP) server that enables remote command execution across different operating systems. This server provides a unified interface to execute shell commands, automatically handling platform-specific differences between Windows and Unix-like systems.
Features
- Cross-platform command execution
- Automatic command normalization between Windows and Unix
- Built-in error handling and output streaming
- Working directory specification support
- Platform-specific shell selection
Installation
- Clone the repository:
- Install dependencies:
- Build the server:
- Configure the MCP server in your settings file:
For VSCode Cline Extension (cline_mcp_settings.json
):
Usage
The server provides a single tool called execute_remote_command
that can execute ANY valid shell command on the host machine. This includes:
- System commands
- Package manager commands (apt, yum, chocolatey, etc.)
- Development tools (git, npm, python, etc.)
- File operations
- Network commands
- Service management
- And any other CLI commands available on the system
Tool: execute_remote_command
Parameters:
command
(required): Any valid shell command that can be executed on the host OScwd
(optional): Working directory for command execution
Examples
- System Information:
- Package Management:
- Network Operations:
- Git Operations:
- File Operations:
- Process Management:
- Service Control:
Security Considerations
Since this server can execute any system command, please consider the following security practices:
- Access Control: Limit access to the MCP server to trusted users only
- Command Validation: Validate commands before execution in your application logic
- Working Directory: Use the
cwd
parameter to restrict command execution to specific directories - Environment: Be cautious with commands that modify system settings or sensitive files
- Permissions: Run the MCP server with appropriate user permissions
Cross-Platform Command Handling
The server automatically handles platform-specific differences:
- Command Translation:
ls
⟷dir
(automatically converted based on platform)- Proper pipe operator formatting for each platform
- Shell Selection:
- Windows: Uses
cmd.exe
- Unix/Linux: Uses
/bin/sh
- Windows: Uses
Error Handling
The server provides detailed error messages and includes both stdout and stderr in the response. If a command fails, you'll receive an error message with details about what went wrong.
Example error response:
Development
Project Structure
Building
This will compile the TypeScript code and create the executable in the build
directory.
Contributing
- 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.
This server cannot be installed
A Model Context Protocol server that enables remote execution of shell commands across different operating systems, automatically handling platform-specific differences between Windows and Unix-like systems.