What is MCPShell?
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, enabling AI assistants to run shell commands with configurable constraints and parameter validation.
How to use MCPShell?
Create a YAML configuration file defining your tools with parameters, constraints, and the shell command to run. Then configure MCPShell as an MCP server in your LLM client (e.g., Cursor, VS Code) using go run github.com/inercia/MCPShell@v0.1.8 mcp --tools <config>. After refreshing the client, you can ask the LLM questions that require command execution.
Key features of MCPShell
- Flexible command execution with parameter substitution through templates
- Configuration-based tool definitions in YAML with parameters and constraints
- Security through CEL expression validation and optional sandboxed environments
- Quick prototyping of MCP tools by adding shell code
- Simple integration with any LLM client supporting the MCP protocol
Use cases of MCPShell
- Analyzing disk usage to identify space-consuming directories
- Running Kubernetes commands via kubectl for cluster management
- Executing AWS CLI commands for network diagnostics
コメント