Labsco
MCP SERVER

Command-Line MCP Server

by andresthor

Let an assistant run shell commands, with reads automatic and everything else waiting for approval.

Editors, Terminals & Local Dev Environment
Summary
The categories are yours to edit, and command lists merge with the defaults rather than replace them.

Read, write, system and blocked are just lists, so adding jq and rg to the read category is one environment variable and does not cost you the built-in set. On Claude Desktop, set CMD_LINE_MCP_SECURITY_REQUIRE_SESSION_ID to false — the author flags it as the way to avoid repeated approval prompts.

What it is

An MCP server that runs terminal commands under a four-stage safety check: dangerous patterns blocked, every command classified, the target directory whitelisted, and write or system commands held for session approval.

What you get
  • Read-only commands that run without asking — execute_read_command
  • Write and system commands behind approval — execute_command
  • Grant access as you go: approve_directory and approve_command_type
  • See the current boundaries: list_directories, list_available_commands, get_configuration
  • Usage guidance for a command before you run it — get_command_help
  • Pipes, semicolons and & supported, with each segment validated independently
  • Shells and interpreters blocked outright, including indirect routes such as awk system(), sed /e and find -exec
Requirements

Pip install cmd-line-mcp, then run cmd-line-mcp with an optional --config path. Settings come from a JSON file, a .env file or environment variables named CMD_LINE_MCP_<SECTION>_<SETTING>; version 0.6.0.

Setup effort

One command — pip install cmd-line-mcp