Using LLMs and MCP to Debug PostgreSQL Performance in Rails
pawelurbanek.com
pawelurbanek.com
For example, instead of just "add this index", it could see the models and relationships, figure out the right migration syntax, spot N+1 queries in controllers that are causing the slow lookups in the first place.
The workflow would be pretty clean too - let your MCP tool do what it's good at (finding the problems), then hand it off to Claude Code/Cursor/etc that understands the Rails apps to actually write the fixes.
Thoughts?