MC

mladensu/cli-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

179 stars 38 forks 品質 68 トレンド 17MIT

mladensu/cli-mcp-serverは、https://github.com/mladensu/cli-mcp-server.からインポートされたMCPサーバー候補です。

概要

mladensu/cli-mcp-serverは、https://github.com/mladensu/cli-mcp-server.からインポートされたMCPサーバー候補です。

概要(AI 翻訳)


制御されたコマンドライン操作を実行するための安全なモデルコンテキストプロトコル(MCP)サーバー実装 包括的なセキュリティ機能。


目次

  1. 概要
  2. 特徴
  3. 構成
  4. 利用可能なツール
  • run_command
  • show_security_rules
  1. Claude Desktopでの利用
  • 開発/未公開サーバー構成
  • 公開サーバー構成
  1. セキュリティ機能
  2. エラー処理
  3. 開発
  • 前提条件
  • 建築と出版
  • デバッグ
  1. ライセンス

概要

このMCPサーバーは、コマンドホワイトリストやパスなどの堅牢なセキュリティ対策により安全なコマンドライン実行を可能にします 検証と実行制御。LLMアプリケーションへの制御されたCLIアクセスを提供しつつ、セキュリティを維持しつつに最適です。

特徴

  • 🔒 厳密検証によるコマンド実行の安全
  • ⚙️ 「all」オプション付きコマンドおよびフラグのホワイトリスト設定が可能です
  • 🛡️ 経路通過の防止と検証
  • 🚫 シェルオペレーター噴射保護
  • ⏱️ 実行タイムアウトと長さ制限
  • 📝 詳細なエラー報告
  • 🔄 非同期操作のサポート
  • 🎯 ワーキングディレクトリの制限と検証

構成

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

CLI MCP Server


A secure Model Context Protocol (MCP) server implementation for executing controlled command-line operations with comprehensive security features.


Table of Contents

  1. Overview
  2. Features
  3. Configuration
  4. Available Tools
  5. Usage with Claude Desktop
  6. Security Features
  7. Error Handling
  8. Development
  9. License

Overview

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.

Features

  • 🔒 Secure command execution with strict validation
  • ⚙️ Configurable command and flag whitelisting with ‘all’ option
  • 🛡️ Path traversal prevention and validation
  • 🚫 Shell operator injection protection
  • ⏱️ Execution timeouts and length limits
  • 📝 Detailed error reporting
  • 🔄 Async operation support
  • 🎯 Working directory restriction and validation

Configuration

Configure the server using environment variables:

Variable Description Default
ALLOWED_DIR Base directory for command execution (Required) None (Required)
ALLOWED_COMMANDS Comma-separated list of allowed commands or ‘all’ ls,cat,pwd
ALLOWED_FLAGS Comma-separated list of allowed flags or ‘all’ -l,-a,--help
MAX_COMMAND_LENGTH Maximum command string length 1024
COMMAND_TIMEOUT Command execution timeout (seconds) 30
GitHub で README 全文を見る

インストール

uvx cli-mcp-server
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "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" } } } }