- Explore MCP Servers
- mcp-execute-command
Mcp Execute Command
What is Mcp Execute Command
MCP Execute Command Server is a server implementation of the Model Context Protocol (MCP) designed for executing commands across various platforms efficiently and consistently.
Use cases
The server can be utilized in environments where remote command execution is required, such as continuous integration systems, automated deployment scripts, or development workflows that need to execute system commands from a centralized server.
How to use
To use the MCP Execute Command Server, install it via pip, either by importing it as a library in Python scripts and using asyncio to start the server, or by running it directly from the command line using Python.
Key features
Key features include cross-platform command execution, support for executing commands directly or through shell, configurable working directories, and comprehensive error handling and reporting to ensure robust command execution.
Where to use
This server is ideal for applications that require consistent execution of commands across different operating systems, such as server management, automation tasks, or cloud-based development environments.
Overview
What is Mcp Execute Command
MCP Execute Command Server is a server implementation of the Model Context Protocol (MCP) designed for executing commands across various platforms efficiently and consistently.
Use cases
The server can be utilized in environments where remote command execution is required, such as continuous integration systems, automated deployment scripts, or development workflows that need to execute system commands from a centralized server.
How to use
To use the MCP Execute Command Server, install it via pip, either by importing it as a library in Python scripts and using asyncio to start the server, or by running it directly from the command line using Python.
Key features
Key features include cross-platform command execution, support for executing commands directly or through shell, configurable working directories, and comprehensive error handling and reporting to ensure robust command execution.
Where to use
This server is ideal for applications that require consistent execution of commands across different operating systems, such as server management, automation tasks, or cloud-based development environments.
Content
MCP Execute Command Server
An implementation of the Model Context Protocol (MCP) server for executing commands across different platforms.
Features
- Cross-platform command execution
- Support for both shell and direct command execution
- Configurable working directory
- Comprehensive error handling and reporting
Installation
pip install mcp-execute-command
Usage
As a Library
from mcp_execute_command import MCPExecuteCommandServer
server = MCPExecuteCommandServer()
asyncio.run(server.start())
Command Line
python -m mcp_execute_command
Protocol Implementation
This server implements the MCP protocol with the following capabilities:
- Tool:
execute_command
- Version: 1.0
- Methods:
execute_command
: Execute a command and return results
Request Format
{
"jsonrpc": "2.0",
"method": "execute_command",
"params": {
"command": "echo 'hello world'",
"shell": false,
"cwd": "/optional/working/directory"
},
"id": 1
}
Response Format
{
"jsonrpc": "2.0",
"result": {
"success": true,
"returncode": 0,
"stdout": "hello world\n",
"stderr": ""
},
"id": 1
}
License
MIT License