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
toolsdk-mcp-registry
A unified registry and API gateway for discovering, managing, and executing Model Context Protocol (MCP) servers, supporting local and secure sandbox execution with OAuth 2.1 integration.
action_mcp
Provides Model Context Protocol (MCP) server capabilities to Ruby on Rails applications, enabling AI assistants to interact with external data sources and tools via JSON-RPC over HTTP/SSE.
Polymcp
A comprehensive toolkit and agent framework for building Model Context Protocol (MCP) servers and orchestrating them with Large Language Models (LLMs) across Python and TypeScript environments.
mcp_rails_template
A Ruby on Rails application template demonstrating the integration and usage of the ActionMCP gem, providing various AI components like prompts, resource templates, and tools for LLMs.