SSH Rails

Enables secure remote Rails console execution over SSH with read-only and mutation workflows.
  • javascript

0

GitHub Stars

javascript

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mcp-mirror-tadasant_mcp-server-ssh-rails-runner": {
      "command": "npx",
      "args": [
        "mcp-server-ssh-rails-runner"
      ],
      "env": {
        "SSH_HOST": "your.remote.host",
        "SSH_USER": "your_ssh_user",
        "RAILS_WORKING_DIR": "/path/to/rails/app/root",
        "SSH_PRIVATE_KEY_PATH": "your_SSH_PRIVATE_KEY_PATH"
      }
    }
  }
}

You have an MCP server that securely executes Rails console commands over SSH, with safe read-only operations and carefully managed mutations. It works well with your existing tooling to pull in Rails context and perform data queries or changes in a deployed Rails environment without navigating complex UIs.

How to use

Use an MCP client to connect to the SSH Rails Runner. You can perform read-only operations to inspect data, simulate mutations with a dry run, and execute approved mutations that you have explicitly approved. Common workflows include pulling Rails model context, running read-only queries, pre-validating mutations, and then applying changes in a controlled manner.

Typical patterns you will use: write a read-only request to fetch data or compute results, run a dry run to see what a mutation would do, review the proposed code snippet, and finally execute the snippet after your explicit confirmation.

How to install

Prerequisites you need on your machine: Node.js and npm (or your preferred package manager). Ensure you have access to the remote Rails environment via SSH and that you can reach the remote host from your current machine.

npm install
npm run build

Configuration

Set up the environment that the MCP client will use to connect to the remote SSH Rails Runner. Provide the SSH target, user, private key path, and the Rails working directory on the remote host.

{
  "mcpServers": {
    "ssh_rails_runner": {
      "command": "npx",
      "args": ["mcp-server-ssh-rails-runner"],
      "env": [
        {"name": "SSH_HOST", "value": "your.remote.host"},
        {"name": "SSH_USER", "value": "your_ssh_user"},
        {"name": "SSH_PRIVATE_KEY_PATH", "value": "your_SSH_PRIVATE_KEY_PATH"},
        {"name": "RAILS_WORKING_DIR", "value": "/path/to/rails/app/root"}
      ]
    }
  }
}

Security considerations

Only connect to trusted SSH endpoints from machines you control. Review all mutation steps before executing them to prevent unintended changes to your production data.

Notes and examples

The SSH Rails Runner supports these core capabilities: read-only Rails operations, dry-run mutation planning, and execution of approved mutations. You can combine Cursor Composer to bring Rails model context into your queries and leverage the tools to perform safe data analysis and controlled changes.

Troubleshooting

If you encounter connection issues, verify the SSH_HOST, SSH_USER, and SSH_PRIVATE_KEY_PATH values. Confirm that the remote Rails working directory path exists and contains your Rails app. Check permissions on the private key and ensure the remote environment has Ruby/Rails versions compatible with your commands.

Available tools

run_read_only

Executes read-only Rails console operations. The tool analyzes the request, formulates safe read-only commands, and returns the results.

dry_run_mutate

Plans and validates potential mutations. Creates a code snippet resource with the proposed changes without executing them.

execute_mutate

Executes previously approved mutation code snippets. Requires explicit user approval of a code snippet resource before execution.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
SSH Rails MCP Server - mcp-mirror/tadasant_mcp-server-ssh-rails-runner | VeilStrat