A secure Model Context Protocol (MCP) server implementation for executing controlled command-line operations with comprehensive security features.
A secure Model Context Protocol (MCP) server implementation for executing controlled command-line operations with comprehensive security features.
This MCP server enables secure command-line execution with robust security measures including command whitelisting, path validation, and execution controls. Perfect for providing controlled CLI access to LLM applications while maintaining security.
The server publishes 4 tools. What each one is for:
run_command — Executes whitelisted CLI commands within allowed directoriesshow_security_rules — Displays current security configuration and restrictions, including: - Working directory - Allowed commands - Allowed flags - Security limits (maxPrerequisites — The Prerequisites tool exposed by this serverDebugging — Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the [MCPrun_command — Executes whitelisted CLI commands within allowed directories.show_security_rules — Displays current security configuration and restrictions, including: - Working directory - Allowed commands - Allowed flags - Security limits (max command length and timeout)Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.
Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.
| Tool | What it does |
|---|---|
| run_command | |
| show_security_rules |
{
"mcpServers": {
"cli-mcp-server": {
"command": "uv",
"args": [
"--directory",
"<path/to/the/repo>/cli-mcp-server",
"run",
"cli-mcp-server"
],
"env": {
"ALLOWED_DIR": "</your/desired/dir>",
"ALLOWED_COMMANDS": "ls,cat,pwd,echo",
"ALLOWED_FLAGS": "-l,-a,--help,--version",
"MAX_COMMAND_LENGTH": "1024",
"COMMAND_TIMEOUT": "30",
"ALLOW_SHELL_OPERATORS": "false"
}
}
}
}From the project documentation. Replace placeholders and example paths before connecting.
| Variable | Description | Required |
|---|---|---|
| ALLOWED_DIR | Declared in the maintainer’s client configuration. | Yes |
| ALLOWED_COMMANDS | Declared in the maintainer’s client configuration. | Check documentation |
| ALLOWED_FLAGS | Declared in the maintainer’s client configuration. | Check documentation |
| MAX_COMMAND_LENGTH | Declared in the maintainer’s client configuration. | Check documentation |
| COMMAND_TIMEOUT | Declared in the maintainer’s client configuration. | Check documentation |
| ALLOW_SHELL_OPERATORS | Declared in the maintainer’s client configuration. | Check documentation |
Read, search and edit files inside allowed directories with the Model Context Protocol reference Filesystem server.
Retrieve version-aware library documentation and code examples with Context7 MCP, using resolve-library-id and query-docs.
Use Microsoft’s Playwright MCP server to navigate pages, inspect accessibility snapshots, fill forms and capture browser screenshots.
Connect GitHub MCP to repositories, issues and pull requests with GitHub’s hosted service or a locally run server.
Use the Supabase MCP server to inspect database schemas, query project data and retrieve docs through a project-scoped connection.
Search Linear issues and projects, inspect work context and manage updates through Linear’s hosted MCP server with OAuth.