drio
Open app

CLI MCP Server

Source

Mirror of

Catalog onlyCatalog onlySTDIO

Overview

CLI MCP Server is a secure Model Context Protocol (MCP) server implementation designed for executing controlled command-line operations with comprehensive security features.

To use the CLI MCP Server, install it via Smithery and configure it using environment variables to set allowed commands, flags, and directories. You can then execute whitelisted CLI commands within the allowed directories.

  • 🔒 Secure command execution with strict validation - ⚙️ Configurable command and flag whitelisting - 🛡️ Path traversal prevention - 🚫 Shell operator injection protection - ⏱️ Execution timeouts and length limits - 📝 Detailed error reporting - 🔄 Async operation support
  1. Providing controlled CLI access to LLM applications.
  2. Executing secure commands in a multi-user environment.
  3. Enforcing security policies for command execution.

Add to your AI client

Use these steps to connect CLI MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mladensu-cli-mcp-server-mcp-mirror": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mladensu-cli-mcp-server-mcp-mirror"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mladensu-cli-mcp-server-mcp-mirror": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mladensu-cli-mcp-server-mcp-mirror"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mladensu-cli-mcp-server-mcp-mirror": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mladensu-cli-mcp-server-mcp-mirror"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mladensu-cli-mcp-server-mcp-mirror": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mladensu-cli-mcp-server-mcp-mirror"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mladensu-cli-mcp-server-mcp-mirror": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mladensu-cli-mcp-server-mcp-mirror"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mladensu-cli-mcp-server-mcp-mirror": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mladensu-cli-mcp-server-mcp-mirror"
      ]
    }
  }
}

FAQ

Can I customize the allowed commands?

Yes! You can configure the allowed commands and flags through environment variables.

Is the CLI MCP Server secure?

Yes! It includes multiple security features such as command whitelisting and path validation.

What are the prerequisites for using CLI MCP Server?

You need Python 3.10+ and the MCP protocol library.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":726,"uuid":"8d14d5ff-1273-40bb-9db9-35a7375c1b6c","name":"MladenSU_cli-mcp-server","title":"CLI MCP Server","description":"Mirror of","avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","created_at":"2024-12-30T03:27:40.405Z","updated_at":"2025-02-23T07:16:03.539Z","status":"created","author_name":"MCP-Mirror","author_avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","tags":"cli,mcp,server,security","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/MCP-Mirror/MladenSU_cli-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":"https://camo.githubusercontent.com/6581c31c16c1b13ddc2efb92e2ad69a93ddc4a92fd871ff15d401c4c6c9155a4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667","type":null,"metadata":null,"user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]