inercia/mcp-cli-adapter

inercia/mcp-cli-adapter

от inercia
MCPShell - MCP-сервер для безопасного запуска shell-команд из LLM. Определяйте инструменты в YAML с параметрами и ограничениями. Быстрое прототипирование MCP-инструментов из shell-команд.

MCPShell

banner

The MCPShell is a tool that allows LLMs to safely execute command-line tools through the Model Context Protocol (MCP). It provides a secure bridge between LLMs and operating system commands.

Features

  • Flexible command execution: Run any shell commands as MCP tools, with parameter substitution through templates.
  • Configuration-based tool definitions: Define tools in YAML with parameters, constraints, and output formatting.
  • Security through constraints: Validate tool parameters using CEL expressions before execution, as well as optional sanboxed environments for running commands.
  • Quick proptotyping of MCP tools: just add some shell code and use it as a MCP tool in your LLM.
  • Simple integration: Works with any LLM client supporting the MCP protocol (ie, Cursor, VSCode, Witsy...)

Quick Start

Imagine you want Cursor (or some other MCP client) help you with your space problems in your hard disk.

  1. Create a configuration file /my/example.yaml defining your tools:

    mcp:
      description: |
        Tool for analyzing disk usage to help identify what's consuming space.
      run:
        shell: bash
      tools:
        - name: "disk_usage"
          description: "Check disk usage for a directory"
          params:
            directory:
              type: string
              description: "Directory to analyze"
              required: true
            max_depth:
              type: number
              description: "Maximum depth to analyze (1-3)"
              default: 2
          constraints:
            - "directory.startsWith('/')"  # Must be absolute path
            - "!directory.contains('..')"  # Prevent directory traversal
            - "max_depth >= 1 && max_depth <= 3"  # Limit recursion depth
            - "directory.matches('^[\\w\\s./\\-_]+$')"  # Only allow safe path characters, prevent command injection
          run:
            command: |
              du -h --max-depth={{ .max_depth }} {{ .directory }} | sort -hr | head -20
          output:
            prefix: |
              Disk Usage Analysis (Top 20 largest directories):
    

    Take a look at the examples directory for more sophisticated and useful examples. Maybe you prefer to let the LLM know about your Kubernetes cluster with kubectl? Or let it run some AWS CLI commands?

  2. Configure the MCP server in Cursor (or in any other LLM client with support for MCP)

    For example, for Cursor, create .cursor/mcp.json:

    {
        // you need the "go" command available
        "mcpServers": {
            "mcp-cli-examples": {
                "command": "go",
                "args": [
                   "run", "github.com/inercia/MCPShell@v0.1.8",
                   "mcp", "--tools", "/my/example.yaml",
                   "--logfile", "/some/path/mcpshell/example.log"
                ]
            }
        }
    }
    

    You can also use relative paths and omit the .yaml extension:

    {
        "mcpServers": {
            "mcp-cli-examples": {
                "command": "go",
                "args": [
                   "run", "github.com/inercia/MCPShell@v0.1.8",
                   "mcp", "--tools", "example",
                   "--logfile", "/some/path/mcpshell/example.log"
                ]
            }
        }
    }
    

    This will look for example.yaml in the tools directory (~/.mcpshell/tools/ by default).

    See more details on how to configure Cursor or Visual Studio Code. Other LLMs with support for MCPs should be configured in a similar way.

  3. Make sure your MCP client is refreshed (Cursor should recognize it automatically the firt time, but any change in the config file will require a refresh).

  4. Ask your LLM some questions it should be able to answer with the new tool. For example: "I'm running out of space in my hard disk. Could you help me finding the problem?".

У этого сервера пока нет списка инструментов.

Похожие MCP-сервера

tumf/mcp-shell-server

tumf/mcp-shell-server

от tumf

MCP сервер для безопасного удалённого выполнения команд оболочки с белым списком, изоляцией окружения и аудитом. Поддерживает stdin, пайпы и лимиты времени/вывода. Идеален для интеграции shell-команд в MCP с контролем безопасности.

Python⭐ 201
sonirico/mcp-shell

sonirico/mcp-shell

от sonirico

MCP сервер для безопасного выполнения shell-команд через LLM с полным контролем. Secure-режим по умолчанию ограничивает утилиты белым списком read-only команд. Политики настраиваются через YAML. Идеален для Claude Desktop и агентов, где важна безопасность.

Go⭐ 108
alfonsograziano/node-code-sandbox-mcp

alfonsograziano/node-code-sandbox-mcp

от alfonsograziano

Выполняет Node.js-код в изолированном Docker-контейнере: ставит npm-пакеты, запускает shell-команды и возвращает вывод.

TypeScript⭐ 158
MladenSU/cli-mcp-server

MladenSU/cli-mcp-server

от mladensu

MCP сервер для безопасного выполнения команд CLI с whitelist-фильтрацией. Защищает от path traversal, ограничивает команды, флаги и длину, устанавливает таймауты. Идеален для LLM-приложений с контролируемым доступом к терминалу.

Python⭐ 177
tufantunc/ssh-mcp

tufantunc/ssh-mcp

от tufantunc

MCP-совместимый сервер для удаленного выполнения shell-команд на Linux и Windows через SSH. Поддерживает sudo, настраиваемые таймауты и аутентификацию. Отлично подходит DevOps и разработчикам, работающим с LLM.

TypeScript⭐ 816
g0t4/mcp-server-commands

g0t4/mcp-server-commands

от g0t4

Выполняет команды и скрипты на компьютере: bash, python, zsh, создаёт файлы, передаёт код через stdin и возвращает вывод. Работает с локальными моделями.

TypeScript⭐ 235
© Каталог MCP, 2026. Все права защищены.
Проект не аффилирован с Anthropic и любыми упомянутыми продуктами.
Все названия и торговые марки принадлежат их владельцам.
Контакты для связи: hi@mcp-katalog.ru

Лука Никитин