← Back to directory
R

Rails AI Context

Community
Let AI coding agents query your Rails app's real structure.
Category
Dev Tools #11 of 751
Stars
★ 192 Very popular
Transport
stdio (local process)
Runtime
Prebuilt binary 3.1+
Credentials
No credential needed
License
MIT
Last commit
Tools
35
66FMRS · C

The supplied material describes 35 read-only tools, MCP over stdio and CLI usage, static analysis, and security limits. The repository description says it can answer when the app cannot boot, while the README specifies that only 32 introspectors answer in static mode and runtime-only tools are unavailable.

Strongest · Documentation 17/20 Weakest · Reliability 9/20

Reliability
9/20
Security and permissions
16/20
Maintenance
11/20
Documentation
17/20
Setup experience
13/20
Why each score
Reliability 9/20
The README describes 35 read-only tools, MCP over stdio/HTTP, a CLI, static mode, and error boundaries. The supplied material contains no CI workflow or committed tests verifying startup, handshake, tool-list behavior, or failure handling, so the static-calibration cap applies; the manifest's MCP package also cannot be confirmed usable from this evidence.
Security and permissions 16/20
The documentation describes read-only tools, SQL in a read-only transaction with time and row limits, sensitive-file and log redaction, disclosed network behavior, and an HTTP restriction by default. These are useful stated boundaries. I deducted points because implementation evidence is absent and production HTTP can be enabled without built-in authentication. No red-line evidence appears in the supplied material.
Maintenance 11/20
An MIT license and a security contact path are stated, and the README says security fixes target the latest 5.x release. The supplied unarchived status and one open issue do not establish maintenance cadence. There is no commit, release, dependency-update, or issue-response history here, so ongoing maintenance and release governance remain only partly evidenced.
Documentation 17/20
The README provides multiple install paths, tool categories and examples, configuration guidance, limitations, troubleshooting, security notes, and compatibility claims. It discloses limits such as unavailable runtime-only data in static mode and the SQLite-on-Windows query timeout exception. I deducted points because the actual per-tool parameter reference and implementation evidence were not supplied, leaving some capability and security claims unverified.
Setup experience 13/20
The documentation gives Gemfile and standalone installation paths, setup guidance for mainstream clients, approval steps, runtime requirements, and stated Linux/macOS/Windows support. The static review has no verifiable CI or committed tests covering key installation and handshake paths, and clients still require manual trust or approval, so setup does not receive full marks.

Static review · not runReviewed 2026-11-29

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesUses the networkConnects to a database

Best for

  • Developers and teams who want AI coding agents to understand their actual Rails app structure.
  • Ruby on Rails projects that need read-only app context through MCP or CLI.

Not for

  • Users who need tools to modify application code or the database directly.
  • Teams that require tool calls to automatically enforce verification rules on the AI assistant.
  • Rails 9 projects; the supplied material says Rails 9 is unsupported.

Required permissions

  • Tools run locally and can read project source, schema, routes, and related information in the app process or a child process.
  • The query tool permits restricted read-only SQL operations in a read-only transaction and requires database availability.
  • Installation writes MCP configuration, context files, rules files, configuration, and .gitignore entries to the repository.

Risks and side effects

  • Some runtime information is unavailable in static mode; answers mark the static tier or unavailable content.
  • Read-only tools do not change code or the database, but an AI assistant may still act on their answers; the rules do not enforce its behavior.
  • The HTTP server rejects requests outside development and test by default; if production access is enabled, the endpoint has no authentication of its own.
  • Calling search_docs with fetch enabled retrieves Rails guides from GitHub.

Setup

Before you start

Runtime:Prebuilt binary 3.1+

Other optional settings (1)
RAILS_AI_CONTEXT_NO_UPDATE_CHECK optional Set to 1 to disable the standalone CLI's daily RubyGems latest-version check. No credential is needed.

Requires Ruby 3.1 or newer and Rails 7.0 through 8.1. Add rails-ai-context to the Gemfile and run bin/rails generate rails_ai_context:install --tools claude --defaults, or install the gem standalone and run rails-ai-context init --tools claude --defaults. After setup, trust or enable the project MCP server in the AI client and start a new session. The CLI can also be used without an MCP server.

Check that it works

Confirm the rails-ai-context tools appear in your client's MCP tool list. Then ask “What columns does the users table have?” and check that the server returns the app's schema.

Troubleshooting

  1. Check that Ruby and Rails versions meet the requirements and complete installation from the app directory.
  2. Trust or enable the project MCP server in the client, then restart or start a new session and check the server list.
  3. Run `bundle exec rails-ai-context doctor` to check installation and client configuration; the command requires the app to boot.
  4. If the app cannot boot, use `--no-boot` or CLI static mode and check answers for STATIC and UNAVAILABLE markers.

Things to try

Once connected, you can ask your AI assistant things like:

  • What columns and indexes does the users table have?
  • What associations, validations, and callbacks does the Article model define?
  • Trace the definition and callers of publishable?.
  • What actions and inherited filters does Admin::ArticlesController have?

Tools 35

search_code read-only
Search code; trace mode shows a method definition, callers, and test references.
get_edit_context read-only
Get app context relevant to an editing target.
analyze_feature read-only
Analyze a feature and its related code in the app.
get_context read-only
Get application context.
onboard read-only
Summarize the app's structure and configuration.
get_schema read-only
Read database tables, columns, indexes, and associated models.
get_model_details read-only
Read model associations, validations, scopes, enums, and callbacks.
get_callbacks read-only
Read callback information.
Show 27 more tools
get_concern read-only
Read a concern and its related methods.
get_controllers read-only
Read controller actions, inherited filters, and strong parameters.
get_routes read-only
Read application routes.
get_view read-only
Read view information.
get_stimulus read-only
Read Stimulus frontend information.
get_partial_interface read-only
Read a partial's interface information.
get_turbo_map read-only
Read the Turbo map.
get_test_info read-only
Read test framework and setup information.
generate_test read-only
Generate test content using application context.
validate read-only
Validate application-related information.
security_scan read-only
Run a security scan; Brakeman is an optional dependency.
performance_check read-only
Check for performance-related issues.
get_config read-only
Read app configuration, dependencies, and conventions.
get_helper_methods read-only
Read helper methods.
get_service_pattern read-only
Read service pattern information.
get_job_pattern read-only
Read job pattern information.
get_component_catalog read-only
Read the component catalog.
get_mailers read-only
Read mailer information.
dependency_graph read-only
Read dependency graph information.
migration_advisor read-only
Provide migration-related analysis.
search_docs read-only
Search Rails documentation; when fetch is enabled, it retrieves guides from GitHub.
query read-only
Run restricted, read-only SQL queries.
read_logs read-only
Read logs; output is redacted.
diagnose read-only
Diagnose application status.
review_changes read-only
Review code changes.
runtime_info read-only
Read runtime information.
session_context read-only
Read session context.

Use cases

Check app tables, columns, indexes, and model associations instead of relying on generic Rails conventions.
Inspect controller actions and inherited filters, or trace a method's definition, callers, and tests.
When the app cannot boot, retrieve available static information from route files, schema dumps, and source.

Supported clients

Claude Code
Cursor
GitHub Copilot
OpenCode
Codex
Claude DesktopPartial support
WindsurfPartial support
ZedPartial support
JetBrains IDEsPartial support

Listed from the project's documentation, not tested by this site.

Overview

Rails AI Context is a Ruby gem offering 35 read-only MCP tools and CLI commands to help coding agents understand an app's schema, models, routes, controllers, views, test setup, and conventions. It supports MCP over stdio and can also be used through the CLI. When an app cannot boot, some tools can fall back to static analysis and mark runtime data that is unavailable from static sources.

Similar servers

Source revision c3578a64739a Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/rails-ai-context.svg)](https://followmcp.com/en/servers/rails-ai-context)