MA

maquina-app/rails-mcp-server

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

574 stars 36 forks 품질 86 트렌드 41MIT

Rails 프로젝트를 위한 모델 컨텍스트 프로토콜(MCP) 서버의 루비 보석 구현체입니다. 이 서버는 LLM(대형 언어 모델)이 모델 컨텍스트...

개요

Rails 프로젝트를 위한 모델 컨텍스트 프로토콜(MCP) 서버의 Ruby 구현체입니다. 이 서버는 LLM(대형 언어 모델)이 모델 컨텍스트 프로토콜을 통해 Rails 프로젝트와 상호작용할 수 있게 하여 코드 분석, 탐색 및 개발 지원을 제공합니다. 모델 컨텍스트 프로토콜(MCP)은 AI 모델이 환경과 상호작용할 수 있는 표준화된 방법입니다. 이 프로토콜은 모델이 도구를 요청하고 사용하며, 자원에 접근하고, 상호작용 중 맥락을 유지할 수 있는 구조화된 방법을 정의합니다. 이 Rails MCP 서버는 MCP 명세를 구현하여 AI 모델이 코드 분석, 탐색 및 지원을 위해 Rails 프로젝트에 접근할 수 있도록 합니다.

개요(AI 번역)

Rails 프로젝트를 위한 모델 컨텍스트 프로토콜(MCP) 서버의 Ruby 구현체입니다. 이 서버는 LLM(대형 언어 모델)이 모델 컨텍스트 프로토콜을 통해 Rails 프로젝트와 상호작용할 수 있게 하여 코드 분석, 탐색 및 개발 지원을 제공합니다.

MCP란 무엇인가?

모델 컨텍스트 프로토콜(MCP)은 AI 모델이 환경과 상호작용할 수 있는 표준화된 방법입니다. 이 프로토콜은 모델이 도구를 요청하고 사용하며, 자원에 접근하고, 상호작용 중 맥락을 유지할 수 있는 구조화된 방법을 정의합니다.

이 Rails MCP 서버는 MCP 명세를 구현하여 AI 모델이 코드 분석, 탐색 및 지원을 위해 Rails 프로젝트에 접근할 수 있도록 합니다.

특징

  • 여러 Rails 프로젝트 관리
  • 프로젝트 파일 및 구조물 탐색
  • 필터링 옵션이 포함된 레일 노선 보기
  • 모델 정보 및 관계 검사 (프리즘 정적 분석 포함)
  • 데이터베이스 스키마 정보 얻기
  • 컨트롤러-뷰 관계 분석
  • 환경 구성 분석
  • Rails, Turbo, Stimulus, Kamal에 대한 포괄적인 문서 접근
  • 점진적 도구 발견을 통한 컨텍스트 효율적인 아키텍처
  • LLM 클라이언트와의 원활한 통합

설치

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Rails MCP Server

A Ruby 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, providing capabilities for code analysis, exploration, and development assistance.

What is MCP?

The Model Context Protocol (MCP) is a standardized way for AI models to interact with their environment. It defines a structured method for models to request and use tools, access resources, and maintain context during interactions.

This Rails MCP Server implements the MCP specification to give AI models access to Rails projects for code analysis, exploration, and assistance.

Features

  • Manage multiple Rails projects
  • Browse project files and structures
  • View Rails routes with filtering options
  • Inspect model information and relationships (with Prism static analysis)
  • Get database schema information
  • Analyze controller-view relationships
  • Analyze environment configurations
  • Access comprehensive Rails, Turbo, Stimulus, and Kamal documentation
  • Context-efficient architecture with progressive tool discovery
  • Seamless integration with LLM clients

Installation

Install the gem:

gem install rails-mcp-server

After installation, the following executables will be available in your PATH:

  • rails-mcp-server - The MCP server itself
  • rails-mcp-config - Interactive configuration tool (recommended)
  • rails-mcp-setup-claude - Legacy Claude Desktop setup script
  • rails-mcp-server-download-resources - Legacy resource download script

Configuration

The easiest way to configure the Rails MCP Server is using the interactive configuration tool:

rails-mcp-config

This provides a user-friendly TUI (Terminal User Interface) for:

  • Managing Projects: Add, edit, remove, and validate Rails projects
  • Downloading Guides: Download Rails, Turbo, Stimulus, and Kamal documentation
  • Importing Custom Guides: Add your own markdown documentation
  • Claude Desktop Integration: Automatically configure Claude Desktop

The tool uses Gum for an enhanced experience if installed, but works with a basic terminal fallback.

# Install Gum for best experience (optional)
brew install gum        # macOS
sudo apt install gum    # Debian/Ubuntu
yay -S gum              # Arch Linux

Manual Configuration

The Rails MCP Server follows the XDG Base Directory Specification for configuration files:

  • On macOS: $XDG_CONFIG_HOME/rails-mcp or ~/.config/rails-mcp if XDG_CONFIG_HOME is not set
  • On Windows: %APPDATA%\rails-mcp

The server will automatically create these directories and an empty projects.yml file the first time it runs.

To configure your projects manually:

  1. Edit the projects.yml file in your config directory to include your Rails projects:
store: "~/projects/store"
GitHub에서 전체 README 보기

설치

npx mcp-remote http://localhost:6029/mcp/sse
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "railsMcpServer": { "command": "ruby", "args": ["/full/path/to/rails-mcp-server/exe/rails-mcp-server"] } } }