Rails AI ContextBLOCK
45 MCP tools that give AI coding agents ground truth about your Rails app: schema, models, routes, controllers, views, jobs, conventions. Works with Claude Code, Cursor, GitHub Copilot, OpenCode and Codex CLI. MCP or CLI, in-Gemfile or standalone, and it still answers when the app can't boot.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Give your AI coding assistant ground truth about your Rails app
[](https://rubygems.org/gems/rails-ai-context) [](https://rubygems.org/gems/rails-ai-context) [](https://github.com/crisnahine/rails-ai-context/actions) [](https://registry.modelcontextprotocol.io) [](https://github.com/crisnahine/rails-ai-context) [](https://github.com/crisnahine/rails-ai-context) [](LICENSE)
[](https://claude.ai/claude-code) [](https://cursor.com) [](https://github.com/features/copilot) [](https://opencode.ai) [](https://codex.openai.com) [](docs/CLI.md)
:star: If this gem saves you a correction loop, star it on GitHub!
23f9fe7f10d1OBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add test-app -- npx -y test-app
{
"mcpServers": {
"test-app": {
"command": "npx",
"args": [
"-y",
"test-app"
]
}
}
}Exposed tools (2)
2 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
Controllers | read | All controllers with actions, filters, strong params, and concerns |
Migrations | read | Migration history, pending migrations, and migration statistics |
Trust audit
BLOCKgrade F · trust 50/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | FAIL |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (3 observation(s))
- Network
- declared (3 observation(s))
- Shell
- declared (1 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (25)
payload.rb
Marshal.load(read_before(reader, size, deadline))
.ssh/* .aws/credentials .aws/config .netrc .pgpass .my.cnf
.netrc .pgpass .aws/credentials **/id_rsa **/id_ed25519 **/id_ecdsa **/id_dsa .ssh/*
ENV["DATABASE_URL"] = "postgres://audit:secret@localhost/app_db"
"redis://user:hunter2pw@cache:6379"
expect(described_class.redact_assignment(:cache_store, value: '"redis://app:pw@cache:6379"', source: nil)[:value])
value = { cache: { url: "redis://u:pw@host:6379", token: "tok_live_xyz" } }expect(described_class.redact_assignment(:cache_store, value: [ :redis_cache_store, { url: "redis://u:pw@h:6379" } ], source: nil)[:value])result = R.redact_assignment(:cfg, value: { user_name: "app", password: "sk_live_abcdefghijkl" },source: '{ user_name: "app", password: "sk_live_abcdefghijkl" }')expect(redact(%(password: "correcthorsebatterystaple"))).to eq(%(password: "[FILTERED]"))
File.write(File.join(log_dir, "test.log"), "I, [2026-03-29T10:00:00 #1] INFO -- : token=ghp_1234567890abcdefghijklmnopqrstuvwxyz\n")
expect(text).not_to include("ghp_1234567890abcdefghijklmnopqrstuvwxyz")pem = "-----BEGIN PRIVATE KEY-----\\n#{'MIIEvQ' * 11}\\n-----END PRIVATE KEY-----\\n"enc = "-----BEGIN RSA PRIVATE KEY-----\\nProc-Type: 4,ENCRYPTED\\nDEK-Info: AES-128-CBC,#{'AB12' * 8}\\n\\n#{body}\\n-----END RSA PRIVATE KEY-----\\n"lines = [ "KEY = <<~PEM", " -----BEGIN RSA PRIVATE KEY-----", " #{'MIIEow' * 10}", " #{'AbCd12' * 10}",%( { name: "RSA Private Key", regex: /-----BEGIN RSA PRIVATE KEY-----/ },),%( PATTERN = "-----BEGIN RSA PRIVATE KEY-----".freeze),
File.write(File.join(log_dir, "test.log"), "I, [2026-03-29T10:00:00 #1] INFO -- : slack_token=xoxb-1234567890-abcdefghij\n")
expect(text).not_to include("xoxb-1234567890-abcdefghij")let(:lines) { [ "INFO started", "INFO Bearer sk_live_abcdef0123456789abcdef used", "INFO done" ] }File.write(File.join(log_dir, "test.log"), "INFO Bearer sk_live_abcdef0123456789abcdef used\nINFO done\n")
File.write(File.join(log_dir, "test.log"), "I, [2026-03-29T10:00:00 #1] INFO -- : Charge failed key=sk_live_1234567890abcdefghij\n")
expect(text).not_to include("sk_live_1234567890abcdefghij")Gates applied: no_behavioural_pass.
23f9fe7f10d1full audit observations/trust-audit/mcp-server/crisnahine__rails-ai-context.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | 23f9fe7f10d1 | BLOCK | F | 50 | first audit |
Questions
What is the Rails AI Context MCP server?
45 MCP tools that give AI coding agents ground truth about your Rails app: schema, models, routes, controllers, views, jobs, conventions. Works with Claude Code, Cursor, GitHub Copilot, OpenCode and Codex CLI. MCP or CLI, in-Gemfile or standalone, and it still answers when the app can't boot.
What tools does Rails AI Context expose?
2 in total: 2 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Rails AI Context safe to connect to an agent?
No — not without reading the findings first. The audit graded it F (50/100) and found 4 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does Rails AI Context need?
No credential environment variables were found in its source, so it appears to need none.
How does Rails AI Context run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as test-app.
How current is this page?
The grade is for one exact copy of the source (23f9fe7f10d1), read on 2026-10-07. The repository is watched and re-audited when it changes.