Skip to main content

A lightweight MCP server providing shell execution and environment integration

Project description

🛠️ mcp-micro-shell

PyPI Version Python Version MCP Version Powered by UV License

An ultra-lightweight, secure, and high-performance MCP server providing isolated file operations and shell execution capabilities.

Fully optimized with a flat python layout, powered by uv, and ready for global execution via uvx.


🌟 Key Features

  • ⚡ Lightning Fast Startup: Built entirely with a simplified flat package structure, executing instantly with uv virtual environments.
  • 🛡️ Hardened Sandboxed Security: All terminal runs and file read/writes are strictly sandboxed inside your designated workspace directory (MCP_MICRO_SHELL_WORKSPACE), robustly defending against directory traversal (../) attacks.
  • 🔌 Multi-Transport System:
    • Stdio (Default): High-speed JSON-RPC stdio transport for local desktop clients (Cursor, Claude Desktop, cl0w, etc.).
    • SSE (Server-Sent Events): High-performance SSE HTTP server using Starlette and Uvicorn for remote connections.
  • ⚙️ Zero Stdout Pollution: Redirects all internal engine logs exclusively to stderr, keeping the stdout channel completely pristine for JSON-RPC messages.

📂 Simplified Architecture

Optimized down to a minimalist, highly cohesive Python package layout:

mcp-micro-shell/
├── pyproject.toml              # Build backend configuration (Hatchling)
├── README.md                   # English Documentation
├── README.ko.md                # Korean Documentation
├── uv.lock                     # Lock file
└── mcp_micro_shell/            # Primary python package
    ├── __init__.py             # Version declaration
    ├── __main__.py            # Module runner (python -m)
    └── server.py              # Unified server engine & tool bindings

🛠️ Provided Tools

All tools automatically resolve relative paths against the designated workspace root and validate boundaries.

Tool Name Parameters Description
execute_command command (str, req),
cwd (str, opt),
timeout (int, opt)
Safely executes terminal commands inside the workspace (or a sub-folder inside it). Inherits system PATH for full CLI tool access.
get_current_directory None Returns the active workspace path boundary.
read_file path (str, req) Reads text files safely, verifying boundary constraints. Blocks out-of-boundary paths.
write_file path (str, req),
content (str, req)
Writes text files safely, auto-creating subfolders inside the workspace boundary. Blocks out-of-boundary paths.

🚀 Getting Started

Installation

You can install and run the server globally from PyPI using uv:

# Install globally
uv tool install mcp-micro-shell

# Or run instantly without installation
uvx mcp-micro-shell

Prerequisites

Make sure you have uv installed. If you don't, run:

Windows:

powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

macOS/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

🏃 Running the Server

1. Stdio Mode (Default)

Ideal for standard JSON-RPC desktop AI integrations.

uvx mcp-micro-shell

(For local development in the cloned repository, you can use uv run mcp-micro-shell instead).

2. SSE Mode (Web API)

Ideal for remote integrations. Runs an HTTP SSE server.

uvx mcp-micro-shell --transport sse --host 127.0.0.1 --port 8000

🔌 Integrating with MCP Clients (mcp.json)

To use this server inside AI clients (like Claude Desktop, Cursor, cl0w), configure your client config as follows:

{
  "mcpServers": {
    "mcp-micro-shell": {
      "command": "uvx",
      "args": [
        "mcp-micro-shell"
      ],
      "env": {
        "MCP_MICRO_SHELL_WORKSPACE": "C:\\path\\to\\your\\workspace"
      }
    }
  }
}

(No need to clone or point to local directories. uvx will automatically download, update, and launch the server directly from PyPI).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_micro_shell-0.1.1.tar.gz (35.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_micro_shell-0.1.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file mcp_micro_shell-0.1.1.tar.gz.

File metadata

  • Download URL: mcp_micro_shell-0.1.1.tar.gz
  • Upload date:
  • Size: 35.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mcp_micro_shell-0.1.1.tar.gz
Algorithm Hash digest
SHA256 64227163251333c72046a2834c5cf57ade14655881ad211eabad4d94f0597f1d
MD5 5518db41cb9f1517830ed3e3c35b4b66
BLAKE2b-256 ed7ed97ff9ceb220a1083f1d2b38cf9c95a54d25a00cabc4eb8607ff7787256f

See more details on using hashes here.

File details

Details for the file mcp_micro_shell-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mcp_micro_shell-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mcp_micro_shell-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c8e0247a4911771bdf1c1f2f9b8065cf2622805bc0fbd5fb1db6dd137bf971ea
MD5 1e58743fd553908e98716dcf7c892929
BLAKE2b-256 278d061784ca225c87805b50c0e6e4e7707335c3b46e032ebb04038da34b3b4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page