rails_mcp_engine
by sh1nj1
Overview
A Rails engine for building and managing LLM tools, unifying Sorbet-typed service classes into both RubyLLM and FastMCP tool definitions.
Installation
bundle exec rails server -p 4000Environment Variables
- OPENAI_API_KEY
- GEMINI_API_KEY
- GOOGLE_API_KEY
- ANTHROPIC_API_KEY
- RAILS_ENV
- DEFAULT_DOMAIN
Security Notes
CRITICAL: The application uses `Object.class_eval` to execute arbitrary Ruby code provided by the user in the playground (e.g., for registering new tools dynamically). This is explicitly noted in the README as a feature for trusted sources, but it presents a severe code execution vulnerability if exposed to untrusted input. Additionally, the FastMCP server is configured with `localhost_only: false`, allowing remote connections to the MCP endpoint, which could expose the `eval`-capable tools to network access.
Similar Servers
rails-mcp-server
Enables Large Language Models (LLMs) to interact with Rails projects for code analysis, exploration, and development assistance using the Model Context Protocol.
toolsdk-mcp-registry
An API-driven registry for Model Context Protocol (MCP) servers, enabling discovery, detail retrieval, and execution of various AI tools and agents.
Polymcp
A comprehensive TypeScript framework for building and orchestrating Model Context Protocol (MCP) servers and AI agents, enabling LLMs to intelligently discover, select, and execute external tools.
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.