IM

inercia/mcpshell

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

72 stars 16 forks 품질 73 트렌드 22MIT

inercia/mcpshell은 MCP 서버 후보로 수입 https://github.com/inercia/mcpshell.]

개요

inercia/mcpshell은 MCP 서버 후보로 수입 https://github.com/inercia/mcpshell.]

개요(AI 번역)

MCPShell는 LLM을 안전하게 실행할 수 있는 도구** **Model Context Protocol (MCP)**을 통해 확인할 수 있습니다. LLM과 운영 체제 명령 사이의 보안 브리지를 제공합니다.

특징

  • Flexible 명령 실행: MCP 도구로 어떤 쉘 명령을 실행, 템플릿을 통해 매개 변수 대용.
  • ** 구성 기반 도구 정의 **: 모수를 가진 YAML에 있는 공구를 정의하십시오, constraints 및 출력 포맷.
  • ** 제약을 통한 보안 : CEL 표현을 사용한 유효 도구 매개 변수 실행하기 전에, 뿐만 아니라 옵션sanboxed 환경** 실행 명령을 위해.
  • ** MCP 도구의 빠른 proptotyping ** : 일부 쉘 코드를 추가하고 사용 당신의 LLM에 있는 MCP 공구.
  • ** 간단한 통합**: MCP 프로토콜을 지원하는 LLM 클라이언트와 함께 작동합니다. (즉, 커서, VSCode, Witsy…)

빠른 시작

Cursor (또는 다른 MCP 클라이언트)를 원하는 상상해보십시오. 하드 디스크의 공간 문제.

  1. 구성 파일 생성 /my/example.yaml 도구 정의:

더 정교한 유용한 예제를 위한 예제 디렉토리를 살펴보세요. 어쩌면 LLM이 쿠버네티스 클러스터에 대해 알고 있어야 합니다

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

MCPShell

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/[email protected]",
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

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