# Rails AI Context

Lets your coding agent read the real schema, models and routes of a Rails app instead of guessing them from training data.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 164
- Author: crisnahine
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/crisnahine/rails-ai-context
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/rails-ai-context

## What it does

Rails AI Context installs as a development gem and runs an MCP server with 35 read-only tools. Your assistant asks the app about its schema, associations, routes and conventions rather than inventing them. It also writes context files for Claude, Cursor, GitHub Copilot, OpenCode and Codex CLI, and the same tools can be called from the command line.

You need Ruby 3.1+ and Rails 7.0+. The install goes through `bundle add rails-ai-context --group development`, then the `rails_ai_context:install` generator wires up the tool you picked. If the app cannot boot, `rails-ai-context init` reads the source files instead. Check the result with `bundle exec rails-ai-context tool onboard` — it should describe your app.

The generator prints one step you still have to do yourself. Skip it and the MCP tools never show up in your editor. Other setups cover no Gemfile change, CLI only, MCP only, a whole team, and several apps in one folder.

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- read the database schema without hand-writing it into the agent context
- trace routes and associations in an unfamiliar Rails codebase
- wire one MCP server for several AI tools in the same repo
- hand the assistant project conventions instead of generic guesses
- get context from an app that will not boot in the console

## Example prompts
- Install rails-ai-context and set it up for Claude
- Show me the users table schema through rails-ai-context
- Run tool onboard and check that rails-ai-context sees this app

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
