Rails Ai Context

data-ai MCP Server

38 MCP tools that give AI agents live access to your Rails schema, models, routes & conventions. Works with Claude Code, Cursor, Copilot, OpenCode, Codex CLI. Zero config.

Verified
data-aidata-ai
4 views146 stars14 forksMIT

Why This Matters

Discovered via github-topic:model-context-protocol and last synced 3mo ago.

Verified
Source
github-topic:model-context-protocol
Stars
146
Last synced
3mo ago
Install
Check source

Install

Install instructions not detected yet

Check the source repository for the latest setup steps.

View source instructions
45
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (45)

search_code

Trace: definition + source + callers + tests. Also: definition, call, class filters

get_model_details

AST-parsed associations, validations, scopes, enums, macros - each result tagged `[VERIFIED]` or `[INFERRED]`

get_stimulus

HTML data-attributes (dashes!) + targets + values + actions

security_scan

Brakeman static analysis - SQL injection, XSS, mass assignment

get_service_pattern

Interface, dependencies, side effects, callers

Column

Type

Tool

What it does

get_schema

Columns with indexed/unique/encrypted/default hints

get_view

Templates with ivars, Turbo wiring, Stimulus refs, partial locals

validate

Syntax + semantic + Brakeman security in one call

get_helper_methods

App + framework helpers with view cross-references

query

Safe read-only SQL with timeout, row limit, column redaction

get_edit_context

Method-aware code extraction with class context

get_callbacks

Callbacks in Rails execution order with source

get_partial_interface

What locals to pass + what methods are called on them

performance_check

N+1 risks, missing indexes, counter_cache, eager load candidates

get_job_pattern

Queue, retries, guard clauses, broadcasts, schedules

diagnose

One-call error diagnosis with classification + context + git + logs

email

string

get_context

Composite: schema + model + controller + routes + views in one call

get_controllers

Actions + inherited filters + render map + strong params

get_config

Database, auth framework, assets, cache, queue, Action Cable

dependency_graph

Model/service dependency graph in Mermaid or text format

session_context

Session-aware context tracking across tool calls

subscription_status

string

onboard

Narrative app walkthrough (quick/standard/full)

get_routes

Code-ready helpers (`post_path(@record)`) + required params

get_test_info

Fixtures + relationships + test template matching your patterns

get_gems

Notable gems with versions, categories, config file locations

migration_advisor

Migration code generation with reversibility + affected models

In-Gemfile

Standalone

get_concern

Concern methods + source + which models include it

get_component_catalog

ViewComponent/Phlex: props, slots, previews, sidecar assets

review_changes

PR/commit review with per-file context + warnings

generate_test

Test scaffolding matching your project's patterns

get_env

Environment variables + credentials keys (not values)

search_docs

Bundled topic index with weighted keyword search

get_frontend_stack

React/Vue/Svelte/Angular, Hotwire, TypeScript, package manager

get_conventions

Auth checks, flash messages, create action template, test patterns

runtime_info

Live DB pool, table sizes, pending migrations, cache stats, queue depth

get_turbo_map

Broadcast → subscription wiring + mismatch warnings

read_logs

Reverse file tail with level filtering and sensitive data redaction

analyze_feature

Full-stack: models + controllers + routes + services + jobs + views + tests

config

config.ai_tools = %i[claude cursor] # Which AI tools to generate for config.tool_mode = :mcp # :mcp (default) or :cli config.preset = :full # :full (39 introspectors) or :standard (17) end end ``` > **[All 40+ configuration options →](docs/CONFIGURATION.md)** <br> ## Observability Every MCP tool call fires an `ActiveSupport::Notifications` event: ```ruby ActiveSupport::Notifications.subscribe("rails_ai_context.tools.call") do

created_at

datetime