rails-mcp-server
Verified Safeby maquina-app
Overview
Enables Large Language Models (LLMs) to interact with Rails projects for code analysis, exploration, and development assistance using the Model Context Protocol.
Installation
rails-mcp-serverEnvironment Variables
- RAILS_MCP_PROJECT_PATH
- XDG_CONFIG_HOME
Security Notes
The server implements robust security measures including a strong sandboxing mechanism for `execute_ruby` with static code analysis (forbidden patterns) and runtime method overrides (blocking file writes, system calls, network access). Path validation prevents directory traversal, and sensitive file patterns (e.g., .env, master.key, SSH keys) are explicitly blocked. Input validation using strict regex for model/table names helps prevent injection attacks. The `RunProcess` uses `Shellwords.escape` for paths and constructs internal commands carefully to mitigate shell injection.
Similar Servers
boost
Accelerates AI-assisted development by providing essential context and structure for generating high-quality, Laravel-specific code via an MCP server.
action_mcp
ActionMCP is a Ruby gem providing Model Context Protocol (MCP) server capabilities to Rails applications, enabling AI assistants to connect to external data sources and tools.
mcp_rails_template
This server demonstrates integrating the ActionMCP gem into a Ruby on Rails application to expose AI-callable tools, prompts, and resource templates for language models.
octomind
Session-first AI development assistant with built-in Model Context Protocol (MCP) tools and multi-provider LLM support for interactive coding, file management, and web research.