C

CLI Secure

Execute shell commands with strict security policies.

101 views
0 installs
Updated Oct 13, 2025
Not audited
Execute shell commands with strict security policies.
  1. Decide the directory for command execution

    • Determine which directory on your machine should be accessible for CLI operations. You will set this as the value for ALLOWED_DIR.
  2. Choose which commands and flags are permitted

    • List the commands you wish to allow (for example: ls,cat,pwd,echo). This will be your value for ALLOWED_COMMANDS.
    • List the command-line flags you wish to allow (for example: -l,-a,--help,--version). This will be your value for ALLOWED_FLAGS.
  3. (Optional) Set advanced restrictions

    • If needed, set a maximum command length with MAX_COMMAND_LENGTH.
    • Set the number of seconds before a command times out with COMMAND_TIMEOUT.
    • If you want to allow shell operators like &&, set ALLOW_SHELL_OPERATORS to true. By default, it should be false for security.
  4. Open the FastMCP connection interface

    • Click the “Install Now” button to add ENV values for your MCP server.
  5. Fill each required environment variable in the FastMCP interface:

    • Enter your desired directory for ALLOWED_DIR.
    • Input your selected allowed commands for ALLOWED_COMMANDS.
    • Enter your chosen allowed flags for ALLOWED_FLAGS.
    • Set MAX_COMMAND_LENGTH, COMMAND_TIMEOUT, and ALLOW_SHELL_OPERATORS as needed, based on your preference or use the defaults.
  6. Save and apply your configuration

    • After entering the values, save the configuration to enable the server with your chosen security settings.

Note: The environment variables are required for correct operation and security. Review your selections to ensure they match your intended restrictions and permissions.

Quick Start

View on GitHub

More for Security

View All →

More for Developer Tools

View All →

Similar MCP Servers

Report Issue

Thank you! Your issue report has been submitted successfully.