# rails-ai-context

> Auto-introspect your Rails app and expose it to AI assistants. 38 tools, zero config, works with Claude, Cursor, Copilot, and any MCP client.

- **URL**: https://www.freshcrate.ai/projects/rails-ai-context
- **Author**: crisnahine
- **Category**: MCP Servers
- **Latest version**: `v5.11.1` (2026-05-24)
- **License**: MIT
- **Source**: https://github.com/crisnahine/rails-ai-context
- **Homepage**: https://rubygems.org/gems/rails-ai-context
- **Language**: Ruby
- **GitHub**: 125 stars, 11 forks
- **Registry**: github
- **Tags**: `ai`, `ai-coding`, `claude`, `copilot`, `cursor`, `developer-tools`, `introspection`, `llm`, `mcp`, `ruby`

## Description

Auto-introspect your Rails app and expose it to AI assistants. 38 tools, zero config, works with Claude, Cursor, Copilot, and any MCP client.

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v5.11.1` | 2026-05-24 | High | ### Fixed  - E2E MCP HTTP protocol spec sends `initialize` once per session instead of per-test, fixing compatibility with newer `mcp` gem versions that reject duplicate initialization. |
| `v5.10.0` | 2026-04-20 | High | ### Added — 8 new introspectors closing RAILS_NERVOUS_SYSTEM.md gaps  An audit against [`RAILS_NERVOUS_SYSTEM.md`](RAILS_NERVOUS_SYSTEM.md) identified 9 framework sections where introspection was missing or partial. This release ships the 8 introspectors needed to close them (the 9th — §11 Query interface — was already covered by `:conventions` via `load_async` / `.async_*` scanning). All are wired into `PRESETS[:full]`. The gem now exposes **39 introspectors** (up from 31).  - **`InitializerIn |
| `v5.9.1` | 2026-04-20 | High | ### Fixed — `GetConcern` missed plural concern names (#78)  Thanks to [@johan--](https://github.com/johan--) for the report and fix.  `rails_get_concern`'s includer search built its include-pattern regex via `String#classify`, which singularizes its input. Concerns with intentionally plural module names — `WorksheetImports`, `PaperTrailEvents`, `SoftDeletables`, etc. — got demodulized to `WorksheetImport` and the `include WorksheetImports` line in the model never matched. The tool reported no i |
| `v5.9.0` | 2026-04-16 | High | ### Fixed — Cursor chat agent didn't detect rules  Real user report during release QA: the Cursor IDE's chat agent didn't pick up rules written only as `.cursor/rules/*.mdc`, even when the rule declared `alwaysApply: true`. Cursor has **two** rule systems and the chat-agent composition path still consults the legacy `.cursorrules` file in many current builds.  `CursorRulesSerializer` now writes **both**: `.cursor/rules/*.mdc` (newer format with frontmatter / glob scoping / agent-requested trigg |
| `v5.8.1` | 2026-04-15 | High | ### Fixed — Security Hardening  Four exploitable vulnerabilities across `rails_query`, the VFS URI dispatcher, and the instrumentation bridge, plus six defense-in-depth hardening issues. All discovered by security and deep code-review passes conducted during v5.8.1 pre-release verification. None were known at the v5.8.0 release — **users should upgrade immediately**.  - **SQL column-aliasing redaction bypass (exploitable).** Post-execution redaction in `rails_query` operated on `result.columns` |
| `v5.8.0` | 2026-04-14 | High | ### Added — Modern Rails Coverage Pass  Five targeted gaps in modern Rails introspection, identified by an audit of the introspectors against current Rails 7/8 patterns. Net result: the gem now surfaces what AI agents need to know about Rails 8 built-in auth, Solid Errors, async query usage, strong_migrations safety, and Action Cable channel detail.  - **Rails 8 built-in auth depth.** `auth_introspector#detect_authentication` previously detected `bin/rails generate authentication` only as a boo |
| `v5.7.1` | 2026-04-09 | High | ### Changed — SLOP Cleanup  Internal code quality improvements — no API changes, no new features.  - **Extract `safe_read`, `max_file_size`, `sensitive_file?` to BaseTool** — removed 16 duplicate one-liner methods across 8 tool files (get_env, get_job_pattern, get_service_pattern, get_turbo_map, get_partial_interface, get_view, get_edit_context, get_model_details, search_code) - **Extract `FullSerializerBehavior` module** — deduplicated identical `footer` and `architecture_summary` methods from |
| `v5.7.0` | 2026-04-09 | Medium | ### Quickstart — Two commands. Problem gone.  ```bash gem "rails-ai-context", group: :development rails generate rails_ai_context:install ```  ### Fixed — Bug Fixes from Codebase Audit  6 bug fixes discovered via automated codebase audit (bug-finder, code-reviewer, doc-consistency-checker agents).  - **AnalyzeFeature service/mailer method extraction** (HIGH) — `\A` (start-of-string) anchor in `scan` regex replaced with `^` (start-of-line). Services and mailers now correctly list all methods ins |
| `v5.6.0` | 2026-04-09 | High | ### Added — Auto-Registration, TestHelper & Bug Fixes  Developer experience improvements inspired by action_mcp patterns, plus 5 security/correctness bug fixes.  - **Auto-registration via `inherited` hook** — Tools are now auto-discovered from `BaseTool` subclasses. No manual list to maintain — drop a file in `tools/` and it's registered. `Server.builtin_tools` is the new public API. Thread-safe via `@registry_mutex` with deadlock-free design (const_get runs outside mutex to avoid recursive loc |
| `v5.4.0` | 2026-04-07 | Medium | ### Added — Phase 3: Dynamic VFS & Live Resource Architecture (Ground Truth Engine Blueprint #39)  Live Virtual File System replaces static resource handling. Every MCP resource is introspected fresh on every request — zero stale data.  - **VFS URI Dispatcher** (`lib/rails_ai_context/vfs.rb`) — Pattern-matched routing for `rails-ai-context://` URIs. Resolves models, controllers, controller actions, views, and routes. Each call introspects fresh. Path traversal protection for view reads.  - **4 |

## Citation

- HTML: https://www.freshcrate.ai/projects/rails-ai-context
- Markdown: https://www.freshcrate.ai/projects/rails-ai-context.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/rails-ai-context/deps

_Generated by freshcrate.ai. Indexes github releases for AI-agent ecosystem packages._
