Skip to main content
MCP server CX Codex

Rails AI Context — Claude Code MCP server: 35 Rails tools

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

Open on GitHub

What Rails AI Context 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.

What it helps with

  • 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 for the agent

  • 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

How to install Rails AI Context

Install

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

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Rails AI Context

How do I install Rails AI Context in Claude Code?

Run bundle add rails-ai-context --group development, then bundle exec rails generate rails_ai_context:install --tools claude --defaults. Finish with bundle exec rails-ai-context tool onboard and complete the step the installer printed — without it the MCP tools will not appear.

What does Rails AI Context do?

It runs an MCP server with 35 read-only tools that give your agent the schema, models, routes and conventions of your Rails app. It also writes context files for Claude, Cursor, GitHub Copilot, OpenCode and Codex CLI.

What do I need to run Rails AI Context?

Ruby 3.1+ and Rails 7.0+. If the app fails to load, use bundle exec rails-ai-context init --tools claude --defaults, which reads the source files directly.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor