Secure Command Executor MCP Server logo

Secure Command Executor MCP Server

by HappyAny

A robust command execution MCP service designed to securely manage and execute system commands with safety checks and logging. It features daily log rotation for detailed action tracking.

View on GitHub

Last updated: N/A

What is Secure Command Executor MCP Server?

The Secure Command Executor MCP Server is a service that allows you to securely execute system commands with safety checks and logging. It provides a way to manage and control which commands can be executed, and it keeps a detailed log of all actions.

How to use Secure Command Executor MCP Server?

  1. Clone the repository. 2. Install dependencies using npm install minimist @modelcontextprotocol/sdk zod. 3. Configure the commands.json file to define available commands. 4. Start the service using node index.js --file commands.json --logs logs --port 3000. 5. Use the API endpoints to execute commands, query commands, manage commands, and query logs.

Key features of Secure Command Executor MCP Server

  • Command Execution

  • Safety Checks

  • Command Management

  • Logging

  • Query Tools

Use cases of Secure Command Executor MCP Server

  • Securely executing administrative tasks

  • Auditing system command usage

  • Managing command access for different users or roles

  • Automating system maintenance tasks

FAQ from Secure Command Executor MCP Server

How do I add a new command?

Add a new entry to the commands.json file with the command's name, description, example, and other relevant properties.

How do I enable or disable a command?

Modify the enabled property in the commands.json file for the specific command.

Where are the logs stored?

Logs are stored in the directory specified by the --logs command-line argument. By default, this is the logs directory.

How do I query the logs?

Use the /queryLogs API endpoint with filters such as limit and filter to retrieve specific log entries.

What is the purpose of the dangerous property in commands.json?

The dangerous property indicates whether a command could potentially cause harm to the system. If set to true, the service will prompt for confirmation before executing the command.