mcp-shell-server

mcp-shell-server

3

MCP Shell Server is a tool that allows AI agents to safely and efficiently execute shell commands using the Model Context Protocol. It supports multiple shells and includes extensive error handling and logging features. The server can be easily integrated with development tools like VS Code.

MCP Shell Server

A server utilizing the Model Context Protocol (MCP) to execute shell commands securely, acting as a bridge for AI agents.

Features

  • Execute single-line and multi-line shell commands
  • Compatibility with various shells like bash, zsh, fish, powershell, cmd, etc.
  • Detailed error handling and logging
  • MCP Inspector compatibility

Installation

Install via npm, yarn, or pnpm. Clone the repo and install dependencies for development.

MCP Configuration

Integrate with tools like Cline for VS Code. Configure your AI assistant to use MCP Shell tools according to the specified rules.

Usage

Run directly or in development mode. Test with MCP Inspector.

Command Line Arguments

Options for specifying shell paths, working directories, displaying help, and version information.

Tool Reference

Tools like shell_exec allow executing commands in the specified shell, including multi-line operations.

Resource Reference

Provides system resources like hostname, platform, shell path, username, and comprehensive system information.