Labsco
MCP SERVER

CLI MCP Server

by MladenSU

Give an assistant shell access that is fenced in — allowed commands, allowed flags, one allowed directory.

Editors, Terminals & Local Dev Environment
Summary
Shell access with the fence written down.

Every server that runs commands claims to be careful; this one makes the boundary inspectable — the rules tool returns what is actually permitted, so you can check the fence instead of trusting the README.

What it is

A Python MCP server for controlled command-line execution. Commands run only from a whitelist, inside a base directory you set, with shell-operator injection blocked, path traversal validated, and timeouts and output limits enforced. A second tool prints the rules currently in force.

What you get
  • Commands executed under strict validation, with detailed error reporting
  • A whitelist of allowed commands and flags, with an all option when you want it open
  • Execution confined to one base directory, with path traversal prevented
  • Shell operator injection blocked
  • Execution timeouts and output length limits
  • The active security rules printed on request, so the boundary is visible rather than assumed
Requirements

A recent Python. The base directory is required and the server will not start without it; the commands it may run are given as a comma-separated list. Both are set in the environment.

Setup effort

One command — npx @smithery/cli install cli-mcp-server --client claude