by tadasant
SSH Rails Runner enables secure remote Rails console command execution via SSH for streamlined data and admin tasks in p
Executes Rails console commands remotely via SSH, providing safe read-only operations and controlled mutations on production Rails applications.
SSH Rails Runner is a community-built MCP server published by tadasant that provides AI assistants with tools and capabilities via the Model Context Protocol. SSH Rails Runner enables secure remote Rails console command execution via SSH for streamlined data and admin tasks in p It is categorized under databases, developer tools.
You can install SSH Rails Runner in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
MIT
SSH Rails Runner is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Enable Claude to query your database directly using natural language
Example
Ask 'Show me top 10 customers by revenue this month' and get SQL results instantly
Eliminate manual SQL writing for ad-hoc queries, get insights 10x faster
Generate complex reports and analytics without leaving conversation
Example
Analyze sales trends, cohort retention, user behavior patterns conversationally
Democratize data access—non-technical team members can query databases
Understand database structure, relationships, and data models
Example
'Explain the user_orders table schema and its relationships'
Onboard engineers faster, explore unfamiliar databases efficiently
Share your MCP server with the developer community
Strong directory entry: SSH Rails Runner surfaces stars and publisher context so we could sanity-check maintenance before adopting.
Strong directory entry: SSH Rails Runner surfaces stars and publisher context so we could sanity-check maintenance before adopting.
I recommend SSH Rails Runner for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
Useful MCP listing: SSH Rails Runner is the kind of server we cite when onboarding engineers to host + tool permissions.
SSH Rails Runner is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
We evaluated SSH Rails Runner against two servers with overlapping tools; this profile had the clearer scope statement.
Useful MCP listing: SSH Rails Runner is the kind of server we cite when onboarding engineers to host + tool permissions.
SSH Rails Runner is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
We evaluated SSH Rails Runner against two servers with overlapping tools; this profile had the clearer scope statement.
SSH Rails Runner reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
showing 1-10 of 42
An MCP server that enables secure remote execution of Rails console commands via SSH. This server provides tools for both read-only operations and carefully managed mutations in a deployed Rails environment.
This works great with Cursor. You can use Cursor Composer to pull in your Rails model files as context and then use the execute_read_only, dry_run_mutate, and execute_mutate tools to make changes to the database. No need to trudge through complicated Admin UI's to get your data wrangling and analysis done.

npm install
npm run build
Set the following environment variables:
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
Add to your Claude Desktop configuration:
{
"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"
}
}
}
}
If CODE_SNIPPET_FILE_DIRECTORY is not provided, snippets will be stored in a temporary directory (e.g., /tmp/mcp-ssh-rails-runner-code-snippets).
PROJECT_NAME_AS_CONTEXT is optional and helps identify the project context in tool descriptions.
The server now uses a Prepare -> Execute workflow:
mcp_ssh_rails_runner_prepare_code_snippetname (string, for filename), type (enum: "readOnly" | "mutate"), code (string, Ruby code), description (string, optional).code_snippet_<name>.json, marks it as read-only or mutate, and opens the file for review.file:// URI of the created snippet.mcp_ssh_rails_runner_execute_code_snippet_read_onlyuri (string, file:// URI from prepareCodeSnippet).readOnly, performs a safety check on the code, and executes it.mcp_ssh_rails_runner_execute_code_snippet_mutateuri (string, file:// URI from prepareCodeSnippet).mutate, and executes it directly. There is no dry run or further safety check within this tool.prepareCodeSnippet) AND EXPLICITLY CONFIRMED they want to execute the mutation.prepareCodeSnippet before executing any mutation with executeCodeSnippetMutate. The responsibility for confirming mutations lies with the user and the calling AI.MIT
Run data quality queries to catch anomalies and inconsistencies
Example
Find duplicate records, missing values, orphaned foreign keys automatically
Maintain data integrity with less manual SQL work
Prerequisites
Time Estimate
15-30 minutes including configuration and testing
Steps
Troubleshooting
✓ Do
✗ Don't
💡 Pro Tips
Architecture
MCP server acts as bridge between Claude and database, translating natural language to SQL queries and returning results in structured format.
Protocols
Compatibility
✓ Use when
Use for ad-hoc data queries, exploratory analysis, report generation, schema exploration, and democratizing data access. Best for read-heavy analytics workloads.
✗ Avoid when
Avoid for production write operations, mission-critical transactions, real-time OLTP workloads, or when database contains sensitive PII without proper access controls. Use read replicas, not primary.