Shell

Shell

Give hands to AI. MCP server to run shell commands securely, auditably, and on demand

45
Stars
8
Forks
3
Releases

Overview

A robust MCP server that bridges AI systems to the host shell through the Model Context Protocol. Built on the official MCP SDK for Go (mark3labs/mcp-go), it exposes the system shell as a structured tool to enable autonomous workflows, tool-assisted reasoning, and real-world problem solving. The server runs in isolation by default via Docker, with a roadmap for optional jail mechanisms such as chroot, namespaces, and syscall-level confinement to improve security without relying solely on Docker. Security features include allowlists and blocklists with regex validation, configurable execution timeouts, and restricted working directories, paired with unprivileged user execution and resource limits. Output is returned in JSON, including stdout, stderr, exit codes, and execution metadata, with optional base64 encoding for binary data. It maintains an auditable execution trail, supports context cancellation, and offers full environment-driven configuration. The design emphasizes auditable, composable, and constrained command execution suitable for MCP-enabled architectures and AI-powered decision making.

Details

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

Features

Security First

Configurable command allowlists, blocklists, and execution constraints

Docker Ready

Lightweight Alpine-based container for secure isolation

Structured Responses

JSON-formatted output with stdout, stderr, exit codes, and execution metadata

Binary Data Support

Optional base64 encoding for handling binary command output

Performance Monitoring

Execution time tracking and resource limits

Audit Logging

Complete command execution audit trail with structured logging

Context Aware

Supports command execution with proper context cancellation

Environment Configuration

Full configuration via environment variables

Audience

AI assistantsExecute shell commands securely for reasoning and action within MCP workflows

Tags

mcpshellsecuritydockeraudit-logginggocommand-validationbase64-outputcontext-cancellationconfigurationmcp-go