Rails-AI-Context Gem Provides Claude Code with Complete Rails App Model via MCP

What This Is
The rails-ai-context gem addresses Claude Code's limitations with Rails applications by automatically introspecting the entire app and exposing its structure through Model Context Protocol (MCP). This gives Claude Code a complete mental model of the Rails app without manual configuration.
Key Details
The gem solves specific problems where Claude Code "guesses a lot" with Rails: reading thousands of lines in schema.rb to find one column, missing encrypted columns, not knowing Stimulus wiring, and inventing UI patterns instead of matching existing ones.
Setup requires adding to the Gemfile:
gem "rails-ai-context", group: :developmentAnd running the generator:
rails generate rails_ai_context:installClaude Code automatically discovers the MCP server through a .mcp.json file with zero manual setup.
The gem provides 39 tools that Claude can call directly, including:
rails_get_schema(table: "users")rails_search_code(pattern: "can_cook?", match_type: "trace")rails_validate(files: ["app/models/user.rb"])rails_analyze_feature(feature: "billing")rails_get_stimulus()rails_get_turbo_map()
Instead of reading every file, Claude can query exactly what it needs: schema with encrypted and nullable hints, model associations and scopes, route maps, Stimulus controller-to-HTML wiring, Turbo broadcast-to-subscription mapping, and actual design system patterns.
The gem also generates a CLAUDE.md file and .claude/rules/ per-tool split files so Claude has context even without MCP.
There's a CLI fallback where the same 39 tools work as rails 'ai:tool[schema]' for any workflow.
The project is MIT licensed and requires Ruby 3.2+ and Rails 7.1+.
Who It's For
Rails developers using Claude Code who want more accurate, context-aware assistance without manual file reading or configuration.
📖 Read the full source: r/ClaudeAI
👀 See Also

Piast Gate: Open-Source API Proxy for LLM Data Anonymization
Piast Gate is an open-source API proxy that anonymizes sensitive data before sending requests to LLMs and restores original data in responses. The current MVP supports Google Gemini API, Polish language, local execution, and can anonymize text or Word documents without LLM processing.

Termrender: 6x Token-Efficient ASCII UI Visualization for Claude
Termrender is an open-source Python tool that generates ASCII UI visualizations with 6x token efficiency compared to raw Claude output. It produces diagrams and panels using minimal tokens for faster generation and editing.

Quick-Question Plugin Automates Unity Development with Claude Code
A developer has released quick-question, a macOS plugin for Unity 2021.3+ that automates compilation, testing, and cross-model code review when using Claude Code. The tool includes 20 slash commands and uses a 'Tribunal' pattern where Codex and Claude review each other's findings.

Gemma-4 26B-A4B with Opencode Runs Efficiently on M5 MacBook Air
A 32GB M5 MacBook Air can run the Gemma-4-26B-A4B-it-UD-IQ4_XS model at 300 tokens/second prompt processing and 12 tokens/second generation in low power mode, using only 8W of power without getting warm or noisy.