MCP-CLI Adapter

MCP-CLI Adapter is an MCP server that allows large language models to safely execute local command-line tools through the Model Context Protocol. Built primarily for developers and system administrators, this adapter creates a controlled bridge between AI clients and host operating system commands. Users define external CLI utilities using straightforward YAML configuration files where parameters, commands, output formats, and execution shells like Bash can be declared. To prevent command injection and unauthorized actions, the server supports input validation via Common Expression Language expressions and isolated runner environments. Through these declarative definitions, developers can rapidly expose utilities such as disk analyzers, Kubernetes kubectl queries, or cloud management scripts without developing dedicated MCP software. The tool communicates over standard input and output with compatible environments like Cursor and Visual Studio Code, ensuring models only run bounded commands configured with explicit constraints and read-oriented flags.

Category: Cloud & Infrastructure

Tags: automation, cli, shell, terminal

Visit MCP-CLI Adapter

How to install and configure MCP-CLI Adapter

  1. Ensure Go is installed on your system to run the adapter executable. 2. Create a YAML tool configuration file (for example, /my/example.yaml) declaring your tools, parameters, CEL constraints, and shell commands. 3. Add the server entry to your MCP client configuration (such as .cursor/mcp.json): json { "mcpServers": { "mcp-cli-examples": { "command": "go", "args": [ "run", "github.com/inercia/MCPShell@v0.1.8", "mcp", "--tools", "/my/example.yaml", "--logfile", "/some/path/mcpshell/example.log" ] } } } 4. Alternatively, place the YAML file in ~/.mcpshell/tools/ and pass the filename without an extension to --tools. 5. Refresh or restart your MCP client to register the newly exposed command-line tools.

What you can do with MCP-CLI Adapter

  • Investigating hard drive space by querying disk usage commands with bounded recursion depth and validated directory paths from Cursor. - Running read-only Kubernetes inspections through kubectl commands to retrieve cluster resources, namespace statuses, and container logs. - Querying cloud infrastructure using AWS CLI read-only commands to inspect virtual private clouds, subnets, and routing tables safely. - Rapidly prototyping new AI agent utilities by mapping standard Bash commands into structured MCP tool interfaces via YAML.

Key facts

  • https://github.com/inercia/mcp-cli-adapter
  • Cloud & Infrastructure, Developer Tools & Code Intelligence
  • automation, cli, shell, terminal

Part of MCP Servers

Related MCP servers

  • MCP KQL Server — MCP KQL Server is an MCP server that connects AI assistants to Azure Data Explorer clusters using Azure CLI authentication.…
  • MCP LaTeX Server — MCP LaTeX Server is an MCP server that provides tools for creating, editing, validating, and compiling LaTeX documents directly through…
  • MCP JSON — MCP JSON is an MCP server collection that bundles tools for file system operations, Google search, browser-based web automation, and…
  • MCP Jupyter Complete — MCP Jupyter Complete is an MCP server that provides tools for manipulating Jupyter notebook files through position-based cell operations and…
  • MCP LSP Go — MCP LSP Go is an MCP server that connects AI assistants to the official Go Language Server Protocol implementation, gopls,…
  • MCP Manager — MCP Manager is an MCP server management tool that connects directly to your Claude Desktop environment, enabling users to discover,…

How do I install MCP-CLI Adapter?

You can run MCP-CLI Adapter directly using Go without manual compilation. Add a configuration entry in your client settings that invokes go run with github.com/inercia/MCPShell@v0.1.8, specifying the mcp sub-command and passing the path to your YAML tool configuration file with the tools flag.

What can MCP-CLI Adapter do?

MCP-CLI Adapter turns standard terminal utilities into Model Context Protocol tools. It parses YAML files defining commands, applies parameter substitution templates, enforces parameter validation using Common Expression Language constraints, and returns sanitized shell output back to connected language models.

Which MCP clients work with MCP-CLI Adapter?

MCP-CLI Adapter works with any Model Context Protocol compatible client that supports standard process execution. Documented clients include Cursor, Visual Studio Code, and Witsy, as well as AI agent frameworks that implement the MCP standard.

How does MCP-CLI Adapter prevent command injection?

MCP-CLI Adapter allows administrators to declare Common Expression Language validation rules for all tool arguments. These constraints check parameters before execution, ensuring values conform to strict regular expressions, absolute directory path rules, and safe bounds before shell substitution occurs.

Is MCP-CLI Adapter open source?

Yes, MCP-CLI Adapter is open source software. The project is distributed under the MIT License, and the source code, issue tracker, and contribution guides are hosted publicly on GitHub.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories