S

SSH Rails Runner

Enables safe remote execution of Rails console commands via SSH for efficient data operations and ad...

111 views
0 installs
Updated Sep 12, 2025
Not audited
Enables safe remote execution of Rails console commands via SSH for efficient data operations and administrative tasks on production Rails applications.
  1. Obtain SSH Connection Details

    • Acquire the following information for the remote server where your Rails project runs:
      • SSH Host (SSH_HOST): The public IP address or DNS name of your remote server.
      • SSH Username (SSH_USER): The SSH user account with permission to access the Rails application directory and execute Rails console commands.
  2. Generate or Locate SSH Private Key

    • If you do not have an SSH key pair:
      • Open a terminal and run:
        ssh-keygen -t ed25519 -C "your_email@example.com"
        
      • The default location is usually ~/.ssh/id_ed25519. Use the path to your private key for the next step.
    • If you already have an SSH private key, use its file path.
  3. Ensure SSH Key Access on the Server

    • Place the public key (e.g., the contents of ~/.ssh/id_ed25519.pub) in the ~/.ssh/authorized_keys file of the SSH user on your Rails server.
  4. Locate the Rails Application Directory

    • Determine the absolute path to the root directory of your deployed Rails application on the remote server (this will be used for RAILS_WORKING_DIR).
  5. (Optional) Decide on a Project Name as Context

    • Optionally, choose a name to describe this Rails project for PROJECT_NAME_AS_CONTEXT. This helps tools clarify which project is being referenced.
  6. (Optional) Set Code Snippet Directory

    • By default, code snippets are stored in a temporary directory. If you want to control where code snippets are saved locally, specify a directory path for CODE_SNIPPET_FILE_DIRECTORY.
  7. Open the FastMCP "Install Now" Connection Interface

    • Click the "Install Now" button for the MCP SSH Rails Runner integration.
  8. Fill In the Required ENV Values

    • Enter the following values into the FastMCP connection interface:
      • SSH_HOST – your server's host (e.g., my-app.example.com)
      • SSH_USER – your SSH username (e.g., deploy)
      • SSH_PRIVATE_KEY_PATH – local file path to your private SSH key (e.g., /Users/youruser/.ssh/id_ed25519)
      • RAILS_WORKING_DIR – absolute path to the Rails app on the server (e.g., /home/deploy/my_rails_app)
      • PROJECT_NAME_AS_CONTEXT (optional) – a descriptive project name
      • CODE_SNIPPET_FILE_DIRECTORY (optional) – directory for saving code snippets
  9. Save/Apply the Configuration

    • Confirm and save your configuration in FastMCP to establish the connection.

Quick Start

View on GitHub

More for Database

View All →

More for Developer Tools

View All →

Report Issue

Thank you! Your issue report has been submitted successfully.