Cmd Line MCP Server

Terminal commands executed through a categorized validation and directory whitelist pipeline.

Data last scanned today · Reviewed today

2410PythonMIT

Overview

This server provides a bridge for AI assistants to execute terminal commands while enforcing security constraints. It categorizes commands into read, write, and system groups, applying different approval requirements for each. Users can configure whitelisted directories to restrict where file operations occur. The server features a validation layer that screens commands against dangerous patterns and shells before execution. It prevents common command-execution vectors such as direct shell calls, python interpreter access, or dangerous flags in utilities like find and tar, ensuring that only explicitly permitted operations proceed.

Our verdict

This project carries a high risk level with a security score of 24/100. The score reflects that it is a community-maintained tool by a single contributor rather than an official vendor, and it has not yet undergone editorial review. While it implements a command validation pipeline, users should approach this with caution as the security claims rely on internal filtering logic that has not been externally audited. It is suitable for testing environments but should be avoided in sensitive production systems.

  • Categorizes commands into read, write, and system types
  • Implements directory whitelisting for file operations
  • Uses zero direct dependencies to minimize supply-chain surface
  • Supports segment-level validation for complex command pipes
  • Security score of 24/100 indicates high risk
  • Maintained by a single contributor with no editorial review
  • Last commit was 130 days ago
  • Lacks an official vendor or organization backing

Compatibility

ClientLocalDockerRemoteRead-only
ChatGPT
Claude Desktop
Cursor
VS Code
Windsurf

Frequently asked questions

How does the server determine if a command is permitted?

The server uses a validation pipeline that includes pattern matching to block dangerous constructs, command classification into categories, directory whitelisting, and mandatory approval for write or system-level operations.

Can I use commands like 'sudo' or 'python' with this server?

No, commands that function as shells, scripting interpreters, or known command-execution vectors are explicitly blocked.

Do I need to approve every command executed?

Read commands are automatically approved, while write and system commands require manual session approval.

How can I prevent approval loops when using Claude Desktop?

You should set the environment variable CMD_LINE_MCP_SECURITY_REQUIRE_SESSION_ID to 'false' in your configuration.

Is it possible to add new commands to the allowed list?

Yes, you can extend the default command lists by using environment variables such as CMD_LINE_MCP_COMMANDS_READ or via a JSON configuration file.

Badge

Cmd Line MCP Server security score, rated on RepoAI

Maintain this server? Add the live badge to your README.