A Rails-aware codebase indexer running as an MCP server. It builds a complete relationship graph of your application, giving AI agents deep structural understanding without blowing up your token budget.
npx @reinteractive/rails-insight
RailsInsight is currently in open beta. If you encounter any edge cases or bugs, please raise an issue on GitHub and our team will resolve it promptly.
Easily connect with your AI Agents
Connect any MCP-compatible client to your Rails application. The server automatically uses the workspace directory as the project root.
Runs locally over stdio. No API keys, no cloud syncing.
Automatically parses CLAUDE.md for declared
conventions.
{
"servers": {
"railsinsight": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@reinteractive/rails-insight"]
}
}
}
Generic AI coding tools treat your Ruby files as plain, disconnected text. They waste token limits reading things they don't understand, missing the underlying architecture.
Because Rails relies on strict, predictable conventions, RailsInsight instantly maps your entire application into a complete relationship graph. It inherently knows that a route maps to a controller, which calls a model, which reads from a database table—connecting the dots for your AI agent before it even asks.
When an AI agent modifies a core model, does it know which background jobs, mailers, or API endpoints it just broke? Usually not, unless it consumes your entire codebase budget in one go.
The Blast Radius tool leverages the relationship graph to calculate the exact structural impact of any file change. It returns a risk-ranked list of dependent files, enabling your agent to proactively review downstream effects and prevent regressions.
get_blast_radius
Generic tools treat Ruby files as plain text. RailsInsight understands conventions, building a directed graph of your entire architecture.
Pure path-based analysis classifies every file instantly. From Models and Controllers to Solid Queue Jobs, ActionCable, and Feature Flags—with zero file reads.
19 specialized extractors parse file content to map out
has_many :through,
before_action filters, Devise modules, Pundit
policies, and schema structures.
Exposes your app through precise MCP tools. Your agent gets the exact architectural context it needs (e.g. blast radius) without consuming your entire context window.
RailsInsight completes its full index—scanning, classifying, extracting, and building the relationship graph—in under 5 seconds, even for large production Rails apps. Your AI agent starts with full structural context from the very first request, with zero warm-up wait.
Everything an AI agent needs to navigate your application safely.
Returns Rails/Ruby versions, database, auth strategy, key models, controllers, frontend stack, and file counts. Call this first.
Pulls associations, validations, scopes with queries, enums, callbacks, public methods, and database columns for a specific model.
Analyzes the impact of code changes. Returns impacted entities classified by risk level (CRITICAL/HIGH/MEDIUM/LOW) via the relationship graph.
Prioritized list of files needing test coverage, with structural context and per-method coverage data from SimpleCov.
Extracts database schema with tables, columns, indexes, foreign keys, and complete model-to-table mapping.
RailsInsight is open source and runs entirely locally. Install it globally or run via npx directly in your Rails root.
npx @reinteractive/rails-insight
Have a question, need Rails expertise, or want to discuss how RailsInsight fits your team? We'd love to hear from you.
inquiries@reinteractive.com