Skip to main content
Glama

MCP Server: SSH Rails Runner

by tadasant

MCP 서버: SSH Rails Runner

SSH를 통해 Rails 콘솔 명령을 안전하게 원격으로 실행할 수 있는 MCP 서버입니다. 이 서버는 배포된 Rails 환경에서 읽기 전용 작업과 신중하게 관리되는 변형을 위한 도구를 제공합니다.

이 기능은 Cursor와 잘 작동합니다. Cursor Composer를 사용하여 Rails 모델 파일을 컨텍스트로 가져온 다음, execute_read_only , dry_run_mutate , execute_mutate 도구를 사용하여 데이터베이스를 변경할 수 있습니다. 복잡한 관리 UI를 사용하지 않고도 데이터 정리 및 분석을 수행할 수 있습니다.

예

특징

  • SSH를 통한 원격 Rails 콘솔 실행
  • 안전한 읽기 전용 작업
  • 돌연변이에 대한 드라이런 기능
  • 승인된 돌연변이의 실행
  • 코드 조각에 대한 리소스 관리

설치

지엑스피1

구성

다음 환경 변수를 설정하세요.

SSH_HOST=your.remote.host SSH_USER=your_ssh_user SSH_PRIVATE_KEY_PATH=your_SSH_PRIVATE_KEY_PATH RAILS_WORKING_DIR=/path/to/rails/app

Claude Desktop과 함께 사용

Claude Desktop 구성에 다음을 추가합니다.

{ "mcpServers": { "ssh-rails-runner": { "command": "npx", "args": ["mcp-server-ssh-rails-runner"], "env": { "SSH_HOST": "your.remote.host", "SSH_USER": "your_ssh_user", "SSH_PRIVATE_KEY_PATH": "your_SSH_PRIVATE_KEY_PATH", "RAILS_WORKING_DIR": "/path/to/rails/app/root", "PROJECT_NAME_AS_CONTEXT": "Name that shows up in tool descriptions to help the LLM describe what kind of Rails project we're working with.", "CODE_SNIPPET_FILE_DIRECTORY": "/path/to/store/code/snippets/locally" } } } }

CODE_SNIPPET_FILE_DIRECTORY 제공되지 않으면 스니펫은 임시 디렉터리(예: /tmp/mcp-ssh-rails-runner-code-snippets )에 저장됩니다. PROJECT_NAME_AS_CONTEXT 선택 사항이며 도구 설명에서 프로젝트 컨텍스트를 식별하는 데 도움이 됩니다.

사용 가능한 도구

이제 서버는 준비 -> 실행 워크플로를 사용합니다.

mcp_ssh_rails_runner_prepare_code_snippet

  • 인수 : name (문자열, 파일 이름), type (열거형: "readOnly" | "mutate"), code (문자열, Ruby 코드), description (문자열, 선택 사항).
  • 기능 : 제공된 Ruby 코드를 code_snippet_<name>.json 이라는 로컬 파일에 저장하고, 이를 읽기 전용 또는 변경으로 표시한 후 검토를 위해 파일을 엽니다.
  • 반환 : 생성된 스니펫의 file:// URI.

mcp_ssh_rails_runner_execute_code_snippet_read_only

  • 인수 : uri (문자열, file://``prepareCodeSnippet 의 URI).
  • 기능 : URI에서 코드 조각을 읽고, readOnly 으로 표시되었는지 확인하고, 코드에 대한 안전성 검사를 수행한 후 실행합니다.
  • 반환값 : Rails 명령의 출력.

mcp_ssh_rails_runner_execute_code_snippet_mutate

  • 인수 : uri (문자열, file://``prepareCodeSnippet 의 URI).
  • 기능 : 위험 구역! 코드 조각을 읽고 mutate 로 표시되었는지 확인한 후 바로 실행합니다 . 이 도구에는 예행 연습이나 추가 안전 점검 기능이 없습니다.
  • 반환값 : Rails 명령의 출력.
  • 사용법 : 사용자가 준비된 코드( prepareCodeSnippet 에서 열린 파일을 통해)를 검토하고 뮤테이션을 실행하고 싶다는 것을 명시적으로 확인한 후에만 이것을 호출합니다.

보안 고려 사항

  • (일시적으로) 원격 환경에 대한 액세스 권한이 제공된 로컬 머신의 신뢰할 수 있는 SSH 엔드포인트에서만 사용하세요.
  • 가장 중요한 점은, executeCodeSnippetMutate 사용하여 뮤테이션을 실행하기 전에 prepareCodeSnippet 으로 저장된 코드를 항상 검토하는 것입니다. 뮤테이션 확인 책임은 사용자와 호출하는 AI에게 있습니다.

특허

MIT

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

배포된 Rails 환경에서 승인된 변경 사항 실행, 변형 계획, 읽기 전용 작업을 위해 SSH를 통해 Rails 콘솔 명령을 안전하게 원격으로 실행할 수 있습니다.

    1. 특징
      1. 설치
        1. 구성
          1. Claude Desktop과 함께 사용
            1. 사용 가능한 도구
              1. mcp_ssh_rails_runner_prepare_code_snippet
              2. mcp_ssh_rails_runner_execute_code_snippet_read_only
              3. mcp_ssh_rails_runner_execute_code_snippet_mutate
            2. 보안 고려 사항
              1. 특허

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  A secure shell command execution server implementing the Model Context Protocol (MCP). This server allows remote execution of whitelisted shell commands with support for stdin input.
                  Last updated -
                  1
                  74
                  Python
                  MIT License
                  • Apple
                • A
                  security
                  A
                  license
                  A
                  quality
                  A secure server for executing terminal commands within predefined paths, allowing safe interaction by Large Language Models with operating system environments.
                  Last updated -
                  1
                  11
                  3
                  JavaScript
                  MIT License
                  • Apple
                  • Linux
                • A
                  security
                  A
                  license
                  A
                  quality
                  A secure terminal execution server that enables controlled command execution with security features and resource limits via the Model Context Protocol (MCP).
                  Last updated -
                  1
                  12
                  1
                  JavaScript
                  MIT License
                  • Apple
                • -
                  security
                  F
                  license
                  -
                  quality
                  A secure SSH server implementation for Model Context Protocol that enables remote command execution and file operations, supporting both password and key-based authentication.
                  Last updated -
                  8
                  TypeScript

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/tadasant/mcp-server-ssh-rails-runner'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server