rails-common
메타프로그래밍 기반 동적 Tool 관리 MCP 서버
claude mcp add --transport stdio duddn2012-rails-common-mcp-server ruby server.rb \ --env MCP_PORT="default or specify if server binds to port" \ --env RAILS_ENV="development"
How to use
rails-common is a metaprogramming-driven MCP server designed to manage dynamic tools and commands at runtime for an MCP (Model Context Protocol) environment. It leverages Ruby's metaprogramming capabilities to discover, load, and orchestrate tool integrations, enabling other MCP clients to query available tools, execute them, and reflect their capabilities. The server exposes a lightweight interface for tool registration and invocation, supporting runtime extension without redeploying the entire server. To use it, run the server process and connect via your MCP client to discover the tool catalog and invoke tools using the provided tool identifiers. The server is designed to be flexible: tools can be added by placing Ruby modules or scripts in the expected load paths, and can be discovered through a dynamic registry created at startup or runtime.
How to install
Prerequisites:\n- Ruby (2.7+ recommended) and Bundler\n- Access to the repository (git)\n\nStep-by-step:\n1) Install Ruby and Bundler:\n - macOS: brew install ruby && gem install bundler\n - Ubuntu/Debian: sudo apt-get update && sudo apt-get install ruby-full build-essential zlib1g-dev && gem install bundler\n2) Clone the repository:\n git clone https://github.com/your-org/rails-common-mcp-server.git\n cd rails-common-mcp-server\n3) Install dependencies (if any are defined in Gemfile):\n bundle install\n4) Run the server:\n ruby server.rb\n5) Verify the server is listening (default port or as configured):\n curl http://localhost:<port>/health or similar health-check endpoint\n\nNotes:\n- If the server expects a different entrypoint (e.g., bin/rails or a different script name), adjust the command accordingly.\n- Ensure environment variables (like MCP_PORT or RAILS_ENV) are set as needed for your environment.
Additional notes
Tips:\n- Use the MCP_PORT environment variable to customize the listening port if the server exposes a configurable port.\n- Tools can be registered at runtime by loading Ruby modules or scripts into the load path; follow your project’s conventions for tool registration.\n- If you encounter issues with dynamic tool loading, ensure file permissions and Ruby load paths are correctly configured.\nCommon issues:\n- Ruby version mismatch: ensure you are running a compatible Ruby version for the server.\n- Bundler dependencies: run bundle install after pulling updates.\n- Environment-specific behavior: set RAILS_ENV or equivalent to align with development, staging, or production as needed.
Related MCP Servers
fast
A Ruby Implementation of the Model Context Protocol
rails
A Ruby gem implementation of a Model Context Protocol (MCP) server for Rails projects. This server allows LLMs (Large Language Models) to interact with Rails projects through the Model Context Protocol.
mcp-rb
A lightweight Ruby framework for building MCP servers with a Sinatra-like DSL
sketchup
Sketchup Model Context Protocol
rails-pg-extras
MCP (Model Context Protocol) LLM interface for rails-pg-extras gem
nvim
A Ruby implementation of the MCP server protocol for Neovim