MCPShell MCP Server
A tool that enables LLMs to safely execute command-line commands through the Model Context Protocol (MCP), providing a secure bridge between LLMs and operating system commands with configuration-based tool definitions and security constraints.
Get this MCP server
A tool that enables LLMs to safely execute command-line commands through the Model Context Protocol (MCP), providing a secure bridge between LLMs and operating system commands with configuration-based tool definitions and security constraints.
Installation
Go Run
go run github.com/inercia/MCPShell@v0.1.8 mcp --tools /my/example.yaml --logfile /some/path/mcpshell/example.log
Configuration
Cursor
{
"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"
]
}
}
}
Cursor (Relative Paths)
{
"mcpServers": {
"mcp-cli-examples": {
"command": "go",
"args": [
"run", "github.com/inercia/MCPShell@v0.1.8",
"mcp", "--tools", "example",
"--logfile", "/some/path/mcpshell/example.log"
]
}
}
}
Available Tools
| Tool | Description |
|---|---|
disk_usage |
Check disk usage for a directory with customizable depth analysis |
Features
- Flexible command execution with parameter substitution through templates
- Tool definitions based on YAML configuration with parameters, constraints, and output formatting
- Security through constraints using CEL expressions for parameter validation
- Optional isolated environments for command execution
- Fast prototyping of MCP tools by adding shell code
- Agent mode for direct connection to LLMs without a separate MCP client
- Support for interactive dialogs and one-time execution
- Deployment options for containers and Kubernetes
Usage Examples
I'm running out of space in my hard disk. Could you help me finding the problem?
Help me analyze disk usage to identify what's consuming space
Notes
Supports multiple LLM clients (Cursor, VSCode, Witsy). Includes examples for kubectl and AWS CLI integration. Strong emphasis on security—it's recommended to limit tools to read-only operations and use constraints to prevent command injection. Default tools directory: ~/.mcpshell/tools/. Configuration supports relative paths and can omit .yaml extensions.