CLI Wrapper

•
1
•

Packages any command-line tool into an MCP server within a Docker container, providing AI coding assistants with structured, safe access.

cli-mcp transforms any command-line interface tool, such as AWS CLI, GitHub CLI, or kubectl, into a secure MCP server accessible by AI coding assistants like Claude Code. It addresses the inherent risks of granting AI agents raw shell access by isolating tools within Docker containers, bypassing the shell with `execFile()`, and employing robust command tokenization to reject dangerous metacharacters. Furthermore, it offers configurable guardrails to allow or block command patterns, strip sensitive arguments, and auto-inject necessary parameters, ensuring safe and controlled interactions with external systems.

Key Features

01Tokenizes and validates commands, rejecting shell metacharacters like pipes and redirects.
02Credential-driven activation ensures servers only start if necessary credentials are present.
03Bypasses shell execution via `execFile()` to prevent injection attacks.
04Configurable guardrails for allowing/blocking command patterns and processing arguments (strip/prepend).
05Runs CLI tools in isolated Docker containers for enhanced security.
060 GitHub stars

Use Cases

01Integrating GitHub CLI with AI agents while blocking destructive repository operations (e.g., `repo delete`).
02Enabling secure, restricted interaction with `kubectl`, Terraform, or Helm tools for cluster management or infrastructure as code.
03Providing read-only, guarded access to AWS CLI for staging or shared environments.