Labsco
inercia logo

MCP-CLI Adapter

β˜… 66

from inercia

Use command line tools in a secure fashion as MCP tools.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

MCPShell

<p align="center"> <img src="docs/logo.png" alt="banner" width="300"/> </p>

The MCPShell is a tool that allows LLMs to safely execute command-line tools through the Model Context Protocol (MCP). It provides a secure bridge between LLMs and operating system commands.

Features

  • Flexible command execution: Run any shell commands as MCP tools, with parameter substitution through templates.
  • Configuration-based tool definitions: Define tools in YAML with parameters, constraints, and output formatting.
  • Security through constraints: Validate tool parameters using CEL expressions before execution, as well as optional sanboxed environments for running commands.
  • Quick proptotyping of MCP tools: just add some shell code and use it as a MCP tool in your LLM.
  • Simple integration: Works with any LLM client supporting the MCP protocol (ie, Cursor, VSCode, Witsy...)

Agent Mode

For AI agent functionality that connects LLMs directly to tools, see the Don project. Don provides:

  • Direct LLM connectivity without requiring a separate MCP client
  • RAG (Retrieval-Augmented Generation) support
  • Multi-agent architecture
  • Uses MCPShell's tool configuration format

Security Considerations

So you will probably thing "this AI has helped me finding all those big files. What if I create another tool for removing files?". Don't do that!.

  • Limit the scope of these tools to read-only actions, do not give the LLM the power to change things.
  • Use constraints to limit command execution to safe parameters
  • Consider using a sanboxed environment for running commands.
  • Review all command templates for potential injection vulnerabilities
  • Only expose tools that are safe for external use
  • All of the above!

Please read the Security Considerations document before using this software.

Contributing

Contributions are welcome! Take a look at the development guide. Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.