Rails AI Context MCP Server

Auto-expose Rails app structure to AI via MCP. Zero config, 11 read-only tools.

Local serverstdioTypeScript

What is the Rails AI Context MCP server?

Most developer tooling work still happens through a UI a human drives. Rails AI Context MCP server moves it into the conversation instead. Auto-expose Rails app structure to AI via MCP. Zero config, 11 read-only tools.

The short version

You catch it. You fix it. You re-prompt. It breaks something else.

Built by a Rails developer with 10+ years of production experience.

The tools it exposes

The server publishes 14 tools. What each one is for:

  • search_code — Trace: definition + source + callers + tests. Also: definition, call, class filters
  • get_edit_context — Method-aware code extraction with class context
  • analyze_feature — Full-stack: models + controllers + routes + services + jobs + views + tests
  • get_context — Composite: schema + model + controller + routes + views in one call
  • onboard — Narrative app walkthrough (quick/standard/full)
  • get_schema — Columns with indexed/unique/encrypted/default hints
  • get_model_details — AST-parsed associations, validations, scopes, enums, macros - each result tagged [VERIFIED] or [INFERRED]
  • get_callbacks — Callbacks in Rails execution order with source
  • get_concern — Concern methods + source + which models include it
  • get_controllers — Actions + inherited filters + render map + strong params
  • get_routes — Code-ready helpers (post_path(@record)) + required params
  • get_view — Templates with ivars, Turbo wiring, Stimulus refs, partial locals

Getting it running

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

What it needs from you

  • Ruby >= 3.1    Rails >= 7.0 - Optional: brakeman for security scanning, listen for watch mode, ripgrep for fast search ---

How it compares

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Rails AI Context's toolset — search_code, get_edit_context, analyze_feature and 11 more — is a fair guide to whether it matches your workflow. It is maintained by crisnahine; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Rails AI Context.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
search_codeTrace: definition + source + callers + tests. Also: definition, call, class filters
get_edit_contextMethod-aware code extraction with class context
analyze_featureFull-stack: models + controllers + routes + services + jobs + views + tests
get_contextComposite: schema + model + controller + routes + views in one call
onboardNarrative app walkthrough (quick/standard/full)
get_schemaColumns with indexed/unique/encrypted/default hints
get_model_detailsAST-parsed associations, validations, scopes, enums, macros - each result tagged [VERIFIED] or [INFERRED]
get_callbacksCallbacks in Rails execution order with source
get_concernConcern methods + source + which models include it
get_controllersActions + inherited filters + render map + strong params
get_routesCode-ready helpers (post_path(@record)) + required params
get_viewTemplates with ivars, Turbo wiring, Stimulus refs, partial locals
get_stimulusHTML data-attributes (dashes!) + targets + values + actions
get_partial_interfaceWhat locals to pass + what methods are called on them

Configuration

  • Ruby >= 3.1    Rails >= 7.0 - Optional: brakeman for security scanning, listen for watch mode, ripgrep for fast search ---

Example prompts to try

  • Use Rails AI Context to search code.
  • Use Rails AI Context to get edit context.
  • Use Rails AI Context to analyze feature.

Frequently asked questions

It connects Rails AI Context to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (search_code, get_edit_context, analyze_feature, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Rails AI Context directly.