Your AI assistant is blind to your data. Here's how to fix…
    Neura MarketNeura Market/DeepSeek
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityTrending
    DeepSeekBlogYour AI assistant is blind to your data. Here's how to fix that.
    Back to Blog
    Your AI assistant is blind to your data. Here's how to fix that.
    rails

    Your AI assistant is blind to your data. Here's how to fix that.

    Paulo Ancheta May 24, 2026
    0 views

    Most MCP setups hand your AI a database URL and hope for the best. activerecord-mcp mounts an MCP server inside your existing Rails app. No new process, no raw SQL, no credentials floating around. Your AI can query your data. Your denied columns stay denied.


    title: Your AI assistant is blind to your data. Here's how to fix that. published: true description: Most MCP setups hand your AI a database URL and hope for the best. activerecord-mcp mounts an MCP server inside your existing Rails app. No new process, no raw SQL, no credentials floating around. Your AI can query your data. Your denied columns stay denied. tags: rails, ruby, ai, mcp

    cover_image: https://direct_url_to_image.jpg

    Use a ratio of 100:42 for best results.

    published_at: 2026-05-24 00:47 +0000


    AI has become a normal part of how we write software. It reads code, suggests fixes, and explains things faster than most Stack Overflow answers. But there's something it still can't do on its own: look at your actual data.

    That turns out to be a bigger problem than it sounds.

    The bug assistant that can actually investigate

    You get a Sentry alert. You paste the stack trace into Claude. The error, the params, the line numbers. It reads everything and takes a guess at what went wrong.

    The problem is it's just that. A guess. It doesn't know what the user record looked like. It doesn't know what state the associated objects were in. It doesn't know if this is a one-off or whether a whole segment of users ends up here consistently.

    So you become its hands. Run the queries, paste the results back, run a few more. It's not the worst workflow, but the AI is doing half the job it could be doing.

    With an MCP server wired into your Rails app, it can investigate on its own. It describes your models, pulls the relevant records, and comes back with something like: "Users hitting this error all have onboarding_completed_at null but subscription_active true. Looks like they're skipping a step in the flow." No back and forth. No copy-pasting query results.

    Your AI-powered junior analyst

    Same problem, different context: you shipped a feature three months ago and someone from product wants to know if it's actually being used.

    Normally that means writing a query, building a small report, or filing a ticket with whoever owns analytics. None of that is hard, but there's enough friction that the question quietly dies more often than it gets answered.

    With your data accessible via MCP, you just ask. "How many users have used the new export feature in the last 30 days? Break it down by plan." It calls the right tools, counts, groups, and answers in seconds. No SQL, no dashboard, no waiting.

    It's the difference between an AI that knows your codebase and one that actually understands what's running in production.

    Why not just hand it the database URL?

    Fair question. The short answer is that raw database access means raw SQL, and raw SQL means anything goes. Joins across tables you didn't intend to expose, queries hitting your primary instead of your replica, no record of what was accessed.

    activerecord-mcp gives the AI access through your application layer instead. Queries go through ActiveRecord with hash conditions validated against actual column names. Sensitive columns like password_digest, tokens, and secrets are blocked by regex deny lists before anything hits the database, and stripped from output after just in case. Everything runs against a read-only role by default. OAuth 2.1 tokens scope access so MCP credentials can't bleed into anything else in your stack.

    It's the same access control you'd apply to any internal API, applied to your AI tooling.

    Getting started

    # Gemfile
    gem "activerecord-mcp"
    gem "doorkeeper"
    
    bundle install
    bin/rails generate doorkeeper:install
    bin/rails generate doorkeeper:migration
    bin/rails db:migrate
    bin/rails generate rails_mcp:install
    

    Restrict it to the models you want to expose, mount it, and connect:

    claude mcp add --transport http my-app https://your-app.com/mcp \
      --header "Authorization: Bearer $MY_APP_TOKEN"
    

    Full setup at github.com/pauloancheta/activerecord-mcp.

    Tags

    railsrubyaimcp

    Comments

    More Blog

    View all
    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught megemma

    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught me

    I ported the whole Gemma-4 family — E2B, E4B, 12B, 31B, and the 26B-A4B MoE — to run on...

    X
    xbill
    Hey DEV, I'm Tobore. Let's actually connect.community

    Hey DEV, I'm Tobore. Let's actually connect.

    Hey DEV, I'm Tobore. Let's actually connect. I've been on here for a while now, mostly writing and...

    L
    Laurina Ayarah
    I burned through thousands of AI tokens. Then a friend did it for freeai

    I burned through thousands of AI tokens. Then a friend did it for free

    (yep, kinda clickbait, just for the funsies 😊) At the beginning of the year, I relaunched my...

    P
    Paulo Henrique
    Claude might be saturating your machineai

    Claude might be saturating your machine

    My laptop was sitting idle with the fan at full tilt. Nothing was running that I knew of. The culprit...

    S
    Sidhant Panda
    Automated GitHub Code Reviews Using Google Geminigithubactions

    Automated GitHub Code Reviews Using Google Gemini

    I Built a Thing! TL;DR — Google Gemini-based Pull Request reviews and Issue Triaging for...

    D
    Darren "Dazbo" Lester
    What is an "agentic harness," actually?ai

    What is an "agentic harness," actually?

    I've been hearing the word "harness" thrown around a lot lately. I assumed it just meant "the IDE" or...

    T
    Tilde A. Thurium

    Stay up to date

    Get the latest DeepSeek prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for DeepSeek and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions for your business.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this DeepSeek resource

    • Process Multiple Media Files in Telegram with Gemini AI & PostgreSQL Databasen8n · $24.99 · Related topic
    • Back Up Your Credentials to GitHubn8n · $14.99 · Related topic
    • Query PostgreSQL Database with Natural Language using GPT-4-minin8n · $9.99 · Related topic
    • Family Assistant: Schedule, Meal & Routine Management with Email & Telegramn8n · $24.99 · Related topic
    Browse all workflows