Skip to main content

A lightweight MCP server providing shell execution and environment integration

Project description

🛠️ mcp-micro-shell

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

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.

uv run mcp-micro-shell

2. SSE Mode (Web API)

Ideal for remote integrations. Runs an HTTP SSE server.

uv run 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": [
        "--from",
        "C:\\Users\\SKTelecom\\Documents\\mcp-micro-shell",
        "mcp-micro-shell"
      ],
      "env": {
        "MCP_MICRO_SHELL_WORKSPACE": "C:\\Users\\SKTelecom\\Documents\\mcp-micro-shell\\workspace"
      }
    }
  }
}

(Once published to PyPI, the --from local path argument can be omitted to pull 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.0.tar.gz (35.2 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.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_micro_shell-0.1.0.tar.gz
  • Upload date:
  • Size: 35.2 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.0.tar.gz
Algorithm Hash digest
SHA256 e0e7d55111a3688e2319badec86a35255330040e11d0e381e133aa33948c7ce6
MD5 70fb8364a6111712f1744e18c1b46627
BLAKE2b-256 2a8f1d11c41cac3324ac4b11dafeba25c04e0acf9420d031a5a8780a536fc674

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mcp_micro_shell-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41fcaee28f845f9fdc0e1ef4b3c0a40cfbdd1b8c36ea64a9f5043bba5ebc9fa9
MD5 a54555739831cc78a050820a12dbb225
BLAKE2b-256 bef8288832cd6e15fa537966a0d86e10492f20a405bcec7dd8ba0f08a3aa6196

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