MCPShell

MCPShell

A configurable tool enabling LLMs to safely execute shell commands via MCP.

43
Stars
5
Forks
20
Releases

Overview

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. It supports flexible command execution by turning any shell commands into MCP tools, with parameter substitution via templates. Tools are defined in YAML with parameters, constraints, and output formatting. Security is enforced by validating tool parameters using CEL expressions before execution, and optional sandboxed environments for running commands (see docs/config-runners.md). It enables rapid prototyping of MCP tools: you can drop in shell code and reuse it as an MCP tool in your LLM workflows. The server is designed for easy integration with MCP clients, including Cursor, Visual Studio Code, and Wisty, and includes guidance in the Quick Start on configuring the client with a tools directory. The project also offers an Agent Mode that connects MCPShell to an OpenAI-compatible API so models can autonomously invoke defined tools, with system and user prompts configurable in the YAML.

Details

Owner
inercia
Language
Go
License
MIT License
Updated
2025-12-07

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, plus optional sandboxed environments for running commands.

Quick prototyping

Rapidly prototype MCP tools by adding shell code and reusing it as MCP tools.

Simple integration

Works with any MCP-capable LLM client (Cursor, VSCode, Wisty) with straightforward configuration.

Audience

LLM developersBuild and integrate safe MCP-based tools for LLM workflows.
MCP client integratorsConfigure MCP servers in clients such as Cursor, VSCode, or Wisty to expose shell tools to models.
AI assistant developersCreate autonomous AI assistants that can perform system tasks using MCPShell tools via agent mode, with configurable prompts.

Tags

shellMCPtoolsYAMLsecurityconstraintsCELsandboxed environmentsagent modeCursorVSCodeWistyautomation